Click here to Skip to main content
15,882,152 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
how to hide login panel after user logged in? login panel in master page. plz help me?
Posted
Comments
Nandakishore G N 24-Feb-13 23:13pm    
try using usercontrol..as login panel.

You have to redirect response to the second page.
For e.g. Response.Redirect("~/Page2.aspx");

Try not to use login panel as master page. That does not sound right.
 
Share this answer
 
Comments
Member 9027346 24-Feb-13 23:06pm    
but i have same pages which i want to show before login and after login?
You can do it like
this.Master.FindControl("yourLoginControl").Visible = false;

That way Master.FindControl you can access all master page control from your content page and show/hide those.
 
Share this answer
 
PanelName.Visible=False

Response.Redirect("~/Page2.aspx")
 
Share this answer
 
When user click on Sign In Button then you create session with User Credentials like DataTable or List<userprofile> and make yourLoginControl visibility false. Following code you can add on Page load of MasterPage.

this.Master.FindControl("yourLoginControl").Visible = false;
if(Session["User"] != null)
{
this.Master.FindControl("yourLoginControl").Visible = false;
}
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900