⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rr.aspx.cs

📁 it is designed using asp.net2005 and c#
💻 CS
字号:
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 ImageButton2_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            if (TextBox2.Text.Trim() != "")
                cdrCalendar2.SelectedDate = Convert.ToDateTime(TextBox2.Text);
        }
        catch
        { }
        cdrCalendar2.Visible = true;  //showing the calendar.

    }
    protected void cdrCalendar1_SelectionChanged(object sender, EventArgs e)
    {
        if (cdrCalendar1.SelectedDate >= DateTime.Parse(DateTime.Now.ToShortDateString()))
        {
            TextBox1.Text = cdrCalendar1.SelectedDate.ToShortDateString();
            //TextBox2.Text = cdrCalendar1.SelectedDate.ToString();
            cdrCalendar1.Visible = false; //hiding the calendar.
        }
        else
        {
            TextBox1.Text = "sorry";
        }
    }
    protected void cdrCalendar2_SelectionChanged(object sender, EventArgs e)
    {
        if (cdrCalendar1.SelectedDate >= DateTime.Parse(DateTime.Now.AddDays(1).ToShortDateString()))
        {
            TextBox2.Text = cdrCalendar2.SelectedDate.ToShortDateString();
            cdrCalendar2.Visible = false; //hiding the calendar.
        }
        else
        {
            TextBox2.Text = "sorry";

        }
    }
    protected void ImageButton1_Click(object sender, ImageClickEventArgs e)
    {
        try
        {
            if (TextBox1.Text.Trim() != "")
                cdrCalendar1.SelectedDate = Convert.ToDateTime(TextBox1.Text);
        }
        catch
        { }
        
        cdrCalendar1.Visible = true;
    }
}

⌨️ 快捷键说明

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