Click here to Skip to main content
15,881,757 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a login screen in the content page ,Aftre login the values should go to the Master page on the Label.
please give some solution...............
Posted

Login Controls were released by Microsoft, have a look at them here[^].

For, building Login Page using Login control, look:
How to: Create an ASP.NET Login Page[^]
ASP.NET Login Controls Overview[^]
How to add a Login, Roles and Profile system to an ASP.NET 2.0 [^]

If needed more, pick any example from here: Google Search result on the same[^].
 
Share this answer
 
Use Master.FindControl function to find the MasterPage controls from a content page.
Try this:
C#
Label mpLabel = (Label)Master.FindControl("masterPageLabel");
if(mpLabel != null)
{
    mpLabel.Text = "Your Text Here";
}


--Amit
 
Share this answer
 
I do not use Microsoft's controls for logins. In fact, at the professional level, nobody uses Microsoft's controls, but instead make their own user controls to fit their needs.

I think the root of you question goes to passing data from a content page to a MasterPage. Without more detail, I am half guessing on your needs. I would say that the login page can create a session (set a session variable) and all parent and child pages should be able to access your session variables.
 
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