Academic Students Projects | Software School Projects | Free Source Codes | College
Projects By LANGUAGE
Libraries
Articles & seminars
Source Code

The price of the projects include source code, abstract, report and support for development and deployment. Please use our contact us form or send email to Support@srishtis.com

 

 

AJAX-Enabled Advanced Calendar in ASP.NET and C#

Getting Started

We start by registering the AjaxControlToolkit in our project, which will add the .dll and .pdb to our project and modify our Web.config file:
<pages>
<controls>
<add namespace="System.Web.UI" tagPrefix="asp" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
<add tagPrefix="ajaxToolkit" assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"/>
</controls>
<namespaces>
<add namespace="Microsoft.VisualBasic"/>
<add namespace="System.Data"/>
<add namespace="System.Drawing"/>
</namespaces>
</pages>
 
We now can implement the user control into our ASPX page:
<@Control Language="C#" AutoEventWireup="true" CodeFile="Calendar.ascx.cs" Inherits="CalendarControl" %>
<asp:TextBox ID="DateTextFrom" Text="" runat="server" onFocus="javascript:this.blur();" Width="80" autocomplete="off" />
<asp:RequiredFieldValidator ID="DateTextFromRequired" Enabled=true runat="server" ControlToValidate="DateTextFrom" ErrorMessage="Date is required">*</asp:RequiredFiledValidator>
<asp:Panel ID="Panel1" Visible=true runat="server" CssClass="popupControl" style="display:none;">
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>
<center>
<table>
<tr>
<td align="left" bgcolor="#cccccc">
<asp:DropDownList id="drpCalMonth" Runat="Server" AutoPostBack="True" OnSelectedIndexChanged="Set_Calendar" cssClass="calTitle"></asp:DropDownList>
</td>
<td align="left" bgcolor="#cccccc">
<asp:DropDownList id="drpCalYear" Runat="Server" AutoPostBack="True" OnSelectedIndexChanged="Set_Calendar" cssClass="calTitle"></asp:DropDownList>
</td>
</tr>
<tr>
<td colspan="2">
<asp:Calendar ID="Calendar1" runat="server" Width="160px" DayNameFormat="Shortest"
BackColor="White" BorderColor="#999999" CellPadding="1" Font-Names="Verdana" NextMonthText="" PrevMonthText=""
Font-Size="8pt" ForeColor="Black" OnSelectionChanged="Calendar1_SelectionChanged">
<SelectedDayStyle BackColor="#666666" Font-Bold="True" ForeColor="White" />
<TodayDayStyle BackColor="#CCCCCC" ForeColor="Black" />
<SelectorStyle BackColor="#CCCCCC" />
<WeekendDayStyle BackColor="#FFFFCC" />
<OtherMonthDayStyle ForeColor="#808080" />
<NextPrevStyle VerticalAlign="Bottom" />
<DayHeaderStyle BackColor="#CCCCCC" Font-Bold="True" Font-Size="7pt" />
<TitleStyle BackColor="#999999" Font-Size="7pt" BorderColor="Black" Font-Bold="True" />
</asp:Calendar>
</td>
</tr>
</table>
</center>
</ContentTemplate>
</asp:UpdatePanel>
</asp:Panel>
<ajaxToolkit:PopupControlExtender ID="PopupControlExtender1" runat="server"
TargetControlID="DateTextFrom"
PopupControlID="Panel1"
Position="Bottom" />
Download this code