aspx:
获取CheckBox在GridView模板列中的值    <asp:GridView ID="gvdeptusers" runat="server" DataKeyNames="id" AutoGenerateColumns="False" Width="100%" ShowHeader="False" OnRowDataBound="gvdeptusers_RowDataBound">
获取CheckBox在GridView模板列中的值    
<Columns>
获取CheckBox在GridView模板列中的值        
<asp:BoundField DataField="names" >
获取CheckBox在GridView模板列中的值            
<ItemStyle Width="8%" HorizontalAlign="Center" />                
获取CheckBox在GridView模板列中的值            
</asp:BoundField>
获取CheckBox在GridView模板列中的值        
<asp:BoundField DataField="deptname" >
获取CheckBox在GridView模板列中的值            
<ItemStyle Width="10%" HorizontalAlign="Center" />                
获取CheckBox在GridView模板列中的值            
</asp:BoundField>
获取CheckBox在GridView模板列中的值        
<asp:TemplateField>
获取CheckBox在GridView模板列中的值            
<ItemTemplate>
获取CheckBox在GridView模板列中的值                
<asp:HiddenField ID="hdtype" runat="server" Value='<%# Eval("user_classid") %>' />
获取CheckBox在GridView模板列中的值                
<asp:CheckBox ID="cbusers" Text='<%# Eval("username") %>' runat="server" />
获取CheckBox在GridView模板列中的值             
</ItemTemplate>
获取CheckBox在GridView模板列中的值        
</asp:TemplateField>
获取CheckBox在GridView模板列中的值    
</Columns>
获取CheckBox在GridView模板列中的值
</asp:GridView>

cs:
获取CheckBox在GridView模板列中的值            string idStr = "";
获取CheckBox在GridView模板列中的值            
foreach (GridViewRow row in this.gvdeptusers.Rows)
            Response.End();

绑定选定值:
获取CheckBox在GridView模板列中的值        protected void gvdeptusers_RowDataBound(object sender, GridViewRowEventArgs e)
        }

很简单的代码,怕忘记所以记录于此。

相关文章: