Click here to Skip to main content
Rate this: bad
good
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 22:34pm
Edited 25-Dec-12 22: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
0 Sergey Alexandrovich Kryukov 404
1 Richard MacCutchan 240
2 OriginalGriff 230
3 Jared Sanow 145
4 Vinay Mistry 143
0 Sergey Alexandrovich Kryukov 5,955
1 OriginalGriff 4,805
2 CPallini 2,473
3 Abhinav S 1,507
4 Richard MacCutchan 1,437


Advertise | Privacy | Mobile
Web01 | 2.8.140814.1 | Last Updated 27 Dec 2012
Copyright © CodeProject, 1999-2014
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