2007年8月31日

GridView中取HyperLinkField列和ButtonField列的值的问题

摘要: 因为需要对GridView中HyperLinkField列和ButtonField列的取值,搜索了一下看到好多资料都是这样写的: string str = ((HyperLink)row.Cells[1].Controls[0]).Text; string str2 = ((Button)row.Cells[2].Controls[0]).Text; //注意红色部分 可是我这样取的话会报:无法将类型为“System.Web.UI.WebControls.DataControlLinkButton”的对象强制转换为类型“System.Web.UI.WebControls.Button”。。。。。。。。 我是这样写的: 阅读全文

posted @ 2007-08-31 14:58 寧愿為你 阅读(2533) 评论(0) 推荐(0) 编辑

导航