Skip to main content

Posts

Showing posts from August, 2007

Paths in asp.net

When working with resources in a Web site, you must often specify a path for the resource. For example, you might use a URL path to reference an image file in a page or the URL of a page elsewhere in the Web site. Similarly, code in your Web application might use a physical file path to a server-based file to read or write the file. Client Elements Elements that are not server controls on a page are client elements. There are two ways for specifying a path in client elements. A. Absolute path An absolute URL path is useful if you are referencing resources in another location such as an external Web site. For E.g. <img src="http://www.yourwebsite.com/MyApplication/Images/SampleImage.jpg" /> B. relative path Site Root relative path A site-root relative path, which is resolved against the site (not application) root. This example path assumes the existence of an Images folder under the Web site root: For e.g <img src="/Images/SampleImage.jpg&quo