当前位置: 代码迷 >> ASP.NET >> HyperLink 绑定数据后,传递参数的有关问题?
  详细解决方案

HyperLink 绑定数据后,传递参数的有关问题?

热度:9594   发布时间:2013-02-25 00:00:00.0
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>