獲取Gridview中ButtonField的text屬性
來源:易賢網 閱讀:1302 次 日期:2014-07-23 13:01:36
溫馨提示:易賢網小編為您整理了“獲取Gridview中ButtonField的text屬性”,方便廣大網友查閱!

<asp:BoundField>用cell[2].text取到值。但<asp:HyperLinkField>和<asp:ButtonField>通過cell[0].Text和cell[13].Text取的值都是""。應如何取到值呢?

首先將ButtonField按鈕的連接改為Button模式,然后就可以通過以下語句得到text值

Response.Write(((HyperLink)e.Row.Cells[0].Controls[0]).Text);

Response.Write((Button)BStationGridView.Rows[RowIndex].Cells[13].Controls[0]).Text);

更多信息請查看IT技術專欄

更多信息請查看網頁制作
易賢網手機網站地址:獲取Gridview中ButtonField的text屬性
關于我們 | 聯(lián)系我們 | 人才招聘 | 網站聲明 | 網站幫助 | 非正式的簡要咨詢 | 簡要咨詢須知 | 新媒體/短視頻平臺 | 手機站點

版權所有:易賢網