怎样在datagrid的链接项上传多个动态参数????????????????????
怎样在datagrid的链接项上传多个动态参数:如下
<asp:HyperLinkColumn Text= "编辑 " DataNavigateUrlField= "id " DataNavigateUrlFormatString= "Admin_Operation_Add.aspx?nid={0}&ClassID= <%=ClassID%> " HeaderText= "修改 "> </asp:HyperLinkColumn>
上面这个不行。认不到“ <%=ClassID%> ”
------解决方案-------------------- <asp:templatecolumn>
<itemtemplate>
<asp:hyperlink runat=server id=lnk
NavigateUrl= ' <%# String.Format( "Admin_Operation_Add.aspx?nid={0}&ClassID={1} ", Eval( "ID "), Eval( "ClassID ")) %> ' text=编辑 />
.....
------解决方案--------------------LZ有福了,答案还多个
<a href= ' <%# String.Format( "Admin_Operation_Add.aspx?nid={0}&ClassID={1} ", Eval( "ID "), Eval( "ClassID ")) %> ' > 编辑 </a>
<asp:hyperlink runat=server id=lnk
NavigateUrl= ' <%# String.Format( "Admin_Operation_Add.aspx?nid={0}&ClassID={1} ", Eval( "ID "), Eval( "ClassID ")) %> ' text=编辑 />
这两个有什么区别?