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 ...