hello all!
i am new to asp.net
and it had been going smoohtly until i ran this code:
<html>
<head>
<script language="
VB" runat="server">
Sub Calendar_Change(Source As Object, E As EventArgs)
If Page.IsPostBack Then
lblMessage.Text = "You selected " &
ctlCalendar.SelectedDate.ToLongDateString()
End If
End Sub
</script>
</head>
<body>
<form id="frmCalendar" runat="server">
<asp:Label id="lblMessage" runat="server" />
<br/><br/>
<asp:Calendar id="ctlCalendar"
BackColor="white"
BorderWidth="3"
BorderStyle="Solid"
BorderColor="Black"
CellSpacing="2"
CellPadding="2"
ShowGridLines="True"
TitleStyle-BackColor="white"
TitleStyle-ForeColor="black"
DayHeaderStyle-ForeColor="white"
DayStyle-ForeColor="black"
SelectedDayStyle-BackColor="red"
OnSelectionChanged="Calendar_Change"
runat="server" />
</form>
</body>
</html>
it then gave me this error after running it:
Server Error in '/' Application.
--------------------------------------------------------------------------------
Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30201: Expression expected.
Source Error:
Line 5: If Page.IsPostBack Then
Line 6:
Line 7: lblMessage.Text = "You selected " &
Line 8: ctlCalendar.SelectedDate.ToLongDateString()
Line 9: End If
Source File: c:\inetpub\wwwroot\netplay\asptest2.aspx Line: 7