关闭

Atlas的简单应用

标签: serverasptriggersclassdivobject
961人阅读 评论(1) 收藏 举报
分类:

前台代码:

<%@ 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

查看评论
* 以上用户言论只代表其个人观点,不代表CSDN网站的观点或立场
    个人资料
    • 访问:34418次
    • 积分:526
    • 等级:
    • 排名:千里之外
    • 原创:12篇
    • 转载:21篇
    • 译文:0篇
    • 评论:3条
    最新评论