<%@ Page Language="C#" %><html xmlns="http://www.w3.org/1999/xhtml" ><head runat="server"> <title>Master</title> <script runat="server"> </script></head><body> <form runat="server"> <div> <asp:GridView DataSource AutoGenerateColumns="false" Runat="server"> <Columns> <asp:HyperLinkField HeaderText="Movie Categories" DataTextField="Name" DataNavigateUrlFields="Id,Name" DataNavigateUrlFormatString="Details.aspx?id={0}&Title={1}" /> </Columns> </asp:GridView> <asp:SqlDataSource ConnectionString="<%$ ConnectionStrings:Movies %>" SelectCommand="SELECT Id, Name FROM MovieCategories" Runat="server" /> </div> </form></body></html>
如上代码,浏览器会把链接解析为<td><a href="Details.aspx?id=1&Title=Adventure">Adventure</a></td>
请问有什么好的解决方法?
添加回答
举报
0/150
提交
取消