ASP.Net C# ResolveClientUrl inside Class

前端 未结 4 1151
我寻月下人不归
我寻月下人不归 2021-02-01 20:36

I have the following code:

public class NavigationPath
{
    private string menuItems = \"
  • \" + \"
  • 4条回答
    •  说谎
      说谎 (楼主)
      2021-02-01 21:14

      Instead of calling ResolveClientUrl on the Page object (or any controls), you can also use VirtualPathUtility.ToAbsolute("~/home.aspx"); which will give you the same result as calling ResolveUrl("~/home.aspx");

    提交回复
    热议问题