Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Is this possible to refresh another web page from one webpage

Is this possible to refresh another web page from one webpage

Scheduled Pinned Locked Moved ASP.NET
javascriptdatabasehelp
7 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    kpsetty
    wrote on last edited by
    #1

    hi friends, i am uploading file to the database from a popup page.after pressing the button "Attach" i inserting the document into database and closing the window by using javascript.now i want the parent page to be refreshed.because on that page only the attachment details is listed in datagrid.if it is refreshed then the datagrid will load with updated values.if anyone knows this please help me immediately.

    V 1 Reply Last reply
    0
    • K kpsetty

      hi friends, i am uploading file to the database from a popup page.after pressing the button "Attach" i inserting the document into database and closing the window by using javascript.now i want the parent page to be refreshed.because on that page only the attachment details is listed in datagrid.if it is refreshed then the datagrid will load with updated values.if anyone knows this please help me immediately.

      V Offline
      V Offline
      Vasudevan Deepak Kumar
      wrote on last edited by
      #2

      self.opener.location.reload() or parent.location.reload() Vasudevan Deepak Kumar Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/

      K 1 Reply Last reply
      0
      • V Vasudevan Deepak Kumar

        self.opener.location.reload() or parent.location.reload() Vasudevan Deepak Kumar Personal Web: http://vdeepakkumar.netfirms.com/ I Blog At: http://deepak.blogdrive.com/

        K Offline
        K Offline
        kpsetty
        wrote on last edited by
        #3

        hi vasudevan deepak kumar, the code i done given here. '''''''''''''''''''''''''''''''''''''''''''' these areas are inserting values into databases in button click event '''''''''' Dim strscript As String = "" strscript += "self.opener.location.reload()" 'strscript += "parent.location.reload()" strscript += "self.close()" strscript += "</" + "script>" RegisterClientScriptBlock("anything", strscript) Problem: but this is not working. i don't know y. can u please help me. </x-turndown>

        G 1 Reply Last reply
        0
        • K kpsetty

          hi vasudevan deepak kumar, the code i done given here. '''''''''''''''''''''''''''''''''''''''''''' these areas are inserting values into databases in button click event '''''''''' Dim strscript As String = "" strscript += "self.opener.location.reload()" 'strscript += "parent.location.reload()" strscript += "self.close()" strscript += "</" + "script>" RegisterClientScriptBlock("anything", strscript) Problem: but this is not working. i don't know y. can u please help me. </x-turndown>

          G Offline
          G Offline
          Guffa
          wrote on last edited by
          #4

          Separeate the statements with semicolon. Use window instead of self. Use a parameter in the reload method to force reload of the page rather than just redrawing the page from the browser cache. Dim strscript As String = "<script type=""text/javascript"">" strscript += "window.opener.location.reload(true);" strscript += "window.close();" strscript += "</script>" RegisterClientScriptBlock("anything", strscript) --- b { font-weight: normal; }

          K 1 Reply Last reply
          0
          • G Guffa

            Separeate the statements with semicolon. Use window instead of self. Use a parameter in the reload method to force reload of the page rather than just redrawing the page from the browser cache. Dim strscript As String = "<script type=""text/javascript"">" strscript += "window.opener.location.reload(true);" strscript += "window.close();" strscript += "</script>" RegisterClientScriptBlock("anything", strscript) --- b { font-weight: normal; }

            K Offline
            K Offline
            kpsetty
            wrote on last edited by
            #5

            hi guffa, i had use this code, but the following message displays and the refresh is not happening. msgbox message: "The page cannot be refreshed without resending the information click retry to send the informatyion again, or click cancel to return......." requirement: basically my recuriment is. i am having grid to show the file names, if the user wants to atttach a file then he click the "Attachemnts" button.then the popup window come. there he select a file and click the button attach.after pressing the button the popup window has to be closed and the parent window should be reloaded to show the latestfile names.can u please help me for this.

            G 1 Reply Last reply
            0
            • K kpsetty

              hi guffa, i had use this code, but the following message displays and the refresh is not happening. msgbox message: "The page cannot be refreshed without resending the information click retry to send the informatyion again, or click cancel to return......." requirement: basically my recuriment is. i am having grid to show the file names, if the user wants to atttach a file then he click the "Attachemnts" button.then the popup window come. there he select a file and click the button attach.after pressing the button the popup window has to be closed and the parent window should be reloaded to show the latestfile names.can u please help me for this.

              G Offline
              G Offline
              Guffa
              wrote on last edited by
              #6

              That is beacuse the page is the result of a form post. To reload it without getting the message, you either have to set the location of the page or make the form do a postback. window.opener.location = window.opener.location.href; or window.opener.document.NameOfTheForm.submit(); --- b { font-weight: normal; }

              K 1 Reply Last reply
              0
              • G Guffa

                That is beacuse the page is the result of a form post. To reload it without getting the message, you either have to set the location of the page or make the form do a postback. window.opener.location = window.opener.location.href; or window.opener.document.NameOfTheForm.submit(); --- b { font-weight: normal; }

                K Offline
                K Offline
                kpsetty
                wrote on last edited by
                #7

                hi guffa, thanks for ur reply and i got my expected result from ur solution. bye

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups