| | |
save textbox values to database
Please support our ASP.NET advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Apr 2007
Posts: 30
Reputation:
Solved Threads: 0
hi.
i use a textbox (i also tried with a textarea) in asp .net2.0 to show some text from a data base. till this point, everything's ok. my problem starts when i try to change the text and update the new value to the data base. the value updated is always the old one...
i use this line to give the textbox the value of the data base
txt1.text = dbdatareader.item(0) (funny part is that if i delete this line it works perfectly, but i new to show the database value)
please help me
i use a textbox (i also tried with a textarea) in asp .net2.0 to show some text from a data base. till this point, everything's ok. my problem starts when i try to change the text and update the new value to the data base. the value updated is always the old one...
i use this line to give the textbox the value of the data base
txt1.text = dbdatareader.item(0) (funny part is that if i delete this line it works perfectly, but i new to show the database value)
please help me
Hello,
It sounds like you are populating the textbox on load but you are not wrapping a check to see if the page has posted back around the databind.
For example...
Becomes...
It sounds like you are populating the textbox on load but you are not wrapping a check to see if the page has posted back around the databind.
For example...
ASP.NET Syntax (Toggle Plain Text)
Textbox1.Text = dbdatareader.item(0)
Becomes...
ASP.NET Syntax (Toggle Plain Text)
If Not.PageIsPostback Then Textbox1.Text = dbdatareader.item(0) End If
Last edited by Blackred; Apr 20th, 2007 at 7:58 am.
This station is non-operational.
![]() |
Similar Threads
- Save the values of a form (HTML and CSS)
- jsp code for values from database to textbox (JSP)
- i cant save data on an access database (C#)
- how to write the textbox values into a file (JSP)
- Send all items in a listBox to SQL server database table (ASP.NET)
- Passing values to a url and storing in database (JSP)
- how willl i be able to save a specific record into my database file in ms access (Java)
Other Threads in the ASP.NET Forum
- Previous Thread: How to set attribute to the controls in datagrid?
- Next Thread: AutoComplete TextBox
| Thread Tools | Search this Thread |
.net 2.0 3.5 activexcontrol advice ajax alltypeofvideos asp asp.net bc30451 bottomasp.net browser businesslogiclayer button c# c#gridviewcolumn checkbox child click commonfunctions compatible confirmationcodegeneration content contenttype countryselector courier css dataaccesslayer database datagrid datagridview datagridviewcheckbox datalist deadlock development dgv dropdownlist dropdownmenu edit expose feedback flash flv form formatdecimal forms formview gridview homeedition hosting iframe iis javascript jquery list listbox login menu microsoft mono mouse mssql multistepregistration nameisnotdeclared news numerical objects order panelmasterpagebuttoncontrols radio ratings rotatepage save schoolproject search security serializesmo.table silverlight smartcard sql-server sqlserver2005 suse textbox tracking typeof unauthorized validation vb.net video videos virtualdirectory vista visual-studio visualstudio web webarchitecture webdevelopemnt webservice xml youareanotmemberofthedebuggerusers





