Returning the 'script name' / 'file name' of a web app

R

Rob Meade

Hi all,

I would like to return to a variable on the page.aspx part of a URL - I
acheived this on Friday at work quite simply but do you think I can work it
out now! No!...

In old asp I'd have got the entire URL, dumped it into an array - split by a
/ and then taken the upper most value as the page name...a colleague of mine
showed me a much simpler way of doing this...

It was something like..


Dim strCurrentPage as string

strCurrentPage = File.Get<something>(Request.ServerVariables("script_name"))

Its the File.Get<something> part that is giving me the headaches - I cant
remember what it is - I swear the other part is correct - cant find anything
online for .net that will help me either...all I remember is that it was
literally one line that would return me something like default.aspx etc..

Any help would be appreciated,

Regards

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,042
Latest member
icassiem

Latest Threads

Top