473,671 Members | 2,586 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is databinding in asp.net read-only?

i have a dataAdpater and dataset, and can use databinding to set the value
of a textbox to a field in the database.

what about updating? what do i need to do? can asp.net/ado.net do it
automagically? it seems to have the code built into the dataadapter to do
the update... how do i get it to update the database if i change text in the
textbox and hit "ok" or whatever?

thanks

neil m
vancouver, canada
Nov 17 '05 #1
3 2098
yes, yes it is.

neil, answering his own question

"neil m" <no************ **@hotmail.com> wrote in message
news:MD******** **************@ news2.calgary.s haw.ca...
i have a dataAdpater and dataset, and can use databinding to set the value
of a textbox to a field in the database.

what about updating? what do i need to do? can asp.net/ado.net do it
automagically? it seems to have the code built into the dataadapter to do
the update... how do i get it to update the database if i change text in the textbox and hit "ok" or whatever?

thanks

neil m
vancouver, canada

Nov 17 '05 #2
Neil,
how do i get it to update the database if i change text in the
textbox and hit "ok" or whatever?
You have to hand-code this, for starters see
http://asp.net/Tutorials/quickstart.aspx. Also, there are third party
components (such as our Table Editor at www.dvxp.com/dxtableeditor/ ;-) that
can handle database updates transparently.

Ries
www.dvxp.com

"neil m" <no************ **@hotmail.com> wrote in message
news:MD******** **************@ news2.calgary.s haw.ca... i have a dataAdpater and dataset, and can use databinding to set the value
of a textbox to a field in the database.

what about updating? what do i need to do? can asp.net/ado.net do it
automagically? it seems to have the code built into the dataadapter to do
the update... how do i get it to update the database if i change text in the textbox and hit "ok" or whatever?

thanks

neil m
vancouver, canada

Nov 17 '05 #3
Neil... Working code at:

http://www.geocities.com/jeff_louie/datagrid.htm

Binding to text boxes is more complicated:

http://www.geocities.com/jeff_louie/...ingclasses.htm

Regards,
Jeff
what about updating? what do i need to do?<


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 17 '05 #4

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

Similar topics

8
6161
by: pete | last post by:
Hi there, Can someone explain to me why I can't bind to an XmlDocument but I can bind to an XmlNodeList. It's my understanding that they both implement the IEnumerable interface which is required for databinding. Am happy to work with the XmlNodeList but I can't shake the feeling I'm missing something <blush> Thanks, Pete
2
1332
by: RvGrah | last post by:
This code: private void GetPlans(){ dt = dt.Clone(); //New object? cn.Open(); SqlDataReader drd = cmdGetPlans.ExecuteReader(); if (drd.HasRows){ while (drd.Read()){ dt.Rows.Add(new Object {drd.ToString(),//where the problem happens
3
2270
by: Peter Morris [Droopy Eyes Software] | last post by:
Hi all When I bind to multiple records I use a DataList. This allows the web-designer to add code like <%#DataBinder.Eval(Container.DataItem, "Name")%> Whenever I want to retrieve a single record from the DB for editing I also want to allow the designer to use the same technique. At the moment I am still using a DataList for the single row, but this seems like the wrong thing to do. How should I be doing it?
4
1167
by: aroth | last post by:
I have a basic form with some dropdownlist controls that I would like to populate with items from a database. I keep getting the error "Cannot implicitly convert type 'System.Data.SqlClient.SqlDataReader' to 'bugreq.SqlDataReader'". The code from 'codebehind' is posted below. using System; using System.Collections; using System.ComponentModel; using System.Data;
8
1910
by: Jeff | last post by:
Hi - I'm having trouble Databinding a SQLDataReader to a DataGrid control. I have an ASP.NET web page accessing a SQL database. I've used VS to build the app and stored it in a directory of my localhost on my development machine. The database is on the web. When I run the app on the local machine, IE opens, loads my aspx page from localhost, and hangs. (Eventually I get a page cannot be displayed error.)
8
2175
by: GaryDean | last post by:
We have been noticing that questions on vs.2005/2.0 don't appear to get much in answers so I'm reposting some questions posted by some of the programmers here in our organization that never got answered... In 1.1 we always did our own myDataAdapter.fills and we liked that control for lots of good reasons. Now the new DataSource (or is it a TableAdapter:Dataset) automatically fills the Gridview. How can we control that fill? In a...
2
1416
by: Kalpesh | last post by:
Hello, I am facing a design problem here & need your expert design advice on this. Scenario: I have a class called Vendor - which has several simple attributes like Name, Address etc Now, each vendor has some attributes - which are not "simple" Basically, they can be an instance of another class
0
939
by: Kalpesh | last post by:
Hello, I am facing a design problem here & need your expert design advice on this. Scenario: I have a class called Vendor - which has several simple attributes like Name, Address etc Now, each vendor has some attributes - which are not "simple" Basically, they can be an instance of another class
1
1742
by: Mark Olbert | last post by:
Has anyone else noticed that the design-time support for databinding in custom controls in ASPNET2 sucks? At least for GridViews? So far I've spent going on two days trying to get the following simple statements to actually generate something at design-time: gridView = new GridView(); gridView.AutoGenerateColumns = true; gridView.DataSource = ; gridView.DataBind(); I have tried everything I could think of, or read about in four books...
1
1625
by: =?Utf-8?B?QWxoYW1icmEgRWlkb3MgS2lxdWVuZXQ=?= | last post by:
Hello to all, I want to know if DataBinding in asp.net 2,0 is better than to fill up the values of the controls of the following form: this.miControlTextBox.Text = valorParaControlTextbox; Performance with databinding is good in asp.net 2.0 ? Would you prefer: databinding or set value to Text property of control ?
0
8483
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
8927
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
8825
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...
0
8676
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
7445
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...
0
5703
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4416
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2062
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1816
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.