易截截图软件、单文件、免安装、纯绿色、仅160KB

Asp.Net中gridview中嵌入的checkbox使用

<asp:checkbox id = "checkbox1" runat = "server" AutoPostBack = "true" OnCheckedChanged = "CheckAllBox_Checked" text = "全选">
<asp:CheckBox  ID = "CheckBox1" AutoPostBack = "true" OnCheckedChanged = "CheckBox1_Checked" runat = "server"/>
 protected void CheckBox1_Checked(object sender, EventArgs e)
    {
        CheckBox cb = (CheckBox)sender;
        int index = ((GridViewRow)(cb.NamingContainer)).RowIndex;
        if (cb.Checked)
        {
            gridView.Rows[index].BackColor = Color.BurlyWood;
        }
        else
        {
            gridView.Rows[index].BackColor = gridView.RowStyle.BackColor;
        }
    }
    protected void CheckAllBox_Checked(object sender, EventArgs e)
    {
        if (CheckAll.Checked)
        {
            for (int i = 0; i < gridView.Rows.Count; i++)
            {
                CheckBox cb = (CheckBox)gridView.Rows[i].FindControl("CheckBox1");
                if (!cb.Checked)
                {
                    cb.Checked = true;
 &nbs


相关文档:

ASP.NET 3.5 中的数据绑定

    ASP.NET 3.5中6个内置的数据源控件分别用于特定类型的数据访问。
SqlDataSource 控件   允许访问支持ADO.NET数据提供程序的所有数据源。该控件默认可以访问ODBC、OLE DB、SQL Server、Orale和SQL Server CE 提供程序
LinqDataSource  控件 可以使用LINQ 查询访问不同类型的数据对象
O ......

ASP.NET之二 ASP.NET安全及部署

ASP.NET中的身份验证(authentication)有哪些
=========================================
Forms身份验证:
通过其可将没有通过身份验证的请求重定向到使用 HTTP 客户端重定向的 HTML 窗体的系统。用户提供凭
据并提交该窗体。如果应用程序验证该请求,系统就会发出包含凭据或密钥的 Cookie 以重新获取该标识
。后续的 ......

Explained: Forms Authentication in ASP.NET 2.0

原地址:
http://msdn.microsoft.com/en-us/library/aa480476.aspx
IIS Authentication
ASP.NET authentication is a two-step process. First, Internet Information Services (IIS) authenticates the user and creates a Windows token to represent the user. IIS determines the authentication mode that it shoul ......

Asp.Net性能优化

(一).选择会话状态存储方式
    在Webconfig文件配置:
    <sessionState mode="???" stateConnectionString="tcpip=127.0.0.1:42424"
         sqlConnectionString="data source=127.0.0.1;Trusted_Connection=y ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号