0

I want to close radwindow and refresh page. But when I run script, radwindow closed but redirect to hoem page.

 <telerik:RadWindow ID="modalPopup" runat="server" ShowContentDuringLoad="true" VisibleStatusbar="false"
            RegisterWithScriptManager="True" EnableShadow="True" ReloadOnShow="true" Width="760px"
            Height="350px" Modal="True" OpenerElementID="btnAddContact" Skin="WebBlue">
            <ContentTemplate>
                <asp:UpdatePanel ID="Updatepanel2" runat="server" UpdateMode="Conditional">
                    <ContentTemplate>
  <asp:Button ID="btnSave" runat="server" CssClass="acceptBTN btn h4"   Text="ثبت" OnClick="btnSave_Click" />
                                        <input type="button" value="انصراف" class="cancelBTN btn h4"  onclick="CancelClick()" />
                                    </div>
                                </div>
                            </div>
                        </div>
                    </ContentTemplate>
                </asp:UpdatePanel>
            </ContentTemplate>

    function CancelClick() {

        var wnd = $find("<%=modalPopup.ClientID %>");
          wnd.close();
          window.parent.location.reload(true);
          Sys.Application.remove_load(showDialogInitially);
          window.top.location = this;
    }


</script>

List.aspx.cs

string strStartUpScript = string.Format("javascript:CancelClick();"); ScriptManager.RegisterStartupScript(Page, GetType(), "PopupScript", strStartUpScript, true);

user3628391
  • 17
  • 10
  • possible duplicate of [How to close the radwindow on serverside and refresh the parent page](http://stackoverflow.com/questions/15640301/how-to-close-the-radwindow-on-serverside-and-refresh-the-parent-page) – Systematix Infotech Jun 07 '14 at 05:04
  • check this - http://stackoverflow.com/questions/15640301/how-to-close-the-radwindow-on-serverside-and-refresh-the-parent-page – Systematix Infotech Jun 07 '14 at 05:04

0 Answers0