Link to home
Start Free TrialLog in
Avatar of jaws1021
jaws1021

asked on

ajax tool kit

I have installed ajax tool kit and I am trying to use modelpopup, where I need to put this sample code? When I put it it says Unrecognized tag prefix or device filter 'ajaxToolkit'.      I did created a new tab called ajax toolkit on my toolbox. Also, if I tried to drag and drop this modekpopup it does give me code like that starts with cc1

<cc1:ModalPopupExtender ID="ModalPopupExtender1" runat="server"  TargetControlID="LinkButton1" PopupControlID="Panel1" backgroundcssclass="modalBackground" dropshadow="true" okcontrolid="OkButton" onokscript="onOk" cancelcontrolid="CancelButton" PopupDragHandleControlID="Panel3">
    </cc1:ModalPopupExtender>--%>


<ajaxToolkit:ModalPopupExtender ID="MPE" runat="server">
        TargetControlID="LinkButton1"
    PopupControlID="Panel1"
    BackgroundCssClass="modalBackground"
    DropShadow="true"
    OkControlID="OkButton"
    OnOkScript="onOk()"
    CancelControlID="CancelButton"
    PopupDragHandleControlID="Panel3" />
Avatar of chinu1310
chinu1310
Flag of United States of America image

Did you put Ajax.dll into bin folder and add reference ?
Avatar of jaws1021
jaws1021

ASKER

I did put this ajax.dll to bin but I guess i didn't add the reference, what I need to do for reference?
In  the solution explorer  
right click on the porject name >
Add Reference

click on browse and browse the BIN directory of your project
Select Ajax.dll and you are ready to go.
I did still same error
ASKER CERTIFIED SOLUTION
Avatar of chinu1310
chinu1310
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thank you so much it worked now.. I had to change prefx to cc1 to ajaxtoolkit that's why it was complaining.
One more thing if you don't mind, I have my linkbutton inside the datagrid and I want to put modelpopextender somewhere put where so I can target to linkbutton. It doesn't like it when I put inside the datagrid, it doesn't recognize it  if I put outside the datagrid either..

Thanks
When you put control inside another control.
You have to use the FIndControl Method.

Say if the textbox is inside the Gridview than

GridView.FindContrl("textboxcontrol id");

Hope it helps.
I am familiar with Findcontrol but you do that on server side right, plus I have this code should be in clientside aspx page is in it?

<ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server" TargetControlID="LinkButton1" PopupControlID="Panel1" BackgroundCssClass="modalBackground" DropShadow="true"  OkControlID="OkButton"  OnOkScript="onOk()" CancelControlID="CancelButton" PopupDragHandleControlID="Panel3">
    </ajaxToolkit:ModalPopupExtender>
I dnt understand what you are looking for. Can you be little more specific ?
I have a link button inside the datagrid, when it is clicks this modelpopup will be showing it will have only one dropdown and ok button cancel button. How can I do? I thought I need to use this code above, but I don't know where to put the code inside the datagrid or outside? If it  is long thing I 'll be glad to create a new question?
Ya.  It would be better if you open new question.
You can get various idea.
I think you need t create dynamic object of this control.
Okay thanks, I will call my question name linkbutton and modelpopup if you are interested in looking into..
Sure. Glad to help you.