Solved

How do i get the current page name/uri?

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
XSL FO - text wrapping and empty spaces 1 26
Not showing JavaScript in the list 5 39
Ajax Panel Not Updating When Triggered By Timer 4 44
Help with Syntax 9 28
This article covers the basics of the Sass, which is a CSS extension language. You will learn about variables, mixins, and nesting.
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

895 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now