I used like this
HTML Code:
<asp:LoginView ID="LoginView1" runat="server" EnableViewState="false" >
<AnonymousTemplate>
<asp:TextBox ID="UsernameText" runat="server" ></asp:TextBox>
<asp:TextBox ID="PasswordText" runat="server"></asp:TextBox>
<asp:Button ID="LoginButton" runat="server" onclick="LoginButton_Click"
Text="Login" />
</AnonymousTemplate>
Now, when I try to access the properties of UserNameText, I get errors.... I am new to ASP.. Please help
vb Code:
'In the code of default.aspx.vb,
Protected Sub LoginButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LoginButton.Click
MsgBox(UsernameText.Text)
End Sub
I get "Name UserNameText is not declared"
Now if I remove the <asp:LoginView and <AnonymousTemplate> , it works fine
I am on Visual Web Express 2008.
Thank you
Edit/Delete Message