On master page
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string pageValue = setpagevalue(pageName);
if (pageValue != "")
{ lbl_showpage.Text = pageValue; }
}
}
//Method
public string setpagevalue(string pagename)
{
string valdata = pagename;
switch(valdata){
case "ASP.homepage_aspx": return "Home Page"; break;
case "ASP.admin_aspx": return "Administration Page"; break;
//default
default: return string.Empty;
break;
}
}
//On Menu
<ul>
<li runat="server" id="id1"><a href='Page Name' onclick="setpagevalue('Page Name');">
<span>VFA Member Profile</span></a></li>
<li runat="server" id="id2"><a href='Page Name' onclick="setpagevalue('Page Name');">
<span>VFA Member Profile</span></a></li>
</ul>
//Javascript-
<script type="text/javascript">
function setpagevalue(valuepage) {
}
</script>
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string pageValue = setpagevalue(pageName);
if (pageValue != "")
{ lbl_showpage.Text = pageValue; }
}
}
//Method
public string setpagevalue(string pagename)
{
string valdata = pagename;
switch(valdata){
case "ASP.homepage_aspx": return "Home Page"; break;
case "ASP.admin_aspx": return "Administration Page"; break;
//default
default: return string.Empty;
break;
}
}
//On Menu
<ul>
<li runat="server" id="id1"><a href='Page Name' onclick="setpagevalue('Page Name');">
<span>VFA Member Profile</span></a></li>
<li runat="server" id="id2"><a href='Page Name' onclick="setpagevalue('Page Name');">
<span>VFA Member Profile</span></a></li>
</ul>
//Javascript-
<script type="text/javascript">
function setpagevalue(valuepage) {
}
</script>
No comments:
Post a Comment