Listing 16-15
if (Membership.ValidateUser(TextBox1.Text, TextBox2.Text) {
FormsAuthentication.RedirectFromLoginPage(TextBox1 .Text.ToString(), false);
}
else {
Label1.Text = "You are not registered with the site.";
}
To which event (presumably within the <asp:Login> control), can I write this code?
What namespaces have to be imported to use the Membership?
include
...
using.System.Web.Security;
...
within the code file e.g. Login.aspx.cs in my case (using C#).
Is it possible to use the Import attribute within the @page directive (pg.69)?
Since Textbox1 and Textbox2 are provided as an example, how do I refer to the textboxes for User Name: and Password: within the <asp:Login> control?
