Answered by:
Toolkit, ScriptManager and Master Page

Question
-
User1510859543 posted
Our asp.net site uses master pages on most all pages in the website. I want to make ajaxtoolkit available on all pages that use the master page and only use UpdatePanel on some of those pages. Which control do I use and where should they be placed? On some pages I am getting "Unknown server tag 'asp:CalendarExtender'" message. Thanks.
Monday, January 27, 2014 9:44 AM
Answers
-
User555306248 posted
The reason why you are getting the warning is that you have given the same "TagPrefix", asp, to AJAX toolkit controls. The "asp" TagPrefix is used for ASP.NET controls by default. Just give a different TagPrefix to the AJAX controls and that should solve your problem.
http://ciappara.wordpress.com/2008/05/28/unknown-server-tag-ajaxtoolkitcalendarextender/
http://forums.asp.net/t/1202249.aspx/1
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, January 27, 2014 10:30 PM
All replies
-
User551462331 posted
add toolkitscriptmanager in master page
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server"> </asp:ToolkitScriptManager>
add updatepanel only on those content pages where u want to use it
also, make sure to make changes in web.config after adding reference to ajaxcontroltoolkit assembly
http://www.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx
hope this helps...
Monday, January 27, 2014 9:59 AM -
User1510859543 posted
Can it go anywhere in master page body? Also, does the below need to only be on the master page or on all pages?
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
Monday, January 27, 2014 10:02 AM -
User551462331 posted
Can it go anywhere in master page body?u should place it immediately after form tag in mast page
Also, does the below need to only be on the master page or on all pages?yes... u will have to set register assembly tag only once in master page...
hope this helps...
Monday, January 27, 2014 10:30 AM -
User1510859543 posted
When I take the register line out of the content page that is when I get the Unknown server tag 'asp:CalendarExtender' error.
Monday, January 27, 2014 10:37 AM -
User551462331 posted
add configection element from this link into web.config
http://www.asp.net/ajax/documentation/live/ConfiguringASPNETAJAX.aspx
hope this helps...
Monday, January 27, 2014 10:45 AM -
User555306248 posted
The reason why you are getting the warning is that you have given the same "TagPrefix", asp, to AJAX toolkit controls. The "asp" TagPrefix is used for ASP.NET controls by default. Just give a different TagPrefix to the AJAX controls and that should solve your problem.
http://ciappara.wordpress.com/2008/05/28/unknown-server-tag-ajaxtoolkitcalendarextender/
http://forums.asp.net/t/1202249.aspx/1
- Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
Monday, January 27, 2014 10:30 PM