asp.net - How do I make a link in a master page, which includes dynamic information from the current page? -


i have master page, link in top menu. link should contain dynamic bookmark current page, user scrolls page seeing.

<a href="help.aspx#[nameofcurentpage]">help</a> 

how implement this?

another thing reference master page through content page itself.

to make easier on myself, create publicly accessible method in master page itself:

public sub setnavigationpage(byval linkname string)    directcast(me.findcontrol(menuname), hyperlink).navigateurl = "help.aspx#" & linkname end sub 

then in content page, reference master page through following...

dim mymaster masterpageclass = directcast(me.master, masterpageclass) mymaster.setnavigationpage("currentpage") 

Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -