where can i get the file name

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
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

Back
Top