Thursday 4 August 2016

write a program to display calendar control in asp.net

calander.aspx

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="calander.aspx.cs" Inherits="our_program.calander" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>calendar</title>
    
    <center><h1>Calandar</h1></center>
</head>
<body>
    <form id="form1" runat="server">
    
    <div>
    <center>
    <asp:Calendar ID="Calendar1" runat="server" DayHeaderStyle-BackColor="Blue" WeekendDayStyle-BackColor="Red" BackColor="Yellow" ></asp:Calendar>
    </center>
    </div>
    </form>
</body>
</html>

calander.aspx.cs

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace our_program
{
    public partial class calander : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {

        }
    }

}

No comments:

Post a Comment