togglebutton.aspx.cs

来自「一个包含AJAX所有功能的示例网站以及源代码,非常好学习!」· CS 代码 · 共 21 行

CS
21
字号
// (c) Copyright Microsoft Corporation.
// This source is subject to the Microsoft Permissive License.
// See http://www.microsoft.com/resources/sharedsource/licensingbasics/sharedsourcelicenses.mspx.
// All other rights reserved.


using System;

public partial class ToggleButton_ToggleButton : CommonPage
{
    /// <summary>
    /// Handles submit button to update the label
    /// </summary>
    /// <param name="sender">source</param>
    /// <param name="e">argument</param>
    protected void Button1_Click(object sender, EventArgs e)
    {
        Label1.Text = string.Format("You indicated that you <b>{0}</b> like ASP.NET and you <b>{1}</b> like ASP.NET AJAX",
            (CheckBox1.Checked ? "do" : "do not"), (CheckBox2.Checked ? "do" : "do not"));
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?