asp.net C#

  • Thread starter Thread starter khawar
  • Start date Start date
K

khawar

If i want to get the name of the page like
in "welcom.aspx" how would i get it.
in my script file (C#) i want to use the name of the aspx
page and save it in database, so i want to know the name
of the aspx page not the title of the page.
for eg.
there are 3 aspx pages that have the same cs file as their
code behind file. and in that file i want to know the name
of the aspx page so i can save it in the database.
all help will be appricated
thanks
 
Here's one method:

string strFileName = System.IO.Path.GetFileName(Request.PhysicalPath);

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
http://www.takempis.com
Big Things are made up of
Lots of Little Things.
 
Back
Top