跳转页面并传值
<asp:HyperLink ID="HyperLink1" NavigateUrl='~/Manager/Attachment.aspx?Attachment=<%#Eval("Attachment")%>' runat="server"><%#Eval("FileName")%></asp:HyperLink>
<asp:HyperLink ID="HyperLink1" NavigateUrl='<%# Eval("Attachment","~/Manager/Attachment.aspx?Attachment={0}") %>' runat="server"><%#Eval("FileName")%></asp:HyperLink>
[解决办法]
或者这样
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl='<%# "~/Manager/Attachment.aspx?Attachment=" + Eval("Attachment")%>'<%#Eval("FileName")%></asp:HyperLink>
[解决办法]
就一个连接,用啥HyperLink哈,直接
<a href="/Manager/Attachment.aspx?Attachment=<%#Eval("Attachment")%>"><%#Eval("FileName")%></a>
[解决办法]
NavigateUrl='<%# string.format("~/Manager/Attachment.aspx?Attachment={0}",Eval("Attachment").tostring())%>'