Author: spnz | Posted on: 10/10/2009 2:52:49 AM | Views : 225

Hi everyone,
 
I have created an asp.net and I have created 2 usercontrols.
 
On my asp.net I have added a placed a placeholder.
 
In my code behind I am checking first if the user is authenicated, if not then load the log in usercontrol otherwise load the actual usercontrol .
protected void Page_Load(object sender, EventArgs e) { if (!Page.IsPostBack) { if (User.Identity.IsAuthenticated) { //load the required usercontol LoadUserControl("~/_usercontrols/ucMyRooms.ascx"); } else { LoadUserControl("~/_usercontrols/ucLogin.ascx"); } } } 

Go to the complete details ...