Solved

How do i get the current page name/uri?

Posted on 2008-06-26
4
1,258 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
Suggested Courses

632 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