refresh page

Results 1 to 2 of 2

Thread: refresh page

  1. #1
    Join Date
    Dec 1969

    Default refresh page

    I have an edit page in place. When I click the update button, the information gets successfully updated and the message states that. Is there a way to when that sequence fires off, to do a page.refresh, so I have updated content on the page. <BR><BR>If I hit the refresh button on the browser, everything refreshes how it should, but I want to automate that.<BR><BR>str = "UPDATE header SET " & _<BR>"realtor_name=&#039;" & request.form("realtor_name") & "&#039;, " & _<BR>"email_address=&#039;" & request.form("email_address") & "&#039; " & _<BR>"WHERE ID =" & intID<BR><BR>cmd = New OleDbCommand( str, conn )<BR> <BR>conn.Open()<BR> cmd.ExecuteNonQuery()<BR> lblUpdate.text = "Update was successful!<BR>// i assume the "refesh" code should go here.<BR>conn.Close()

  2. #2
    Join Date
    Dec 1969

    Default RE: refresh page

    yes. you are doing a PostBack. just look at the logic of your code and make sure that ALL of the work gets done with every post-back.<BR><BR>for example, you want to eliminate anything that looks like "IF NOT Page.IsPostBack..." it is quite likely that such a line is in your code someplace and causing your issue.<BR><BR>or, perhaps you might need to put some of the code in your Page_Load sub into a different sub that can be called both from your Page_Load sub and from your button click handling sub. but i dont think that is the best approach. it might even cause problems<BR><BR>thirdly, i usually use label controls in a separate section of html that gets displayed after the button click routine has been processed. i put one block of html in a table for the form and another block of html in a table for the change confirmation. each of these tables has its own id and my code makes either one visible or invisible depending on where the user is in their pocess. the confirmation block of html contains label controls that spell out the data that was changed in the database<BR><BR>these will require a higher overhead, but everything has a price.<BR><BR>hey, if this helps, i have a problem that i posted above yours that i would like some help on too.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts