Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/asp.net/30.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/visual-studio-2008/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Asp.net 超链接的NavigateUrl属性_Asp.net_Visual Studio 2008 - Fatal编程技术网

Asp.net 超链接的NavigateUrl属性

Asp.net 超链接的NavigateUrl属性,asp.net,visual-studio-2008,Asp.net,Visual Studio 2008,请告知如何在ASP.NET中使NavigateUrl以当前URL开头 当前URL类似于: http://localhost:145/Catalog.aspx?FID=2 我尝试了“~/”但它只显示以下内容:http://localhost:145/ NavigateUrl='<%# String.Format("~/") %>' NavigateUrl='' 有没有一种方法可以像我们在代码隐藏文件中那样在这里使用Request.QueryString[“FID”]? 谢谢大家

请告知如何在ASP.NET中使NavigateUrl以当前URL开头

当前URL类似于:

http://localhost:145/Catalog.aspx?FID=2
我尝试了“~/”但它只显示以下内容:
http://localhost:145/

NavigateUrl='<%# String.Format("~/") %>' 
NavigateUrl=''
有没有一种方法可以像我们在代码隐藏文件中那样在这里使用
Request.QueryString[“FID”]
? 谢谢大家!

NavigateUrl=''
NavigateUrl='<%# Request.RawUrl %>' 
''
如果要查看从请求中还可以获得什么。Url对象:

  • 在页面加载中放置断点
  • 用VS调试
  • 在即时窗口中键入Request.Url
  • '<%# Request.Url.AbsoluteUri %>'