How to access the resources of a master page for a content page in an ASP.NET web page template
This article mainly introduces "how to access the resources of the master page on the content page in the ASP.NET web page template", in daily operation, I believe many people have doubts about how to access the resources of the master page on the content page in the ASP.NET web page template, small make up all kinds of information, sort out simple and easy to use operation method, hope to answer "how to access the resources of the master page on the content page in the ASP.NET web page template" doubts helpful! Next, please follow the small series to learn together!
Master Resource Page Code
〈%@ Master Language="C#" %〉 〈! DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/ xhtml1/DTD/xhtml1-transitional.dtd"〉 〈script runat="server"〉 public void SetCurNavItem(int itemIndex) { nav.Items[itemIndex].Attributes.CssStyle. Add("color", "#FF0000"); } 〈/script〉 〈html xmlns="http://www.w3.org/1999/xhtml" 〉 〈head runat="server"〉 〈title〉Untitled Page〈/title〉 〈/head〉 〈body〉 〈form id="form1" runat="server"〉 〈div〉 〈asp:ContentPlaceHolder id="m_header" runat="server">
Copyright