Monday, March 26, 2012

ajax toolkit tags

hi, i was just wondering because as i've seen in the examples in this forum, when adding an ajax toolkit, in the source code, you can see <ajaxToolkit:SomeToolkit> if i am not mistaken. but when i try to drag a toolkit to the page, or add a toolkit, the tag is different, like <cc1:SomeToolkit>. this puts me to confusion and i am worried that if i upload this to my host, it will not be recognized by the host and i will be obliged to change it manually. what if i have 50 pages that uses 5-8 ajax toolkits? its really a hard work. but this is just an example. maybe you guys can shed light on this. thank you.

Refer to the following link to understand where the tagprefix comes from and their significance

http://www.microsoft.com/mspress/books/sampchap/5728d.aspx#124

As to your worry about different tagprefixes causing problem, it is unfounded.

The declaration at the top of your aspx page e.g.

<%@. Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>

and the control tagprefix need to match.

<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>

Other than this all your pages could have different tagprefixes.

No comments:

Post a Comment