1, GridView模板列中的TextBox的ontextchanged事件中获取当前行的某列
GridView模板列有一TextBox,TextBox的AutoPostBack属性为True,在TextChanged事件中可通过如下代码获取当前行某列的值:
TextBox t = (TextBox)sender; GridViewRow drv = (GridViewRow)t.NamingContainer; int rowIndex = drv.RowIndex; //行号
2,onclick ;onserverclick
<input type="button" id="btn_print" runat="server" value="打印物料清单" class="Button" onclick="printPage();" style="width: 85px" onserverclick="btn_print_ServerClick" />