J
Jeff
hey
asp.net 2.0
I have a ContentPlaceHolder control in my master page. I need a way to
determine during runtime what is the name of the page being shown in the
ContentPlaceHolder.
I ask because if the page shown in the ContentPlaceHolder is "Result.aspx"
then I should programmatically add some extra menu items to the menu in the
master page..
Originally I thought I could use the Control.ID to determine the name of the
page. But I think that is not the correct approach:
System.Web.UI.ControlCollection cl = content.Controls;
foreach (System.Web.UI.Control c in cl)
{
if (c.ID == "Result.aspx") {
}
}
Any suggestions?
Jeff
asp.net 2.0
I have a ContentPlaceHolder control in my master page. I need a way to
determine during runtime what is the name of the page being shown in the
ContentPlaceHolder.
I ask because if the page shown in the ContentPlaceHolder is "Result.aspx"
then I should programmatically add some extra menu items to the menu in the
master page..
Originally I thought I could use the Control.ID to determine the name of the
page. But I think that is not the correct approach:
System.Web.UI.ControlCollection cl = content.Controls;
foreach (System.Web.UI.Control c in cl)
{
if (c.ID == "Result.aspx") {
}
}
Any suggestions?
Jeff