Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1263
  • Last Modified:

How do i get the current page name/uri?

I am working on a tab menu that has 3 states, normal, hover and selected states.

Besides this for each tab i have a special tool bar. The tab menu and tool bar are build based one an xml file.

How can i get the name of the current page?

Like tab1 leads you to tab1.aspx, tab2 leads you to tab2.aspx, tab3 to tab3.aspx ...
In each and every page i have the above mentioned tab menu with the tool bar set. I want to know when to initialize witch tab menu/tool bar, based on the current page name.
Any help/opinion would be greatly appreciated.

Thank you.
0
drcyrus3d
Asked:
drcyrus3d
  • 2
2 Solutions
 
RonJDouglasCommented:
Request.RawUrl will get you what you are looking for.
0
 
carlnorrbomCommented:
Hi,

Or if you only need the actual name some work is needed:

Dim strPageName as String = Request.Url.ToString.SubString((Request.Url.ToString.LastIndexOf("/") + 1), (Request.Url.ToString.Length - (Request.Url.ToString.LastIndexOf("/") + 1)))

/Carl
0
 
drcyrus3dAuthor Commented:
Thank you guys.

I thought there is a simple way through XSLT to get the current page name, so i will try the approach you guys propose here, through asp.net.

Thanks till now.
0
 
drcyrus3dAuthor Commented:
Thank you!
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now