MyZonal Answers

   
   
Home
Answers User Ready to Participate?
Get Started!
Username :
Password :
  
Create an Account
Forgot a Password?
Recommend this site

Categories

  • Arts & Humanities
  • Beauty & Style
  • Business & Finance
  • Cars & Transportation
  • Computers & Internet
  • Consumer Electronics
  • Dining Out
  • Education & Reference
  • Entertainment & Music
  • Environment
  • Family & Relationships
  • Food & Drink
  • Games & Recreation
  • Health
  • Home & Garden
  • Local Businesses
  • News & Events
  • Pets
  • Politics & Government
  • Pregnancy & Parenting
  • Science & Mathematics
  • Social Science
  • Society & Culture
  • Sports
  • Travel
Question Details
sam
How to get directory name of the page currently di

Details : If you want to know only the directory name not the full path of the page that is currently displaying you can use this code string sPath = System.Web.HttpContext.Current.Request.Url.AbsolutePath; System.IO.FileInfo oInfo = new System.IO.FileInfo(sPath); string sRet = oInfo.Directory.Name.ToString(); Response.Write(“

Directory name-->” + sRet + “

”); Happy Coding
   5   In Computers & Internet
     

Rate This Question
 
No Answer Found
© 2009, MyZonal.com, All Rights Reserved.