Groups | Blog | Home
all groups > asp.net building controls > march 2008 >

asp.net building controls : Using paths that include ~


Nathan Sokalski
3/25/2008 12:55:15 PM
As we all know, the ~ can be used to represent the site root in URLs used in
server controls. What function would be used to replace the ~ with the site
root in a String passed to it? Thanks.
--
Nathan Sokalski
njsokalski@hotmail.com
http://www.nathansokalski.com/

David R. Longnecker
3/25/2008 8:46:47 PM
Nathan-

You can mix and match various properties of HttpContext and Request. Rick
S. has a nice list of the various properties on his blog at http://www.west-wind.com/weblog/posts/269.aspx.
I've referenced that page a few times just to remember which did what. ;)

There's also a part at the bottom for creating a helper method for server
controls.

HTH.

-dl

--
David R. Longnecker
http://blog.tiredstudent.com

[quoted text, click to view]

AddThis Social Bookmark Button