knight1001
Technical User
I want to redirect to a page within the server. But i'm not entirely sure about the syntax.
I thought it was Redirect = "url"; but this gives the error msg of Unrecognised Escape Sequence.
I thought it was Redirect = "url"; but this gives the error msg of Unrecognised Escape Sequence.
Code:
private void Login(object sender, EventArgs e)
{
connectionpartthree = new OleDbConnection("provider=microsoft.jet.oledb.4.0; data source=" + Server.MapPath(".") + "\\F1.mdb;");
// if (!(IsPostBack))
{
commandpartthree = new OleDbCommand("SELECT COUNT(*) FROM Users WHERE Username = @Username AND Password = @Password;");
commandpartthree.Connection = connectionpartthree;
connectionpartthree.Open();
commandpartthree.Parameters.Add("@Username", OleDbType.VarChar);
commandpartthree.Parameters.Add("@Password", OleDbType.VarChar);
commandpartthree.Parameters["@Username"].Value = Username.Text;
commandpartthree.Parameters["@Password"].Value = Password.Text;
int intExists = (int)commandpartthree.ExecuteScalar();
if (intExists == 0)
{
LabelStatus.Text = "Username or Password Incorrect";
}
else //this is where i thought the redirect should go
{
LabelStatus.Text = "<a href="members.aspx">Proceed</a>";
}
}
}