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

AjaxManager Breaks Javascript

0 Answers 12 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
L
Top achievements
Rank 1
L asked on 08 Apr 2017, 02:02 PM
hi

It seems that Ajax Manager could not execute javascript at code behind. I am trying to disable a button when click and i could get to work because of the ajax manager. How should I solve this? Thanks a lot.

 

 <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" UpdatePanelsRenderMode="Inline">
            <AjaxSettings>
                <telerik:AjaxSetting AjaxControlID="btnSearch">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="txtRemarks" UpdatePanelCssClass="" />
<telerik:AjaxUpdatedControl ControlID="btnSave" UpdatePanelCssClass="" />
                     </UpdatedControls>
                </telerik:AjaxSetting>
                <telerik:AjaxSetting AjaxControlID="btnCancel">
                    <UpdatedControls>
                        <telerik:AjaxUpdatedControl ControlID="btnCancel" UpdatePanelCssClass="" />
                    </UpdatedControls>
                </telerik:AjaxSetting>
            </AjaxSettings>
</telerik:RadAjaxManager>


 protected void Page_Load(object sender, EventArgs e)
    {

        string var = ClientScript.GetPostBackEventReference(btnSave, "").ToString();
        btnSave.Attributes.Add("onClick", "javascript :if ( Page_ClientValidate() ){this.disabled=true; this.value='Please Wait.....';" + var + "};");

        if(!IsPostBack)
        {
           

        }
    }

No answers yet. Maybe you can help?

Tags
Ajax
Asked by
L
Top achievements
Rank 1
Share this question
or