Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Getting the physical path of a web application through a custom web control

Posted on 2008-10-08
3
Medium Priority
?
430 Views
Last Modified: 2013-11-26
Hello,

I would like to know the path of the web application at DESIGN TIME for use in a custom web control.

I cannot use Page.Request.ApplicatonPath as that is runtime
System.AppDomain.CurrentDomain.BaseDirectory returns the visual studio folder
Page.MapPath(name) is runtime.

Any help would be appreciated. Cheers!

0
Comment
Question by:Onthrax
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 14

Expert Comment

by:Ramuncikas
ID: 22667664
0
 
LVL 13

Author Comment

by:Onthrax
ID: 22668107
Unfortunately only returns at run time not design time :(
0
 
LVL 13

Accepted Solution

by:
Onthrax earned 0 total points
ID: 22668319
               Dim webApplication As IWebApplication = DirectCast(Me.Site.GetService(GetType(IWebApplication)), IWebApplication)
                Dim projectPath As String = webApplication.RootProjectItem.PhysicalPath

That seems to do it.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

New Relic: Our company recently started researching several products to figure out what were the best ways for us to increase our web page speed and to quickly identify performance problems that we may be having. One of the products we evaluated wa…
Thoughout my experience working on eCommerce web applications I have seen applications succumbing to increased user demand and throughput. With increased loads the response times started to spike, which leads to user frustration and lost sales. I ha…
This video teaches users how to migrate an existing Wordpress website to a new domain.
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question