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. Problem with page post back

Problem with page post back

Scheduled Pinned Locked Moved ASP.NET
databasetoolshelpquestionannouncement
3 Posts 2 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.
  • G Offline
    G Offline
    Gretna
    wrote on last edited by
    #1

    I have a web page with a table with in a scroll pane that lists a selection of data from a database. They can set different parameters to filter the results shown. via a series of pop up selections like a calendar to set the date and so on. Then they can click a button to refresh the results in the table. Obviously I want to check to make sure that the values they have selected are in the correct format so i added this code to the button that they press to do the update. The problem was that it was updating the whole page and reseting the textboxes to their default values. I then added an ajax update panel and script manager and the panel holds the table where the results are displayed so it only updates this on the screen. The problem now is that it ignores the validation. Thank you in advance :)

    "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

    C 1 Reply Last reply
    0
    • G Gretna

      I have a web page with a table with in a scroll pane that lists a selection of data from a database. They can set different parameters to filter the results shown. via a series of pop up selections like a calendar to set the date and so on. Then they can click a button to refresh the results in the table. Obviously I want to check to make sure that the values they have selected are in the correct format so i added this code to the button that they press to do the update. The problem was that it was updating the whole page and reseting the textboxes to their default values. I then added an ajax update panel and script manager and the panel holds the table where the results are displayed so it only updates this on the screen. The problem now is that it ignores the validation. Thank you in advance :)

      "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      lose the AJAX, do validation on the client side, in javascript, and use a !IsPostback block to stop your code from resetting the values on every postback.

      Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

      G 1 Reply Last reply
      0
      • C Christian Graus

        lose the AJAX, do validation on the client side, in javascript, and use a !IsPostback block to stop your code from resetting the values on every postback.

        Christian Graus No longer a Microsoft MVP, but still happy to answer your questions.

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

        ditched the ajax and added the !IsPostBack but it is still resetting all the text boxes to their default values. I think i've found out why in that i'm using javscript to get a value from a popup window and everytime the button to refresh the table is pressed it goes through the javascript functions. Thanks for the help

        "When will I learn? The answers to life's problems aren't at the bottom of a bottle. They're on TV" - Homer Simpson

        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