PLZ hELP ME IN.....DATE COMPARISON!
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
Dim dt As New Date
If dt.Day() <= 16 Then
MsgBox("allow")
ElseIf dt.Day() >= 17 Then
MsgBox("disallow")
Else
Label1.Text = "error"
End If
Im the beginner for the asp.net .
I would like to allow user to view the results before 16/mm/yyyy and disallow when the date is reached after 17/mm/yyyy.....
but when i write this code in the page load.....all the msgbox i get is ("allow") althougt the date is reached after 17/mm/yyyy.....
pls help me. to solve this problem.....!
You can use a message box..
Try out this one..
if you are using a button to check your code try applying this..
Since I am using C# the code goes like this
in page load event
Button1.OnClientClick = String.Format("return alert('your custom message')");
now when you'll click on the button.. you'll see a message box..
Have fun
Happy coding...