AJAX ControlKit Tutorials AJAX CalendarExtender Control ASP.NET (C#)


V4 Ajax Tutorials
Server Intellect Cloud Hosting

AJAX ControlKit Tutorials AJAX CalendarExtender Control ASP.NET (C#)

 

AJAX ControlKit Tutorials AJAX CalenderExtender Control ASP.NET (C#)
You are asking yourself why an Ajax CalendarExtender Control. Well in a sense it just makes sense, you take these little awesome widgets & controls for granted because of the simplicity and ease of use. Chances are you if you have purchased air travel fare online in the past few years you have interacted with this Control yourself, and see how easy it was to use? Well this is a simple Ajax Tutorial on how it works and how you can enable it in your Webform or Application.
Also, I just signed up at Server Intellect and couldn't be more pleased with my Windows Server! Check it out and see for yourself.
The CalendarExtender is an ASP.NET AJAX control that is associated with a TextBox control. When the user clicks on the TextBox, a client-side Calendar control pops up. The user can then set a date by clicking on a day, navigate months by clicking on the left and right arrow and perform other such actions without a postback. If you want to popup a Calendar on the click of a button, you can use set the PopupButtonID of the CalendarExtender control to the ID of the button. The calendar extender can switch to year/decade view by clicking on the header.  Clicking the first time brings up a list of months; clicking again brings up a list of years.  The left and right arrow buttons also page through the months or years.
Did you know?
We moved our web sites to Server Intellect and have found them to be incredibly professional. Their setup is very easy and we were up and running in no time.
 

 

Demonstration
In this sample, you will learn how to use a CalendarExtender control in ASP.NET C#
·         First Add New WebForm to this project and name it CalendarSample.aspx.
·         Then Add a ScriptManager to the page.
·         Also Add aTextbox control to the page
·         Then Add a Calendarcontrol extender to the page. Set the target control
The markup of the page will look like
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="CalendarSample.aspx.cs" Inherits="CalendarSample" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
 
<!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 Sample</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
        </cc1:ToolkitScriptManager>
        <asp:TextBox ID="txtDate" runat="server"></asp:TextBox>
        <cc1:CalendarExtender ID="CalendarExtender1" TargetControlID="txtDate" runat="server">
        </cc1:CalendarExtender>
    </div>
    </form>
</body>
</html>
Load the page in browser the calendar is looks like as follows
 
See how simple was that? Such a simple control but it makes life easier for you and your end user.
We thank you for reading another AJAX tutorial on the CalendarExtender control in AJAX ASP.NET.
The Example Above is written with a C# Language. If you have any questions regarding this Tutorial please feel free to comment below and we will try our best to answer your questions.
Also if you needhelp with Windows Dedicated Hosting? Try Server Intellect. I'm a happy customer!


Comments
carlos potenciano said:

very good article !!

Posted Apr 27, 2011 12:13 PM
Louis Vuitton said:

Drive to Stem Shingles Meets Few Expectations

Posted Jul 12, 2011 10:44 PM
Hermes said:

with blue accents

Posted Jul 31, 2011 9:06 PM
www.prada-miumiu.comcom said:

www.prada-miumiu.comcom

Posted Aug 6, 2011 3:25 AM

Leave a Comment