473,382 Members | 1,622 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

textbox.

i have a textbox that i need to edit. First i populate it with the
data from my sql table. afterwards i make changes on them.. and then
when i clicked the save button, i noticed that the textbox value still
contains the original value. the changes i made on the textbox wasnt
saved at all.. The textbox.text was part of my UPDATE statement.
anybody??
TIA.
Nov 18 '05 #1
3 1218
Without seeing the code, I can make a guess...

Are you, by chance, populating the textbox with text from the database
BEFORE your UPDATE statement? Just for testing, try using
Request.Form("textboxname") in your UPDATE statement instead of
textbox.text. If my above guess is correct, this will sort-of fix it. I
say sort-of because after submitting the page, the text box will still show
the original value - it will only show the new value on subsequent page
views. To fix this, reset the textbox.text value to
Request.Form("textboxname") after the UPDATE statement as well.

If you work out that this is indeed the problem, you can restructure the
order of your function calls. Or, if it's too much hassle to change
everything, you can just implement the above example and leave it alone! ;)

Eric
"Joriz" <go****@joriz.is-a-geek.net> wrote in message
news:7d**************************@posting.google.c om...
i have a textbox that i need to edit. First i populate it with the
data from my sql table. afterwards i make changes on them.. and then
when i clicked the save button, i noticed that the textbox value still
contains the original value. the changes i made on the textbox wasnt
saved at all.. The textbox.text was part of my UPDATE statement.
anybody??
TIA.

Nov 18 '05 #2
thanks Eric..
i had a careless mistake. coz i did it in load event. i forgot to put
a IsPostBack. Thats why everytime my page loads, the changes i made
were overwritten by the original values. and by the time the update
statements occurs its all already in its original value.

sorry for that...
Nov 18 '05 #3
thanks Eric..
i had a careless mistake. coz i did it in load event. i forgot to put
a IsPostBack. Thats why everytime my page loads, the changes i made
were overwritten by the original values. and by the time the update
statements occurs its all already in its original value.

sorry for that...
Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jonas L | last post by:
Hi, I need to create a textbox which acts as a normal textbox but with the following extra requirements: 1) In-focus color, when the textbox gets focus the backcolor property of the textbox...
4
by: Rodrigo DeJuana | last post by:
Howdy, I'm new to this .net stuff and really have little to no training. Im trying to create a new page for a web form, so i have been pretty much jsut coping code. I having some issue with...
0
by: Newasps | last post by:
Hi guys, I have a problem with UpdateCommand Event. In tihs event Ä°'m creating required controls to get that controls' values and also get them. But when I try to get updated values I'm getting the...
7
by: I am Sam | last post by:
I have a DataGrid that is passing information to a stored procedure properly but the parameters aren't being casted properly. I was woundering if anyone can tell me how I should properly cast the...
11
by: Keith | last post by:
I apologize for those of you who think I'm posting on the same topic. It is not that I don't appreciate all of your comments - and I'm definitely reading them all - but I think I have a differing...
2
by: Mamatha | last post by:
Hi I want to add an icon to the textbox's text. I don't know how to display icon in textbox in VB.NET. If any one knows please let me know. Thanks in advance. Mamatha
3
by: Brad Rogers | last post by:
All, Being immersed in vb.net and trying CSharp after almost a year I forgot the differences. I like vb fixing the uppercase/lowercase names and seeming to be more flexible to code entry. ...
0
by: Jacob Donajkowski | last post by:
Once the user logs in I want to have the users switch from the Roster View to the Profile View and enter their profile infomation and save it. Then the next time they login and go to the Profile...
8
by: Marco Pais | last post by:
Hi there. How can I change the background color of a textbox when it gets the focus? I can handle the "Enter" event and do this private void txtDummie_Enter(object sender, EventArgs e) { ...
1
by: Andy B | last post by:
I have this code: protected void EditEventsWizard_NextButtonClick(object sender, WizardNavigationEventArgs e) { //get the values from the DetailsView TextBox StartTime =...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.