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. General Programming
  3. C#
  4. Variable problem

Variable problem

Scheduled Pinned Locked Moved C#
helpdatabasemysql
2 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.
  • T Offline
    T Offline
    truly_pringled
    wrote on last edited by
    #1

    On my web form I have a text box, that when the form loads it get a string of text from a MySQL database and set the text box property as the string. So then you can edit the text. Then I have a button next to it that when you press it should put the text in the text box in to the database. But it never changes the information in the database. I think the problem might be to do with when I press the button it refreshes the page, therefor resetting the information in the text box and putting the original text back in to the database. Any help will be very much appreciated Thanks.

    K 1 Reply Last reply
    0
    • T truly_pringled

      On my web form I have a text box, that when the form loads it get a string of text from a MySQL database and set the text box property as the string. So then you can edit the text. Then I have a button next to it that when you press it should put the text in the text box in to the database. But it never changes the information in the database. I think the problem might be to do with when I press the button it refreshes the page, therefor resetting the information in the text box and putting the original text back in to the database. Any help will be very much appreciated Thanks.

      K Offline
      K Offline
      kubben
      wrote on last edited by
      #2

      I am guessing that your onLoad event is always populating the text box. I think you may want to use the IsPostBack to see if you are doing a page load from your button click. So you only set the data from the text box if !IsPostBack or Not IsPostBack in VB. Hope that helps. Ben

      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