Namespace Calendar
{
Using System;
Using System.Data;
Using System.Drawing;
Using System.Web;
Using System.Web.UI.WebControls;
Using System.Web.UI.HtmlControls;
<summary>
Summary description of the Ctlcalendar.
</summary>
public class CtlCalendar:System.Web.UI.UserControl
{
protected System.Web.UI.WebControls.TextBox TextBox1;
protected System.Web.UI.WebControls.Panel Pnlcalendar;
protected System.Web.UI.HtmlControls.HtmlInputButton Button1;
protected System.Web.UI.WebControls.Calendar Calendar1;
private void Page_Load (object sender, System.EventArgs e)
{
Place user code here to initialize page
if (! Page.IsPostBack)
{
This. TextBox1.Text = System.DateTime.Now.ToShortDateString ();
THIS.PNLCALENDAR.ATTRIBUTES.ADD ("Style", "display:none; Position:absolute ");
}
Else
{
String id = page.request.form["__eventtarget"]. Substring (0,page.request.form["__eventtarget"). IndexOf (":"));
if (ID!= this.id)
{
THIS.PNLCALENDAR.ATTRIBUTES.ADD ("Style", "display:none; Position:absolute ");
}
Else
{
THIS.PNLCALENDAR.ATTRIBUTES.ADD ("Style", "Position:absolute");
}
Code generated #region the Web forms Designer
Override protected void OnInit (EventArgs e)
{
//
CodeGen: This call is required for the ASP.net Web forms Designer.
//
InitializeComponent ();
Base. OnInit (e);
}
<summary>
Designer supports the desired method-do not use the Code Editor
Modify the contents of this method.
</summary>
private void InitializeComponent ()
{
This. Calendar1.selectionchanged + = new System.EventHandler (this. calendar1_selectionchanged);
This. Load + = new System.EventHandler (this. Page_Load);
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.