Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过使用这样的路由为产品编号添加一个变量:
<asp:HyperLink ID="HyperLink2" NavigateUrl='<%$ RouteUrl:v=p, productId=1%>' runat="server">
而不是 (1) 我想把 <%# Bind("productId")> 我想知道如何将它们迁移在一起
我找到了一个解决方案:
NavigateUrl='<%# GetRouteUrl("p", new {productId = Eval("id")}) %>'