Monday, March 26, 2012

proplem with add ajax control

dir sair

when i add any ajax control in wesite using ajax template i cant using prifix ajaxtoolkit

i must drag and drop the control and his prifix will be cc:

ex: cc1:modelpopupextender

can i know whay?

thank you

here cc1:modelpopupextender means customControl:modelpopupextender

u have to register the AjaxToolKitControl

<%@. Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %>

this line apperd on top of head section like Page

then u can drag and drop the control

that time it will generate ajaxToolkit: modelpopupextender

Thank

Kunal


Hi,

Another tip is that you can register it in web.config so that don't have to do it in everypage.

<system.web>
<pages>
<controls>
<add assembly="AjaxControlToolkit" namespace="AjaxControlToolkit"tagPrefix="ajaxToolkit"/>
<add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"/>
</controls>
</pages>

Hope this helps.

No comments:

Post a Comment