Solved

How do i get the current page name/uri?

Posted on 2008-06-26
4
1,256 Views
Last Modified: 2013-11-18
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
Comment
Question by:drcyrus3d
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 1

Accepted Solution

by:
RonJDouglas earned 400 total points
ID: 21877599
Request.RawUrl will get you what you are looking for.
0
 
LVL 18

Assisted Solution

by:carlnorrbom
carlnorrbom earned 100 total points
ID: 21877771
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
 
LVL 1

Author Comment

by:drcyrus3d
ID: 21877797
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
 
LVL 1

Author Closing Comment

by:drcyrus3d
ID: 31471112
Thank you!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The Confluence of Individual Knowledge and the Collective Intelligence At this writing (summer 2013) the term API (http://dictionary.reference.com/browse/API?s=t) has made its way into the popular lexicon of the English language.  A few years ago, …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
The viewer will learn how to dynamically set the form action using jQuery.

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question