Can I resolve ASP.NET "~" paths without a Control being present?
Posted
by jdk
on Stack Overflow
See other posts from Stack Overflow
or by jdk
Published on 2010-04-07T01:57:43Z
Indexed on
2010/04/07
2:03 UTC
Read the original article
Hit count: 286
asp.net-2.0
|resolveurl
I want to Resolve "~/whatever" from inside non-Page contexts such as Global.asax (HttpApplication), HttpModule, HttpHandler, etc. but can only find the Resolution methods specific to Controls (and Page).
I think the app should have enough knowledge to be able to map this outside the Page context. No? Or at least it makes sense to me it should be resolvable in other circumstances, wherever the app root is known.
Update: The reason being I'm sticking ~ paths in the web.configuration files.
© Stack Overflow or respective owner