where can i get the file name

G

Guest

I'm looking for the namespace and the object that will allow me to get
information about the current webform[.aspx]. Specificly i need the file name
or the webform name.
thanks
kes
 
G

Guest

Request.Path would return the path relative to app root including the file
name..

For eg. some thing like /newsgroups/default.aspx

one way to get the Web form Name is like below (there may be syntx errors)

string path=Request.Path;
int FileNameStart = path.LastIndexOf("/") + 1;
string WebformName = path.SubString(FileNameStart,path.Length-FileNameStart);
 

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
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top