Click here to Skip to main content
15,895,746 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
please resolve this.. I used ajax calender extender but it shows A scriptManager is required on the page to use asp.net ajax script component.
Posted
Comments
Sergey Alexandrovich Kryukov 26-May-15 3:56am    
What is calender? :-)
—SA
[no name] 26-May-15 3:59am    
<cc1:CalendarExtender ID="TextBoxDate_CalendarExtender" runat="server"
TargetControlID="TextBoxDate" Format="MM/dd/yyyy">
[no name] 26-May-15 6:36am    
Yes realy it works
Andy Lanng 26-May-15 4:41am    
Have you included a scriptmanager on the page?

Are there other pages where this works?
[no name] 26-May-15 5:43am    
no.why is that neccessary.. what can i do now

1 solution

A script manager enables the code-behind to safely add scripts to the web page.

A page can have either zero or one scriptmanager. More than one will cause an error. It must be within the form and before any controls that may use it.

just add this to the form:

ASP.NET
<form>
<asp:ScriptManager ID="ScriptManager1"
                               runat="server" />
....

</form>


It's pretty useful if you have controls that require scripts on the page. You can add scripts (.js files) and give them a name. If you check to make sure that the script hasn't already been added then you can add many controls onto the page, ensuring that the required scripts are added only once.

That is what the AJAX Calendar control does. It requires scripts on the page so it uses the scriptmanager to manage them.


Further reading on the scriptmanager can be found here:

https://msdn.microsoft.com/en-us/library/bb398863%28v=vs.140%29.aspx[^]
(as well as many other examples online)


I hope that helps.

Let us know if you get stuck again

Remember: Only 1 scriptmanager may exist on a page.

Regards
Andy ^_^
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900