Hi all my friends
I have to masterpages for my home page.
1. The first is for the annonymous users which has the login controls. its name is General_Anonymous.master.
2. The second one is for the logged in users which has a logout button and it hasn't the login controls in it. its name is General_LoggedIn.master.
in my default.aspx page I wrote the following code
protected void Page_PreInit(object sender, EventArgs e)
if (Session["SupId"] == null && Session["CustomerId"] == null)
this.MasterPageFile = "~/Masters/General_Anonymous.master";
this.MasterPageFile = "~/Masters/General_LoggedIn.master";
View Complete Post