Get aspx File Name

  • Thread starter Thread starter Jeff
  • Start date Start date
J

Jeff

I need to determine, at runtime, the page name of the currently requested
aspx page.
Page.ToString(), returns sumething like "ASP.MyFile_aspx". What I'd prefer
is to get the actual file name "MyFile.aspx".

Any suggestions?

Thanks.
 
...
I need to determine, at runtime, the page name of the currently requested
aspx page.
Page.ToString(), returns sumething like "ASP.MyFile_aspx". What I'd prefer
is to get the actual file name "MyFile.aspx".

In vanilla ASP you could have used, Request.ServerVariables("SCRIPT_NAME") -
but I'm sure someone here will have a better way to resolve it in .net :o)

Regards

Rob
 
why not use page.Request.Path
-----Original Message-----
I need to determine, at runtime, the page name of the currently requested
aspx page.
Page.ToString(), returns sumething
like "ASP.MyFile_aspx". What I'd prefer
 

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

Back
Top