Friday, March 16, 2012

login page problem

Hi,

I am doing a website application in c# vs 2005. i use 2 tabs in my page. My problem is if i click on the second tab it has to ask for the username

and password. after validation it has to show the second tab. But it shows me the first tab by default. I set a session variable while calling

"Login.aspx" and checking it in the pageLoad(). But still it shows first tab only.

Calling the login page


if (Menu1.Items[1].Selected == true)
{
Response.Redirect("Login.aspx");
}

protected void Login1_Authenticate(object sender, AuthenticateEventArgs e)
{
if (Login1.UserName == "admin" && Login1.Password == "1234")
{
Session["fromLoginPage"] = 1;
Response.Redirect("Default.aspx");
}
}

can anyone pls help me?

Did you try to display tab2 when loading the page and if check permission is OK? All this must be done in Page_load event.

Yes. i am checking the Session variable and displaying the page. The flow goes properly.

But while displaying it shows Tab1.


Have you tried forcing tab2 to show by calling a method or setting a property value or something?

0 comments:

Post a Comment