简体   繁体   中英

url.content in asp.net

url.content in MVC

What can I use same like that for ASP.NET web forms?

If you are asking for a method that accepts a relative path and generates a URL for ASP.NET web forms, see Page.ResolveUrl or Page.ResolveClientUrl . ResolveUrl returns a path relative to the site root, whereas ResolveClientUrl returns a path relative to the current page.

使用runat =“ server”,例如:

<a href="~/<your path>" runat="server">url.content sample</a>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM