Dec 12, 2010

How to set Current possition of html controls in master page

// Code for Content place holder

HtmlControl home = (HtmlControl)this.Page.Master.FindControl("mainMenu").FindControl("faqs");
        home.Attributes.Add("class", "current");


//code for master html

<div id="templatemo_menu">
   
            <ul id="mainMenu" runat="server">
                 <li><a id ="Default" runat="server"  href="Default.aspx" >Home</a></li>
                <li><a id ="feedback" runat="server"  href="support.aspx?fdk=fdk">Feedback</a></li>
                <li><a id ="faqs" runat="server" href="faqs.aspx">Faqs</a></li>
                <li><a id ="support" runat="server" href="support.aspx?fdk=sup">Support</a></li>

                <li><a id ="MyAccount" runat="server" href="MyAccount.aspx">My Account</a></li>
                <li><a id ="contactus" runat="server" href="contactus.aspx">Contact Us</a></li>
              
            </ul>       
   
        </div> <!-- end of templatemo_menu -->

No comments:

Post a Comment

What is the use of n-tier architecture and 3-tier architecture?

how to implement 3-tier architecture in asp.net using c#. 3-Tier architecture is also called layered architecture. Some people called it ...