日期:2014-05-18  浏览次数:20417 次

HyperLink 绑定数据后,传递参数的问题??
HyperLink绑定数据后,怎么吧他绑定的数据传到他链接的那个页面去?

------解决方案--------------------
// source.aspx
<asp:hyperlink NavigateUrl= ' <%# "target.aspx?key1= " + Eval( "Field1 ") %> ' ...

// target.aspx
string key1 = Request.QueryString[ "key1 "];
------解决方案--------------------
<asp:HyperLinkColumn Target= "_blank " DataNavigateUrlField= "ID " //参数{0}DataNavigateUrlFormatString= "tiaozhuanlujin.aspx?ID={0} "//要跳转的路径
DataTextField= "PName " HeaderText= "标题头 " NavigateUrl= "zhiweixiangqing.aspx?ID={0} ">
<HeaderStyle HorizontalAlign= "Center " ForeColor= "#009900 " VerticalAlign= "Middle " BackColor= "#EFEEED "> </HeaderStyle>
<ItemStyle HorizontalAlign= "Center " VerticalAlign= "Middle "> </ItemStyle>
</asp:HyperLinkColumn>