473,395 Members | 1,948 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,395 software developers and data experts.

Unbound fields not getting updated, written to DB VS.Net 2003

I've got an asp.net 1.0 web form, which has a ton of fields. I am NOT using
data binding. I programmatically create a data adapter and load the values
into a table, then populate the fields on load.

When the user clicks save, I gather the data from the fields and generate an
UPDATE command and use a SQLCommand to write it to the database.

The problem is, when the user trypes something into one of the fields and
hits Save, the code reads the value (say, of a text box) and gets the
ORIGINAL value of that field, rather than the UPDATED value that the user
entered.

What is wrong here, and how can I fix it?

Thanks!
Apr 6 '06 #1
2 1094
In your server page_load event, use If Not Page.IsPostBack and skip the
prepopulation.

Apr 6 '06 #2
DOH! My brain cell was on holiday. Sure enough, I wasn't checking for
IsPostBack in Page Load, so I was reinitializing the controls.

Thanks!

"sirfunusa" wrote:
In your server page_load event, use If Not Page.IsPostBack and skip the
prepopulation.

Apr 6 '06 #3

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

Similar topics

1
by: Stephan | last post by:
Hi, I'm using Visual Studio 2003 (C#) with the integrated Crystal Report software and have the following question: How can I assign a value (string) to an unbound (string) field in Crystal...
0
by: nospam1001 | last post by:
Environment is MySQL 3.23.33, PHP Version 4.3.2. Have included a couple of extra columns here in an attempt to clarify what I am trying to do. In the table rid is a unique, auto-increment. The...
0
by: user | last post by:
Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Lines: 105 Message-ID: <nlnBb.422437$0v4.20362698@bgtnsc04-news.ops.worldnet.att.net> Date: Tue, 09 Dec...
4
by: Rick Thiel | last post by:
Hello, I am trying to build a Crystal report VisualStudio.NET for an ASP.NET application. I would like to build a report that doesn't connect to any particular database at design time because I...
3
by: google | last post by:
I'm developing an application for use within my company in Access 2003. I'm new to '03, the application I did for my former employer was in '97. The two applications have similar functionality...
18
by: TORQUE | last post by:
Hi, Im wondering if anyone can help me with a problem. I have a form with more than 50 unbound fields. Some of the fields will be blank from time to time. This seems to be where im having...
3
by: Aspnot | last post by:
I have a form that is setup in a Master/Detail configuration. The Detail section is represented with a DataGridView. Some of the columns in this DataGridView control are unbound. When a user...
0
by: ZRexRider | last post by:
Hi, I have a report driven by a SQL database. I have a populated recordset having a user name and a number of data/time fields. I process these time fields in the report's Detail_Print event. ...
2
by: Presto | last post by:
I am making a front end mdb so users can enter new members data. I can then import this into the master database on the backend and erase the existing info on the front end to keep the data...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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,...
0
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...
0
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...
0
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,...

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.