Go to home page mail me! RSS Feed

Convert virtual path to absolute or relative path

Monday, June 08, 2009 5:43 PM

There are a lot of goodies embedded in the framework, problem is, there are so many namespaces that it is almost impossible to know them all, as a matter of fact I doubt that there is any one person that knows all of the framework in and out. As usual, this post is about my experience with weird code that could have been done easily using existing built functions. I’ve seen developers write 20+ lines of code to this stuff while covering every possible scenario.

convert to absolute

System.Web.VirtualPathUtility.ToAbsolute(params);

convert to relative

System.Web.VirtualPathUtility.ToAppRelative(params);
System.Web.VirtualPathUtility.MakeRelative(params);

Your Comments.

  • # re: Convert virtual path to absolute or relative path

    GravatarHumm... interesting,

    This is great i have converteed to relative,

    Keep up the good work,

    Anyway, thanks for the post

    Left by software development uk at 11/6/2009 9:53 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarThe technique of inputting malicious data into an SQL statement, which would therefore make the vulnerability present on the database layer. Surprisingly, it seems everyone who has recently taken up learning a web development language has to try the technique out on their favorite websites..
    meilleurs jeux au casino

    Left by meilleurs jeux au casino at 1/15/2010 5:32 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarExecute the following Microsoft SQL Server T-SQL datetime and date formatting scripts in Management Studio Query Editor to demonstrate the multitude of temporal data formats available in SQL Server.
    Application Hosting

    Left by sammon at 1/20/2010 3:51 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarI've seen similar questions and answers regarding conversions from virtual to absolute and url, but how can I convert a url to a virtual path without manual string parsing?
    Printer Ink

    Left by jack at 1/20/2010 8:14 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarASP.Net includes quite a plethora of properties to retrieve path information about the current request, control and application. There's a ton of information available about paths on the Request object, some of it appearing to overlap and some of it buried several levels down, and it can be confusing to find just the right path that you are looking for.

    Left by jackhardly at 1/21/2010 8:36 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarI'm writing this article because the issue of paths seems to come up time after time in my discussions with people who are just starting to learn about ASP. While it's not directly a part of ASP, a solid understanding of directory structure and paths comes in extremely handy when your trying to learn and / or use ASP.
    SEO Services UK

    Left by jackhard at 1/21/2010 8:37 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarThanks for providing such useful information. I really appreciate your professional approach.
    Zend CMS

    Left by Maria at 1/22/2010 4:12 AM
  • # re: Convert virtual path to absolute or relative path

    GravatarMySpace is sharing an open source project named MySpace’s Performance Tracker which is an Internet Explorer plugin for capturing and measuring possible bottlenecks on webpages.
    Web Site Development

    Left by sammo at 1/27/2010 3:00 AM
  • # ejepenxa - Google Search

    Gravatarejepenxa - Google Search

    Left by Pingback/TrackBack at 2/10/2010 5:20 AM
  • # Paradoxes Resolved, Origins Illuminated - Erectile Dysfunction Medicine - buy viagra

    GravatarParadoxes Resolved, Origins Illuminated - Erectile Dysfunction Medicine - buy viagra

    Left by Pingback/TrackBack at 2/12/2010 6:39 AM
  • # wglcubxk - Google Search

    Gravatarwglcubxk - Google Search

    Left by Pingback/TrackBack at 2/12/2010 1:20 PM
  • # wctjzlgb - Google Search

    Gravatarwctjzlgb - Google Search

    Left by Pingback/TrackBack at 2/12/2010 1:20 PM
  • # Restaurantes Emol.com

    GravatarRestaurantes Emol.com

    Left by Pingback/TrackBack at 2/14/2010 2:30 PM
  • # SECRETARIA DE ESTADO DOTRABALHO E RENDA

    GravatarSECRETARIA DE ESTADO DOTRABALHO E RENDA

    Left by Pingback/TrackBack at 2/14/2010 3:47 PM
  • # fzlvwxui - Google Search

    Gravatarfzlvwxui - Google Search

    Left by Pingback/TrackBack at 2/14/2010 11:27 PM

Your Reply.

Comment Form.

Fields denoted with a "*" are required.

You may also like to leave your email or website.

 
Please add 3 and 2 and type the answer here:

Preview Your Comment.

 
Next entries »