|
Re: Getting a control's filename and location: msg#00087windows.devel.dotnet.web
"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® 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: | Re: embedding resources for globalization (complete frustration): 00087, lizet peña |
|---|---|
| Next by Date: | Re: Getting a control's filename and location: 00087, lizet peña |
| Previous by Thread: | Getting a control's filename and locationi: 00087, Brian Vallelunga |
| Next by Thread: | Re: Getting a control's filename and location: 00087, lizet peña |
| Indexes: | [Date] [Thread] [Top] [All Lists] |
| News | FAQ | advertise |