18 Eylül 2012 Salı

using CalendarExtender

here is some useful links to use CalendarExtender

lets summarize the process:

  • install ajax control toolkit  ( http://ajaxcontroltoolkit.codeplex.com/) to your project via Visual Studio package manager console with command Install-Package AjaxControlToolkit. This creates packages folder in your repository and downloads the assemblies in that folder.. 
  • in your Web.config file add these two statements:
    • <add assembly="AjaxControlToolkit"/> This line goes under configuration->system.web->compilation->assemblies tag.
    • < add tagPrefix= " ajaxToolkit "  assembly= " AjaxControlToolkit "  namespace= " AjaxControlToolkit "  / > This line goes under configuration->system.web->pages->controls tag.
  • use the control as follows:
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix= " cc1" %>

<asp:TextBox ID="TextBoxDogumTarihi" runat="server"/>
<asp:Image ID="ImageDogumTarihi" runat="server" ImageUrl="../images/calendar.png" />
<cc1:CalendarExtender ID="CalendarDogumTarihi" TargetControlID="TextBoxDogumTarihi" runat="server"
                                        PopupPosition="Right"   PopupButtonID="ImageDogumTarihi"   />

In the following image, the above is a CalendarExtender whereas the below is a styled asp.net calendar.

 to customize CalendarExtender see http://www.ezineasp.net/post/Customized-AJAX-Calendar-Control-CSS-Example.aspx

Hiç yorum yok:

Yorum Gönder