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
 
Back
Top