asp.net1.1版本中是不能使用超级链接列来设置多个rul字段的,如:DataNavigateUrlField="GoodsNo,Type",且DataNavigateUrlFormatString="webform2.aspx?GoodsNo={0}&Type={1},这样会出现错误:找不到字段“GoodsNo,Type”。解决办法:使用模板列。
模板列中的HyperLink的NavigateUrl设置为:DataBinder.Eval(Container,"DataItem.ID",'ShowDetail.aspx?id={0}&type='") + DataBinder.Eval(Container,"DataItem.Type","{0}"。
模板列中的HyperLink的NavigateUrl设置为:DataBinder.Eval(Container,"DataItem.ID",'ShowDetail.aspx?id={0}&type='") + DataBinder.Eval(Container,"DataItem.Type","{0}"。
本文介绍了在ASP.NET 1.1版本中如何解决使用超级链接列设置多个URL字段的问题。由于该版本不支持直接设置多个字段,文中提供了一种通过模板列和HyperLink NavigateUrl属性的替代方案。
3916

被折叠的 条评论
为什么被折叠?



