I'm using a web form that I am populating from a query (via a
SqlDataReader).
This isn't a datagrid or other similar control, its simply a series of
TextBox controls on a page. Most of the examples I have seen thus far have
been dealing with using datagrids, etc. and how asp.net can help you deal
with updates in a somewhat automatic fashion. I have what I consider a more
traditional form (which may mean I am doing this wrong) and my db update is
somewhat complicated because depending on which TextBox's text has changed I
need to perform different update logic.
Most of the updates I have seen have happened in the Page_Load event, but
that doesn't seem appropriate here. I know that I can have event handlers
that get called for every text control but those happen after Page_Load.
What I feel I need to do is in Page_Load determine which TextBox controls
have changed, and then perform the appropriate update logic. Any help would
be much appreciated. 2 1011
Hi,
Something has to trigger the postback of the page right? If it is a button,
why not use the click event to test which text box has changed and then
execute the appropriate update. For the update you can use SQL or
OleDbCommands attached to stored procedures.
Ian
"epigram" <no****@spammy. com> wrote in message
news:1117747249 .0b2856fd5af18a 5b3febf89d7bb21 db2@bubbanews.. . I'm using a web form that I am populating from a query (via a SqlDataReader). This isn't a datagrid or other similar control, its simply a series of TextBox controls on a page. Most of the examples I have seen thus far have been dealing with using datagrids, etc. and how asp.net can help you deal with updates in a somewhat automatic fashion. I have what I consider a more traditional form (which may mean I am doing this wrong) and my db update is somewhat complicated because depending on which TextBox's text has changed I need to perform different update logic.
Most of the updates I have seen have happened in the Page_Load event, but that doesn't seem appropriate here. I know that I can have event handlers that get called for every text control but those happen after Page_Load. What I feel I need to do is in Page_Load determine which TextBox controls have changed, and then perform the appropriate update logic. Any help would be much appreciated.
Yes a postback will occur because of a button being pressed. The part
(which I am sure is ridiculously simple) is how to tell if a given control
has changed without caching it's original value in a dataset, session
variable, etc. Maybe that is exactly what you do. Maybe you use the
ViewState somehow. I just don't know. In the examples I have been viewing
you know that a control has changed by an on change even for the control
being called.
Thanks!
"Ian Kelly" <in**@thetawave .on.ca> wrote in message
news:ON******** ******@TK2MSFTN GP10.phx.gbl... Hi, Something has to trigger the postback of the page right? If it is a button, why not use the click event to test which text box has changed and then execute the appropriate update. For the update you can use SQL or OleDbCommands attached to stored procedures.
Ian
"epigram" <no****@spammy. com> wrote in message news:1117747249 .0b2856fd5af18a 5b3febf89d7bb21 db2@bubbanews.. . I'm using a web form that I am populating from a query (via a SqlDataReader). This isn't a datagrid or other similar control, its simply a series of TextBox controls on a page. Most of the examples I have seen thus far have been dealing with using datagrids, etc. and how asp.net can help you deal with updates in a somewhat automatic fashion. I have what I consider a more traditional form (which may mean I am doing this wrong) and my db update is somewhat complicated because depending on which TextBox's text has changed I need to perform different update logic.
Most of the updates I have seen have happened in the Page_Load event, but that doesn't seem appropriate here. I know that I can have event handlers that get called for every text control but those happen after Page_Load. What I feel I need to do is in Page_Load determine which TextBox controls have changed, and then perform the appropriate update logic. Any help would be much appreciated.
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Jaunty Edward |
last post by:
HI,
I have to write secure update record php script, here are the complete
details of the website,
the website has a login system that authenticates the user, writes the
session ID for username and goes
on.
The user can post, read msg he can also update the msgs that he had
|
by: DK |
last post by:
Please can somebody help me ?
I have forms named Form 1, Form 2 etc. having fields
CustomerName,CustomerAddress,.....
Id like to have button on each form ,which will open another form named
"CustomerAdd" with list of all customers in tblCustomers. After I pick one
of the customers from the list, actual form should be closed and details of
customer shall be send to fields in Form 1 or Form2 or...
|
by: vonclausowitz |
last post by:
Hi Everyone,
Is it possible to create some code which can automatically update my
forms formatting?
I have a small database with a form which is periodically changed. When
the db is returned to me the form looks completely different. Different
fore- and background colors, font types etc...
Is there something in code I can use to set the form back to how I
normally use it?
|
by: Martin Williams |
last post by:
I have a main form with a bound combobox. I then have another form which is
accessed from the main form, which I used to update the data that is bound
to the combobox. I know how to update a database, but how do I update the
main form when I close the current form?
Thanks for all responses.
Regards,
Martin Williams
|
by: HankC |
last post by:
I have a vb.net app that serves our four campuses. A student logs in to
start the app.
Based on their login domain, I wish display the campus color and image
on the form.
I cannot find any sort of me.backgoundcolor attribute however...
Can someone help me dynamically chage the background color of the main
| |
by: Brian |
last post by:
I have a form that has a textbox used to search records in a table. On
the form I have a listbox which shows each record in the table. When
you click on each row in the listbox the rest of the form updates to
show the other fields in the table.
The problem I am having is when I enter text to search the table the
list narrows successfully, but the rest of the information still
reflects the first record in the table. When I click on one of...
|
by: devine |
last post by:
Hi All,
I am trying to send an automatic email when an update has been made.
My update statement will updates 6 fields, and dependant on one of the fields, I would like to send an email using CDO.
Once the update is made, I am trying to re-query the database to retrieve all the fields that need to be included in the email, but it's just not working for me!!
This my code to update
<%
Set Conn = Server.CreateObject("ADODB.Connection")...
|
by: mtgrizzly52 |
last post by:
Hi all,
I've looked for an answer for this in lots of books, online in several discussion groups and have not found the answer which I feel may be very simple.
What I want to do is have a switchboard with several active buttons on it for entering new data, updating data, reports etc. The new data and report stuff is easy, but the update button has me baffled.
What I want to have happen is when the update button is clicked, a parameter...
|
by: mdk7 |
last post by:
I am very new to developing forms and queries with Access. The task that I am required to complete is as follows:
Build a form based user interface that displays various information from the underlining tables as well as allow for updating of this information. The problem I am having is that all the information that needs to be displaced needs to ‘created’ using a query ie: the form displays information from multiple sets of tables and...
|
by: C_Kubie |
last post by:
I have a populater listbox and I update the contents by running a
different SQL statement via
listbx.Rowsource ="<SQL statement>"
The contents of the listbox changes but the form doesn't.
What sytax or command should I use to update the form fields?
thanks,
|
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...
| |
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...
|
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...
|
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...
|
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...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
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...
| |