|
Re: Getting a control's filename and location: msg#00092windows.devel.dotnet.web
Lizet, Here is a link to a working asp.net demo using resource localization in .net 1.1. You should be able to run this and compare it to your code to see what is different. http://www.activewebsolutions.com/resourcetest.zip Good Luck MK -----Original Message----- From: Discussion of building .NET applications targeted for the Web [mailto:DOTNET-WEB@xxxxxxxxxxxxxxxxxxx] On Behalf Of lizet peña Sent: Monday, June 13, 2005 5:30 PM To: DOTNET-WEB@xxxxxxxxxxxxxxxxxxx Subject: Re: [DOTNET-WEB] Getting a control's filename and location Dim actualServerPath As String = myControl.MapPath(myControl.Request.Path) Something like this could be? On 6/13/05, Ayyappan Nair <agnair@xxxxxxxxx> wrote: > "this.GetType().Name" would give you the name of the ascx file with the "." > replaced "_". If the source ascx is MyControl.ascx then "this.GetType > ().Name" would give you "MyControl_ascx". I am not sure if you can find the > actual source path because of shadow copying. > > Ayyappan Nair > > On Fri, 10 Jun 2005 17:41:19 -0400, Brian Vallelunga <brian@xxxxxxxxxxxxxx> > wrote: > > >I'm trying to figure out how to get a user control's filename from > >within the user control itself. The best I could do was: > > > >this.GetType().Assembly.Location > > > >The above only give the location of the currently loaded dll file that's > >in a test directory. I want the original path/name like mycontrol.ascx > > > >Any ideas? > > > >Brian > > > >=================================== > >This list is hosted by DevelopMentor(r) http://www.develop.com > > > >View archives and manage your subscription(s) at http://discuss.develop.com > =================================== > This list is hosted by DevelopMentor(r) http://www.develop.com > > View archives and manage your subscription(s) at http://discuss.develop.com > =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com =================================== This list is hosted by DevelopMentor® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com |
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| Previous by Date: | An XML Design Possibility Question: 00092, Robert Dickson |
|---|---|
| Next by Date: | Re: An XML Design Possibility Question: 00092, Peter Ritchie |
| Previous by Thread: | Re: Getting a control's filename and locationi: 00092, Brian Vallelunga |
| Next by Thread: | working with a project on a remote web server: 00092, Alex Smotritsky |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |