Click here to Skip to main content
12,629,804 members (29,786 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: ASP.NET
i have two master pages,one is parent and another is child.In child master page there are 2 menus which as follow:
<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>
<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 25-Dec-12 23:34pm
Updated 25-Dec-12 23:35pm
v2
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

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:
HtmlLink products = (HtmlLink)Page.Master.FindControl("products");
//if(Check the condition here){
     products.Visible = false;
//}


--Amit
  Permalink  
Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 2

This will also works fine to be used in multiple Master Pages or aspx pages having Master page.

HtmlLink products = (HtmlLink)Master.FindControl("products");
products.Visible = false;
  Permalink  

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.161205.3 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100