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. how do I refresh a page?

how do I refresh a page?

Scheduled Pinned Locked Moved ASP.NET
questioncssdatabasetutorial
7 Posts 5 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.
  • S Offline
    S Offline
    Shimmy Weitzhandler
    wrote on last edited by
    #1

    i have two qustions: 1: how do I refresh the page generally 2: I have a gridview and after I make changes in the data I want the datasource or the grid view to refresh them selves, briefly I want to know how to refresh the gridview content against the database \ datasource

    Shimi

    S G S 3 Replies Last reply
    0
    • S Shimmy Weitzhandler

      i have two qustions: 1: how do I refresh the page generally 2: I have a gridview and after I make changes in the data I want the datasource or the grid view to refresh them selves, briefly I want to know how to refresh the gridview content against the database \ datasource

      Shimi

      S Offline
      S Offline
      sulabh2020
      wrote on last edited by
      #2

      Hi, I got ur Problem tell Me whether you want to refresh the gridview with out rendering the page again or refreshing the whole page. if u want to refresh the datasource of gridview whithout rendering the apge again do usse ajax object. or do use javascript to refresh the whole page after certain period of time.

      Hello Forum Always be in touch to help about the topic ASP.NET

      1 Reply Last reply
      0
      • S Shimmy Weitzhandler

        i have two qustions: 1: how do I refresh the page generally 2: I have a gridview and after I make changes in the data I want the datasource or the grid view to refresh them selves, briefly I want to know how to refresh the gridview content against the database \ datasource

        Shimi

        G Offline
        G Offline
        GDMFSOB
        wrote on last edited by
        #3

        Hi Question 1: <script language="javascript" type="text/javascript"> <!-- function refreshPage() { window.setTimeout('window.location.href="sessionkeepalive.aspx";',300000); } //--> </script> and then in your body tag <body onload="refreshPage()"> gridview refresh after any function like onindexchanged put gridview.databind() after your action

        H S 2 Replies Last reply
        0
        • G GDMFSOB

          Hi Question 1: <script language="javascript" type="text/javascript"> <!-- function refreshPage() { window.setTimeout('window.location.href="sessionkeepalive.aspx";',300000); } //--> </script> and then in your body tag <body onload="refreshPage()"> gridview refresh after any function like onindexchanged put gridview.databind() after your action

          H Offline
          H Offline
          hakervytas
          wrote on last edited by
          #4

          For refresh no nead to write what page, just set location to the same location, for me it works ok on all browsers :) function refreshPage() { window.setTimeout('window.location.href=window.location.href;',300000); }

          1 Reply Last reply
          0
          • S Shimmy Weitzhandler

            i have two qustions: 1: how do I refresh the page generally 2: I have a gridview and after I make changes in the data I want the datasource or the grid view to refresh them selves, briefly I want to know how to refresh the gridview content against the database \ datasource

            Shimi

            S Offline
            S Offline
            Sandeep Akhare
            wrote on last edited by
            #5

            I think you want to refresh the page only when the user Changes the data in the Grid view Just do 2 things 1. Store the data Edited by the user 2. bind the grid view with data source

            Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

            S 1 Reply Last reply
            0
            • G GDMFSOB

              Hi Question 1: <script language="javascript" type="text/javascript"> <!-- function refreshPage() { window.setTimeout('window.location.href="sessionkeepalive.aspx";',300000); } //--> </script> and then in your body tag <body onload="refreshPage()"> gridview refresh after any function like onindexchanged put gridview.databind() after your action

              S Offline
              S Offline
              Shimmy Weitzhandler
              wrote on last edited by
              #6

              when I insert a new row to the database (the adding controls are in the same page) I want after the adding action the grid view to retrieve the updated data from database adding DataBind or GridView.DataBind() after the insertion does not do the trick.

              Shimi

              1 Reply Last reply
              0
              • S Sandeep Akhare

                I think you want to refresh the page only when the user Changes the data in the Grid view Just do 2 things 1. Store the data Edited by the user 2. bind the grid view with data source

                Thanks and Regards Sandeep If If you look at what you do not have in life, you don't have anything, If you look at what you have in life, you have everything... "

                S Offline
                S Offline
                Shimmy Weitzhandler
                wrote on last edited by
                #7

                can you provide the line which refreshes the gridview against the database please? (I'm using an ObjectDataSource to a webservice database, and the database is sometimes updated by other external applications, I want the user to have a refresh button which retrieves the data from db anew). the GridView.DataBind() doesn't help. I prefer to do it by the ASP.NET CLR code rather then by javascript. best regards

                Shimi

                modified on Friday, February 8, 2008 2:13 AM

                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