|
.net
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
how to get application name and path programmaticallyDear ASP.NET Programmers,
How can I get the name of my application programmatically? Also the path of the application. For instance, if my application is named "buran" and located in c:\inetpub\wwwroot\buran directory, how can get them? Thanks in advance, Buran Request.PhysicalApplicationPath
-Brock DevelopMentor http://staff.develop.com/ballen Show quoteHide quote > Dear ASP.NET Programmers, > > How can I get the name of my application programmatically? Also the > path of the application. For instance, if my application is named > "buran" and located in c:\inetpub\wwwroot\buran directory, how can get > them? Thanks in advance, > > Buran > To get the name of the application use:
HttpContext.Current.Request.ApplicationPath.Substring(1, Request.ApplicationPath.Length-1) If you want to get the application name alone, then the above gets rid of '/' Hope this helps! Rajesh Meenrajan MCSD.net http://meenrajan.blogspot.com Show quoteHide quote "Brock Allen" wrote: > Request.PhysicalApplicationPath > > -Brock > DevelopMentor > http://staff.develop.com/ballen > > > > > Dear ASP.NET Programmers, > > > > How can I get the name of my application programmatically? Also the > > path of the application. For instance, if my application is named > > "buran" and located in c:\inetpub\wwwroot\buran directory, how can get > > them? Thanks in advance, > > > > Buran > > > > > > Thank you Brock and Rajesh :)
Show quoteHide quote "Rajesh" <Raj***@discussions.microsoft.com> wrote in message news:13466821-7C89-4E8C-B040-E0119E4ACB00@microsoft.com... > To get the name of the application use: > HttpContext.Current.Request.ApplicationPath.Substring(1, > Request.ApplicationPath.Length-1) > > If you want to get the application name alone, then the above gets rid of '/' > > Hope this helps! > > Rajesh Meenrajan > MCSD.net > http://meenrajan.blogspot.com > > > "Brock Allen" wrote: > > > Request.PhysicalApplicationPath > > > > -Brock > > DevelopMentor > > http://staff.develop.com/ballen > > > > > > > > > Dear ASP.NET Programmers, > > > > > > How can I get the name of my application programmatically? Also the > > > path of the application. For instance, if my application is named > > > "buran" and located in c:\inetpub\wwwroot\buran directory, how can get > > > them? Thanks in advance, > > > > > > Buran > > > > > > > > > > >
Other interesting topics
SqlParameters SqlDbType.Char in VB Question
DataGrid Runtime DropDown - ViewState Issue Evaluation Application How to get network user name with FORMS authentication Reading values from a Word document... Strange Datagrid Update Problem Two DropDownLists getting crossed Getting more detailed errors Global Variables!q interesting fact about date. |
|||||||||||||||||||||||