//HyperLinkField hlf = new HyperLinkField();
//hlf.HeaderText = "诊断";
////string[] canshu = new string[4] { "stationid", "datetime", "devicetypename", "objid" };
////hlf.DataNavigateUrlFields = canshu;
////hlf.DataNavigateUrlFormatString = "~/diagnose/DiagnoseGeneral.aspx?stationid={0}&datetime={1}&devicetypename={2}&objid={3}";
hlf.DataNavigateUrlFields = new string[] { "stationid" };
hlf.DataNavigateUrlFormatString = "~/diagnose/DiagnoseGeneral.aspx?stationid={0}";
hlf.Text = "诊断";
gv.Columns.Add(hlf);
为何传递一个参数是可以的,而我注释的传递四个参数不正确,求大侠指点。
http://www.cnblogs.com/downmoon/archive/2007/12/28/1017880.html
这个是datagrid,与gridview思路是相似的