tags:

views:

211

answers:

1

An ASP.NET application sends letters in HTML format with links to external images. These images are placed in the same folder where the application is deployed. So before sending it modifies a letter template in such way what the links are correct.

Now I use

new UriBuilder(Request.Url.Scheme, Request.Url.Host, 
    Request.Url.Port, ResolveUrl("~")).ToString()

to get a path from where the application is run, but I want something more simple.

Some answers to this related question were useful, but I still hope for better solution.

Thank you!

+2  A: 

Request.ApplicationPath?

Quagmire
With limitations: http://weblogs.asp.net/dneimke/archive/2004/05/17/133116.aspx
Tomalak