AJAX calendar control

G

George

How do I tell script manager to load necessary JavaScript files to support
CalendarBehavior.

If I drop Calendar control on the page it's done automatically. But I do not
have CalendarControl on the page. My JavaScript code will attach it in
runtime but I need to be able to load JavaScript files that support
CalendarBehaviour...

Thanks
George.
 
G

George

Finally found an answer

<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.Common.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.Threading.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Animation.Animations.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.PopupExtender.PopupBehavior.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Animation.AnimationBehavior.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.DateTime.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Compat.Timer.Timer.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Calendar.CalendarBehavior.js" />
</Scripts>
</asp:ScriptManager>


Here is list of scripts needs to be added for each control
http://mattberseth2.com/demo/Default.aspx?Name=AjaxControlToolkit+Script+Browser&Filter=All

George.
 
G

George

I have AJaxControlToolkit.dll in my project.
There is no problem with CalendarControl. It's just I do not want to drop it
on my page.
I use JavaScript code to attach CalendarBehaviour to my input box.

Like this
$create(AjaxControlToolkit.CalendarBehavior,
{ "button":$get("imgCal1"),
"format":"MM/dd/yy",
"id":"CalendarExtender1"
},
null,
null,
$get("txtDate1")
);

I just need to make AjaxControlToolkit.CalendarBehavior available by
including proper Javascript files.

PS: Problem was solved by adding following lines to ScriptManager.

<asp:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.Common.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.ExtenderBase.BaseScripts.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.Threading.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Animation.Animations.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.PopupExtender.PopupBehavior.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Animation.AnimationBehavior.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Common.DateTime.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Compat.Timer.Timer.js" />
<asp:ScriptReference Assembly="AjaxControlToolkit"
Name="AjaxControlToolkit.Calendar.CalendarBehavior.js" />
</Scripts>
</asp:ScriptManager>


George
 
M

Marc

David Wier said:
Try adding the AjaxControlToolkit.dll to your toolbox
I normally create a new tab for it and just add it in

I get an error saying assembly cannot be found when I try this in Visual
Studio 2005. Odd, it worked fine at work.

Marc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top