I have file called "test.aspx".
In "test.aspx" I have this code:
<asp:DropDownList runat="server" id="chooseDay" >
<asp:ListItem value='<%#strday%>' Selected=True ><%#strday%> </asp:ListItem>
<asp:ListItem>1</asp:ListItem>
<asp:ListItem>2</asp:ListItem>
<asp:ListItem>3</asp:ListItem>
.
.
.
</asp:DropDownList>
In "test.aspx.
vb" I have this code:
Public strday As Integer = DateTime.Today.Day()
Public strmounth As Integer = DateTime.Today.Month()
Public stryear As Integer = DateTime.Today.Year()
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Page.DataBind()
END sub
I get this Error massage
Parser Error Message: Code blocks are not supported in this context.
What's the problem and how to fix it??