SolutionCottage.com
Posted  15 Jan 2009 - 21:40:18

Category: ASP.net


Get the url to the root of website in ASP.net

Issue:
You want to link to a file relatively to your application root url on the server.

Solution:

Request.PhysicalApplicationPath

An example to a complete folder in the structure is:

string targetFolder = Request.PhysicalApplicationPath + "\\Folder\\";








1 comment:

12/3/2014 10:32:50 AM  Dhaval  wrote:

Jordar









© SolutionCottage 2008-2011 7/21/2017 3:36:41 AM