This is a migrated thread and some comments may be shown as answers.

Ajaxify problem

3 Answers 66 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Jack
Top achievements
Rank 1
Jack asked on 10 Oct 2008, 06:40 PM
Hi,

I try to ajaxify a asp:button with RadAjaxManager, but when i click on button the property RadAjaxManager1.IsAjaxRequest is always FALSE. 

<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server"
        <AjaxSettings> 
            <telerik:AjaxSetting AjaxControlID="btnSave"
                <UpdatedControls> 
                    <telerik:AjaxUpdatedControl ControlID="pnlDialog" /> 
                    <telerik:AjaxUpdatedControl ControlID="RadAjaxManager1" /> 
                </UpdatedControls> 
            </telerik:AjaxSetting> 
        </AjaxSettings> 
    </telerik:RadAjaxManager> 

I can't use RegisterScript because that server-side: (VB)
If RadAjaxManager1.IsAjaxRequest Then 
      RadAjaxManager1.ResponseScripts.Add("CloseWithCallBack('" & args & "');"
End If 

My Javascript function never call..

Ty for your help.

3 Answers, 1 is accepted

Sort by
0
Vlad
Telerik team
answered on 13 Oct 2008, 06:16 AM
Hello Jack,

Generally RadAjaxManager will update itself every time and that is why you do not need to update the manager explicitly. Can you please remove this setting:

<telerik:AjaxUpdatedControl ControlID="RadAjaxManager1" />

and let me know about the result?

Kind regards,
Vlad
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Jack
Top achievements
Rank 1
answered on 14 Oct 2008, 12:19 PM
I tried with and without RadAjaxManager1 UpdatedControl, no result.

I migrate my page from old telerik control to promoteus control and doesn't work since that.

Vlad could you say to me the best practice to call a javascript function from server-side?

My context it's i want to call javascript function to close my radwindow with return. I though ajaxify my asp:button was the best practice.

Ty

0
Maria Ilieva
Telerik team
answered on 16 Oct 2008, 02:09 PM
Hello Jack,

In this scenario you could try to execute a javascript function after the ajax request. For more information on this approach please review the following forum post.

Regards,
Maria Ilieva
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Ajax
Asked by
Jack
Top achievements
Rank 1
Answers by
Vlad
Telerik team
Jack
Top achievements
Rank 1
Maria Ilieva
Telerik team
Share this question
or