Variable problem
-
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.
-
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.
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