Atlas的简单应用

前台代码:

<%@ Page Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Title="Untitled Page" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
   
    <atlas:ScriptManager ID="sl" EnablePartialRendering="true" runat=server>
       
    </atlas:ScriptManager>
   
    <div class="category">
        Status:
        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
            <asp:ListItem Value="false">活动的</asp:ListItem>
            <asp:ListItem Value="true">完成的</asp:ListItem>
        </asp:DropDownList>  
       
        <atlas:UpdateProgress ID="ups" runat="server">
            <ProgressTemplate>
                <div>
                    正在更新.....
                </div>
            </ProgressTemplate>
        </atlas:UpdateProgress>
     </div>
    
     <div class="todoheader">
        <h2>Todo List</h2>
     </div>
    
     <atlas:UpdatePanel ID="pl" runat=server>
        <ContentTemplate>
             <asp:GridView ID="GridView1" runat="server" CellPadding="4" ForeColor="#333333"
                GridLines="None">
                <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <RowStyle BackColor="#EFF3FB" />
                <EditRowStyle BackColor="#2461BF" />
                <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
                <HeaderStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                <AlternatingRowStyle BackColor="White" />
            </asp:GridView>
        </ContentTemplate>
       
        <Triggers>
            <atlas:ControlValueTrigger ControlID="DropDownList1"  PropertyName="SelectedValue" />
        </Triggers>
     </atlas:UpdatePanel>
   
     <div>
        <span>添加新记录</span>
     </div>
   
    <atlas:UpdatePanel ID="Up2" Mode="Conditional" runat="server">
        <ContentTemplate>
            <asp:DetailsView ID="DetailsView1" runat="server" Height="50px" Width="125px" GridLines="None">
    </asp:DetailsView>
        </ContentTemplate>
    </atlas:UpdatePanel>
   
    
</asp:Content>

 后台代码:

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class _Default : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        System.Threading.Thread.Sleep(2000);
        this.GetDatas();
    }

    private void GetDatas()
    {
        string SQLStr = System.String.Empty;
        SQLStr = "select * from tb_Users ";
        this.GridView1.DataSource = KOperate.KCNewSqlData.ExecuteDataSet(SQLStr);
        this.GridView1.DataBind();
    }
}

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值