Solved

How do i get the current page name/uri?

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Preface In the first article: A Better Website Login System (http://www.experts-exchange.com/A_2902.html) I introduced the EE Collaborative Login System and its intended purpose. In this article I will discuss some of the design consideratio…
Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL (http://www.experts-exchange.com/articles/201/Handling-Date-and-Time-in-PHP-and-MySQL.html) several years ago, it seemed like now was a good time to updat…
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…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

747 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

12 Experts available now in Live!

Get 1:1 Help Now