web analytics

ASP.Net HtmlControls and WebConstrols support ~ as the application base path

Options

codeling 1602 - 6666
@2016-02-28 22:36:34

Note that ASP.Net’s internal controls , such as HtmlControls and WebControls, all support the ~ as the application base path designator whereever you can provide a link. For example in the Image Control you can say:

MyImage.ImageUrl = "~/images/stop.gif";

which will always load the image out of the application’s images directory regardless where the current page lives.

Comments

You must Sign In to comment on this topic.


© 2024 Digcode.com