defaultcs.aspx.cs
来自「Telerik是很大的第三方软件制造商」· CS 代码 · 共 92 行
CS
92 行
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using Telerik.QuickStart;
namespace Telerik.CallbackExamplesCSharp.Callback.Examples.Functionality.ExplicitUpdate
{
/// <summary>
/// Summary description for DefaultCS.
/// </summary>
public class DefaultCS : XhtmlPage
{
protected System.Web.UI.WebControls.Label label1;
protected System.Web.UI.WebControls.Label label2;
protected System.Web.UI.WebControls.Label label3;
protected System.Web.UI.WebControls.Label label4;
protected Telerik.WebControls.CallbackCheckBox cb1;
protected Telerik.WebControls.CallbackCheckBox cb2;
protected Telerik.WebControls.CallbackCheckBox cb3;
protected Telerik.WebControls.CallbackButton bUpdate;
protected Telerik.WebControls.CallbackButton bUpdate2;
protected System.Web.UI.HtmlControls.HtmlImage Img1;
protected Telerik.WebControls.LoadingPanel LoadingPanel1;
protected System.Web.UI.WebControls.Label lResponseTime;
private void Page_Load(object sender, System.EventArgs e)
{
}
#region Web Form Designer generated code
override protected void OnInit(EventArgs e)
{
//
// CODEGEN: This call is required by the ASP.NET Web Form Designer.
//
InitializeComponent();
base.OnInit(e);
}
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
this.bUpdate.Click += new System.EventHandler(this.bUpdate_Click);
this.bUpdate2.Click += new System.EventHandler(this.bUpdate2_Click);
this.Load += new System.EventHandler(this.Page_Load);
}
#endregion
private void UpdateData()
{
label1.Text = DateTime.Now.ToLongTimeString();
label2.Text = DateTime.Now.ToLongTimeString();
label3.Text = DateTime.Now.ToLongTimeString();
}
private void bUpdate_Click(object sender, System.EventArgs e)
{
bUpdate.ControlsToUpdate.Clear();
UpdateData();
if (cb1.Checked)
{
bUpdate.ControlsToUpdate.Add(label1, LoadingPanel1);
}
if (cb2.Checked)
{
bUpdate.ControlsToUpdate.Add(label2, LoadingPanel1);
}
if (cb3.Checked)
{
bUpdate.ControlsToUpdate.Add(label3, LoadingPanel1);
}
}
private void bUpdate2_Click(object sender, System.EventArgs e)
{
UpdateData();
}
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?