Hi,
I am using a Master page and there is a Webform inside the master page.
There is a text box control for which i have added Ajax Calendar extender.
When I run the project, I am not getting the calendar control when i click on the text box.
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Tickets.aspx.cs" Inherits="Tickets" %>
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<div id="TicketsDiv">
<table border="1" style="margin-left:300px; margin-top:100px; border-color:Blue;">
<tr>
<td colspan="8" style="font-size:18px; font-weight:bolder; text-align:center; border-width:0px">Ticket Handling Details</td>
</tr>
<tr>
<td style="font-size:larger; border-width:0px">Ticket Number :</td>
<td style="border-width:0px"><asp:TextBox ID="txtTicketNo" runat="server" Width="130px" Font-Size="Larger" ForeColor="Blue"></asp:TextBox></td>
<td style="font-size:larger; border-width:0px"><asp:Label ID="lblTimespent" runat="server" Text="Time Spent:" Width="140px"></asp:Label></td>
<td style="border-width:0px"><asp:Label ID="lblhrs" runat="server" Text="Hours:" Width="60px" style="text-align:right"></asp:Label></td>
<td style="border-width:0px"><asp:TextBox ID="txtHours" runat="server" Width="30px" MaxLength="2" Font-Size="Larger" ForeColor="Blue"></asp:TextBox></td>
<td style="font-size:larger; border-width:0px"><asp:Label ID="lblMins" runat="server" Text="Minutes:"
Width="80px" style="text-align:right"></asp:Label></td><td style="border-width:0px"><asp:TextBox ID="txtMinutes" runat="server" Width="30px" MaxLength="2" Font-Size="Larger" ForeColor="Blue"></asp:TextBox></td>
<td style="border-width:0px; font-size:larger; text-align:right;"><asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
</asp:ToolkitScriptManager>
<asp:TextBox ID="txtDate" runat="server" Font-Size="Larger" ForeColor="Blue" Width="90px" ReadOnly="true"></asp:TextBox><asp:Image ID="ImgCalendar" runat="server" ImageUrl="~/images/CalendarImg.png" Height="30px" Width="30px" />
<asp:CalendarExtender ID="txtDate_CalendarExtender" runat="server"
DefaultView="Days" Enabled="True" PopupPosition="BottomLeft"
TargetControlID="txtDate" PopupButtonID="ImgCalendar">
</asp:CalendarExtender>
</td>
</tr>
<tr><td colspan="8" style="border-width:0px; text-align:center" ><asp:Button ID="CmdSaveTicket" runat="server" Width="140px" ForeColor="Blue" Font-Bold="true" Text="Save" Height="25px"/></td></tr>
</table>
</div>
</asp:Content>
- here is the code. Now I am able to get the calendar.
What i did was:
just i putted the :
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
in masterPage.
Kindly Suggest where I am going wrong?