【发布时间】:2015-04-13 00:38:58
【问题描述】:
如何通过我的 ASP.NET 工作的 XAML 中的 href 标记传递值?
我试过这个:
<a href='profile.aspx?ID=<%#HttpContext.Current.Session["id"]%>'>Profile</a>
但是 URL 显示为 "profile.aspx?ID="
我做错了什么?
【问题讨论】:
-
你有没有调试过传递给它的变量是什么?
-
@Quill 是的,变量是 44
-
您的会话是否超时?
-
@Quill 不,它仍然存在
-
“我的 ASP.NET 工作的 XAML”?通常对于 ASP.Net,它会是 ASPX /WebForms 或 CSHTML(Razor)/ASP.Net MVC ... 澄清你的意思是“XAML”会很好。