指引网

当前位置: 主页 > 编程开发 > ASP >

一款日期控件

来源:网络 作者:佚名 点击: 时间:2017-06-22 20:38
[摘要] C#版: using System; using System.Web; using System.Web.UI; using System.Collections; using System.Collections.Specialized; using System.Globalization; using System.Reflection; using System.Text; [assembly: AssemblyTitle()] [assembly: Ass
C#版:
using System;
using System.Web;
using System.Web.UI;
using System.Collections;
using System.Collections.Specialized;
using System.Globalization;
using System.Reflection;
using System.Text;
[assembly: AssemblyTitle("")]
[assembly: AssemblyDescription("A QuickStart Tutorial Assembly")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Microsoft QuickStart Tutorials")]
[assembly: AssemblyCopyright(" Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
[assembly: AssemblyVersion("1.1.*")]
namespace Acme
{
public class Calendar : Control, IPostBackEventHandler, IPostBackDataHandler
{
private String[] monthNames = new String[12];
private DateTime currentDate = DateTime.Now;
private String backColor = "#dcdcdc";
private String foreColor = "#eeeeee";
protected override void OnInit(EventArgs E)
{
Page.RegisterRequiresPostBack(this);
currentDate = DateTime.Now;
monthNames[0] = "January";
monthNames[1] = "February";
monthNames[2] = "March";
monthNames[3] = "April";
monthNames[4] = "May";
monthNames[5] = "June";
monthNames[6] = "July";
monthNames[7] = "August";
monthNames[8] = "September";
monthNames[9] = "October";
monthNames[10] = "November";
monthNames[11] = "December";
------分隔线----------------------------