-
error in code?
Guys,
will some one tell the error in the 3rd line in the code? I am new to c#.
if (UserDs.Tables["users"].Rows.Count == 1) {
// Response.Redirect firstGridPage.aspx;
formsAuthentication.RedirectFromLoginPage(UserName.Text, true);
}
or i want to redirect the user from the login page when the login is successful using the commented line. I am getting error there as well.
Please help me.
thanks
-
Sorry this didn't get answered sooner, probably should have posted it in the ASP.NET category. Anyway, here is the answer:
Code:
if (UserDs.Tables["users"].Rows.Count == 1)
{
Response.Redirect("firstGridPage.aspx");
}