473,808 Members | 2,745 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Editing Text Box Values

I am filling text boxes from a data reader. That works
fine. If I edit a text box to a different value and
click a save button the orginal value that was edited is
being used in the SQL string. I verified this through
debugging.

Does anyone know of a reason why the original values are
being perserved? The text boxes are not set to read only.

Thanks.
Nov 18 '05 #1
5 1129
show code

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"brian shannon" <bs******@lbrsp ec.com> wrote in message
news:26******** *************** *****@phx.gbl.. .
I am filling text boxes from a data reader. That works
fine. If I edit a text box to a different value and
click a save button the orginal value that was edited is
being used in the SQL string. I verified this through
debugging.

Does anyone know of a reason why the original values are
being perserved? The text boxes are not set to read only.

Thanks.

Nov 18 '05 #2
Cor
Hi Brian,

Did you use
"not postback" ?

Cor
I am filling text boxes from a data reader. That works
fine. If I edit a text box to a different value and
click a save button the orginal value that was edited is
being used in the SQL string. I verified this through
debugging.

Does anyone know of a reason why the original values are
being perserved? The text boxes are not set to read only.

Nov 18 '05 #3
probably because you aren't checking for a page.ispostback when you are
binding the data from the datareader to textboxes.

it would be something like this in page_load

if not page.ispostback then
'do everything to fill the text boxes originally
end if

"brian shannon" <bs******@lbrsp ec.com> wrote in message
news:26******** *************** *****@phx.gbl.. .
I am filling text boxes from a data reader. That works
fine. If I edit a text box to a different value and
click a save button the orginal value that was edited is
being used in the SQL string. I verified this through
debugging.

Does anyone know of a reason why the original values are
being perserved? The text boxes are not set to read only.

Thanks.

Nov 18 '05 #4
Thanks Cor- I overlooked the post back.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 18 '05 #5
Cor
Hi Brian,

I see I edited to much but I think you saw it "IsPostBack "

Cor
Nov 18 '05 #6

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

Similar topics

4
2407
by: Dan Weeb | last post by:
Hi All, I have struggled through this far with help from many of you so thanks. I am stuck again. I am really new to this so don't be harsh :-) There are a few problems. You can run the script here http://www.pbrown.com/research/test1.php to see the formatting issues Formatting Issues
2
4269
by: NewBob | last post by:
Since Access automatically highlights all of the text in a text control (I use it to hold data from a memo field) when the control is activated, I've added the following code to put the cursor at the end. Private Sub txtCapability_GotFocus() ‘ Placed either behind the OnEnter or GotFocus Event of a control named, ' in this case, txtCapability, on a form ensures that when the control is
0
1032
by: Sebi | last post by:
Hello All, I'm having problems, reading the new Values from CheckBox in a DataGrid. my Code Behind is C# I do exactly what other samples do, but I allways get the Initial Values instead of the current values choosen by the user!!
3
3494
by: Andrea | last post by:
The Gridview's RowDeleting event, give the power - cycling the e.Keys Dictionary, to discover the values of the Primary key fields of the dataset setup throught the DataKeyNames. Since I want to get the same value to display a more detailied form to edit my gridview fields that cannot be contained in a gridview, How can I do that? Any link, sample etc?
0
1747
by: Frenchie | last post by:
I have a Gridview with a checkbox on each row. I would like to be able to select 1 or more rows and edit one of the fields in each of these rows. Basically, I dont want my users to have to edit each row, one at a time. If I can make it so that they can edit on column for each row that they select I will be really happy. Right now I am using a session to pass some values to the other page, where I will be doing the editing, but I cannot...
0
2020
by: Frnak McKenney | last post by:
Can I use a bound ComboBox for both browsing and editing? I'm working on a small, standalone database application using Visual C#.NET 2003 and an Access data file. In order to keep the number of different screens down to a minimum, I'm trying to use the same Windows Forms for both browsing and for updating. This works fine for TextBoxes, but I'm running into problems with my DropDownLists (ComboBoxes).
4
3386
by: helenwheelss | last post by:
Access 2003, using a bound form. I'm seeing rather annoying behaviour when editing data in a control with a default value. It only happens when the form is on a new record. A specific example: on my form, the first control is bound to a date/ time field and has a default value of now(). When users need to change this control's data, they'll most commonly need to alter the time part leaving the date as is. But, on a new record, when...
3
2338
by: durga2005 | last post by:
hi im using webgrid control and i have used template columns to display the data from the database while editing the data in webgrid, im storing the the new values in two strings for using it in update command. but it is showing error like 'Unable to cast object of type 'System.Web.UI.LiteralControl' to type 'System.Web.UI.WebControls.TextBox'.
4
3069
by: ASPnewb1 | last post by:
Hello, I have a 2-dimensional array created from the following text file: data1=asdfawe data2=2 data3=223d data4=22
8
2181
by: ahilar12 | last post by:
Hi experts, I have a form with many textboxes,listboxes in php.I have a edit button to edit the values in the form.once i click the edit button the existing values should be displayed so that the user can edit those particular values and also that should be updated in the mysql database.kindly reply me as early as possible. Thanks
0
9721
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10633
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10376
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10375
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10114
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9198
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7651
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5686
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3011
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.