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
  • This does not look too complicated... Per application you would even need to do it only once and store the result. What do you want to make simpler? Commented Nov 21, 2008 at 7:49
  • I am looking for something like Application.StartupPath (msdn.microsoft.com/en-us/library/…) Commented Nov 21, 2008 at 8:01

1 Answer 1

3

Request.ApplicationPath?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.