Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 4 > BOOK: Beginning ASP.NET 4 : in C# and VB
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old August 17th, 2011, 05:00 AM
Authorized User
 
Join Date: Jun 2010
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default How to createTextbox with calender Extender ?

I have downloaded ajax toolkit and installed it sucessfully.

and put the following code


<div>
<asp:TextBox
ID="TextBox1"
runat="server"
width="300pt" />
<asp:ImageButton
ID="btnCalenderPopup"
Width="16" Height="16"
runat="server"
ImageUrl="~/images/calender.bmp"
CausesValidation="False" />
<ajaxToolkit:CalendarExtender
ID="CalendarExtender1"
runat="server"
TargetControlID="TextBox1"
PopupButtonID="btnCalenderPopup"
Format="dd/MM/yyyy" />

</div>



But I am getting this error. Pls check it...


*Error Creating Control - CalendarExtender1This control cannot be displayed because its TagPrefix is not registered in this Web Form.*
 
Old August 17th, 2011, 05:32 AM
Authorized User
 
Join Date: Aug 2011
Posts: 14
Thanks: 1
Thanked 0 Times in 0 Posts
Smile

Hi Abhishek,

First put this before form
<%@ Register assembly="AjaxControlToolkit" namespace="AjaxControlToolkit" tagprefix="asp" %>
and then write this inside form
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager2" runat="server">
</asp:ToolkitScriptManager>

and now ur design code shud be like this

<div>
<asp:TextBox
ID="TextBox1"
runat="server"
width="300pt" />

<asp:ImageButton ID="btnCalenderPopup" Width="89px" Height="27px"
runat="server"
ImageUrl="~/images/calender.JPG"
CausesValidation="False" />
<asp:CalendarExtender ID="TextBox1_CalendarExtender" runat="server"
PopupButtonID="btnCalenderPopup" TargetControlID="TextBox1">
</asp:CalendarExtender>
</div>
</form>


Cheers
Emma





Similar Threads
Thread Thread Starter Forum Replies Last Post
I have a working ajax slideshow extender but i want to enable the user to skip slides tigre82 ASP.NET 4 General Discussion 0 February 12th, 2011 11:52 AM
Ajax Extender Controls not working dotnetDeveloper ASP.NET 4 General Discussion 1 May 27th, 2010 04:33 PM
Masked edit extender problem abhishekkashyap27 Ajax 0 May 13th, 2010 07:20 AM
Validator Callout Extender CSS modification, asp.net, ajax kumiko ASP.NET 3.5 Basics 2 July 27th, 2009 09:35 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.