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

RadAjaxManager And Javascript Issue

1 Answer 60 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
avinash
Top achievements
Rank 1
avinash asked on 04 Oct 2012, 01:32 PM
Hello there,

I am developing a web application using rad controls. I am using radwindow for popup, in one of the radwindow there is a radbutton with other controls like textbox, dropdown. My requirement is to apply ajaxify and show loading panel after radbutton click.

As a solution I have registered radajaxmanager and radajaloadingpanel on master page.

 <telerik:RadAjaxManager ID="rAjaxManagerPopUp" runat="server" >
    </telerik:RadAjaxManager>
    <telerik:RadAjaxLoadingPanel ID="rLoadingPanel" ZIndex="8001" Skin="MyCustomSkin"
        EnableEmbeddedSkins="false" runat="server">
    </telerik:RadAjaxLoadingPanel>

and write this code on aspx.cs

                RadAjaxManager radAjaxManager = Content("rAjaxManagerPopUp") as RadAjaxManager;
                RadAjaxLoadingPanel radAjaxLoadingPanel = Content("rLoadingPanel") as RadAjaxLoadingPanel;
                if (radAjaxManager != null)
                {
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, pnlPaymentConfirmation);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, rBtnSubscribe, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(rBtnSubscribe, pnlPaymentConfirmation, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(radAjaxManager, rBtnSaveNSubscribe, radAjaxLoadingPanel);
                    radAjaxManager.AjaxSettings.AddAjaxSetting(rBtnSaveNSubscribe, pnlPaymentConfirmation, radAjaxLoadingPanel);
                }
after these changes I able to show loading panel on Radwindow Popup. But beacuse of these change I am not able to call registered javascript function on aspx.cs
e.g
               String script = "<script language='javascript' type='text/javascript'>Sys.Application.add_load(BillingInfoKeepInEditMode); </script>";
           Page.ClientScript.RegisterStartupScript(this.GetType(), "BillingInfoKeepInEditMode", script);

Please help me to resolved this issue.
its very urgent

Thanks,
Avinash





1 Answer, 1 is accepted

Sort by
0
Andrey
Telerik team
answered on 09 Oct 2012, 08:37 AM
Hi,

You could try to get a reference to the RadAjaxManager using the GetCurrent method of the RadAjaxManager class. Additionally, you could try to use Page.GetType() instead of this.GetType().

If that does not help please share your full page source code along with the code-behind file content. Thus all the people who want to help you will have better understanding of your case.

All the best,
Andrey
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Tags
Ajax
Asked by
avinash
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Share this question
or