Wrox Programmer Forums
|
BOOK: Professional ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Professional ASP.NET 4 in C# and VB by Bill Evjen, Scott Hanselman, Devin Rader; ISBN: 9780470502204
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Professional ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 15th, 2012, 08:04 PM
Registered User
 
Join Date: Feb 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default Definition and explaination of "~" in a path

Can anyone explain the legality and meaning of a file path like "~/Image1.jif"
Can't find a definition of it anywhere.
 
Old February 16th, 2012, 03:59 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

The tilde (~) resolves to the application's root. This can be something like / (when accessing the site at www.domainname.com for example), or something like /ApplicationName/ (when accessing the site as www.domainname.com/ApplicationName and where ApplicationName is marked as an application in IIS).

It only works on server side controls / code, so depending on where you use the path you provided it may or may no work. For more info:

https://www.google.com/?q=asp.net+tilde+in+url

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
Nathe37216 (February 16th, 2012)
 
Old February 16th, 2012, 07:51 AM
Registered User
 
Join Date: Feb 2012
Posts: 2
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Thank you Imar. I found the answer for myself searching discussions of virtual and physical paths on MSDN. I even think I knew that once, but only intuitively. It's great that author like yourself participates in P2P. Look forward to reading your posts.





Similar Threads
Thread Thread Starter Forum Replies Last Post
MSXSL gives error message for "for" inside "select" ilyaz XSLT 1 December 9th, 2010 05:02 PM
Difficulties with "web.config" and "ASPNETDB" CFRham BOOK: ASP.NET MVC Website Programming Problem Design Solution ISBN: 9780470410950 2 July 3rd, 2010 10:19 AM
How to theme the "Browse" button of "FileUpload" control? varunbwj BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 October 14th, 2009 01:22 AM
Add a CheckBox DataColumn to my DataGridView, Null format: "" or "True" but Error: F ismailc C# 2005 0 September 25th, 2009 04:56 AM
Code not going as planned: "icicle" vs "savedinstancestate" joopthecat BOOK: Professional Android Application Development ISBN: 978-0-470-34471-2 3 May 3rd, 2009 03:09 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.