Click here to Skip to main content
15,893,644 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have two master pages,one is parent and another is child.In child master page there are 2 menus which as follow:
XML
<ul id="nav">
                <li id="products"><a href="#" class="sub" tabindex="1"> My Products </a>
                     <ul>
                        <li><a href="../Developement/SysATQAAdd_product.aspx">Add Product</a></li>
                        <li><a href="../Developement/SysATQAManage_product.aspx">Manage Product</a></li>
                        <li><a href="../Developement/SysATQAProduct_catalogue.aspx">Product Catalogue</a></li>

                    </ul>

                </li>

XML
<li><a href="#" class="sub" tabindex="1">Profile</a>
                   <ul>
                       <li><a href="../Developement/Change_profile.aspx">Change Profile</a></li>


                   </ul>
               </li>


when i login that time i want to show only profile menu and there is profile and product pages.when i complete profile page then it show product menu.plz help me?
Posted
Updated 25-Dec-12 22:35pm
v2

Hi,

You need to find the control from master page and you need to check for the condition of profile completion in child page. Then you can show or hide your master page control. To achieve this you need to find the master page control using the following:
C#
HtmlLink products = (HtmlLink)Page.Master.FindControl("products");
//if(Check the condition here){
     products.Visible = false;
//}



--Amit
 
Share this answer
 
This will also works fine to be used in multiple Master Pages or aspx pages having Master page.

C#
HtmlLink products = (HtmlLink)Master.FindControl("products");
products.Visible = false;
 
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