Solved

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

Posted on 2008-10-08
3
423 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

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

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

Suggested Solutions

A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Introduction A frequently used term in Object-Oriented design is "SOLID" which is a mnemonic acronym that covers five principles of OO design.  These principles do not stand alone; there is interplay among them.  And they are not laws, merely princ…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
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.

737 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