Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 374
  • Last Modified:

ASP.Net/VB - Need to refresh showmodaldialog from another page - Need jedi

Hello all,

I have a aspx page that in my code behind I call showmodaldialog.  This opens a popup form and then the user clicks page down on that dialog which calls another processing page on the form action submit.

After my code runs on the processing page in the page load, I want to close that processing window immediately and refresh the modal aspx page so a page load occurs.  I added <base TARGET="_self"> to the modal dialog header as well.  Any idea?

I have tried the following in my processing page after the code runs the save:

  Dim scriptString As New StringBuilder

            scriptString.append("<script language=JavaScript>")
            scriptString.Append("opener.location.reload();")
            scriptString.Append("window.close();")
            scriptString.Append("return false;")
            scriptString.Append("</script>")

            If (Not IsStartupScriptRegistered("Startup")) Then
                RegisterStartupScript("Startup", scriptString.ToString)
            End If

But still not working.  Thanks for any help
0
sbornstein2
Asked:
sbornstein2
1 Solution
 
AsishRajCommented:
Below works for me perfectly

Open in new window

function PopUpFunction()
{    
    var WinSettings = "center:yes;resizable:no;dialogwidth: 400px;dialogHeight:300px"
    var MyArgs = window.showModalDialog("PopUPpagetoOpen.aspx", '', WinSettings);
    window.location.reload();
}

<asp:LinkButton ID="Link_NewCity" runat="server" CssClass="NoteExample" OnClientClick="CreateNewCity()"  >New City</asp:LinkButton>

Open in new window

0
 
sbornstein2Author Commented:
i posted on the other post it looks like your doing the reload from the same call and page that is not what I am trying to do.  I need to reload the modal from another page.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now