I want to make a website where if admin login through admin.aspx
I want to add one more navigation in my menu list.
my menu list is made of <ul>...<li> i.e html control
so how can I dynamically add the new
style { visibility:hidden}
and when the login is successful I want to change it to {visibility:visible }
this is My master page code
<ul id="ul_myLst" runat="server">
<li><a href="Testimonials.aspx">Testimonial</a>
</li>
<li><a href="#fakelink">Contact Us</a>
</li>
<li><a href="#fakelink">About Us</a>
</li>
<li><a href="Registration.aspx">Registartion</a>
</li>
<li><a href="OurFaculty.aspx">Our Faculty</a>
</li>
<li id="abc" runat="server" style="visibility:hidden">
<a href="OurFaculty.aspx">Admin</a>
</li>
</ul>
and this is my Default.aspx code
if (f.pass.Equals(txtpass.Value)) {
HtmlGenericControl ul = (HtmlGenericControl)(this.Master.FindControl("abc"));
//ul.Attributes["class"] = "admin-p";
ul.Style.Remove("visibility");
ul.Style["visibility"] = "visible";
Response.Redirect("Index.aspx");
}
this code is working fine but when I go back again to index.aspx the admin menu get hides automatically