<asp:BoundField>用cell[两].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);

发表评论 取消回复