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

ASP.NET and Dataset

Hello,

ASP.NET pages are disconnected html pages i.e once page is sent to the
browser, that is it. Let's say that I have a datagrid on my page and I
have used a dataset to fill this grid only during the first visit to
the page. My page loads displaying the data in datagrid. What is the
status of my dataset? Is the dataset stored anywhere when the page got
rendered (I am not caching it)?

Now let's say that I use a button event to modify all the rows of the
datatable inside the dataset. Now since this is a postback, my dataset
is not created. So how does the dataadapter.update method work to
update the status of the rows of the table in a dataset?

I hope I've explained the problem clearly. If not, then please let me
know what information you need and I will try my best to provide it.
Thank you.

Aug 10 '06 #1
3 1765
Nashak,

This is the classic "Cient-side" vs "Server-Side" understanding issue.

The datagrid is a server control that uses the DataSet to render an HTML
Table in your web page. Once the Page class has completed processing and is
extinguished, the web page in the browser is 100% HTML (and possibly some
client script). The dataset is long gone, unless it has been stored in
Session, Application, or Cache.
Hope that helps.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"na****@hotmail.com" wrote:
Hello,

ASP.NET pages are disconnected html pages i.e once page is sent to the
browser, that is it. Let's say that I have a datagrid on my page and I
have used a dataset to fill this grid only during the first visit to
the page. My page loads displaying the data in datagrid. What is the
status of my dataset? Is the dataset stored anywhere when the page got
rendered (I am not caching it)?

Now let's say that I use a button event to modify all the rows of the
datatable inside the dataset. Now since this is a postback, my dataset
is not created. So how does the dataadapter.update method work to
update the status of the rows of the table in a dataset?

I hope I've explained the problem clearly. If not, then please let me
know what information you need and I will try my best to provide it.
Thank you.

Aug 10 '06 #2
Hello Peter,

Thank you for the response.

Then how does the dataadapter's update method work? I thought that it
looks at each row of the dataset and checks the status to see if it is
inserted, deleted etc and then updates accordingly. That means that the
dataset has to be stored somewhere. I was wondering if we do it
explicitly (like you mentioned) or is it done implictly by ASP.NET

Thanks,

Peter wrote:
Nashak,

This is the classic "Cient-side" vs "Server-Side" understanding issue.

The datagrid is a server control that uses the DataSet to render an HTML
Table in your web page. Once the Page class has completed processing and is
extinguished, the web page in the browser is 100% HTML (and possibly some
client script). The dataset is long gone, unless it has been stored in
Session, Application, or Cache.
Hope that helps.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"na****@hotmail.com" wrote:
Hello,

ASP.NET pages are disconnected html pages i.e once page is sent to the
browser, that is it. Let's say that I have a datagrid on my page and I
have used a dataset to fill this grid only during the first visit to
the page. My page loads displaying the data in datagrid. What is the
status of my dataset? Is the dataset stored anywhere when the page got
rendered (I am not caching it)?

Now let's say that I use a button event to modify all the rows of the
datatable inside the dataset. Now since this is a postback, my dataset
is not created. So how does the dataadapter.update method work to
update the status of the rows of the table in a dataset?

I hope I've explained the problem clearly. If not, then please let me
know what information you need and I will try my best to provide it.
Thank you.
Aug 11 '06 #3
Precisely. The DataAdapter is also a server-side animal, and it processes the
dataset on the server-side, in compiled code, just as the original DataSet
was used ,server-side, to populate a DataGrid that eventually rendered as
HTML into the browser on the CLIENT SIDE.

Your web page in the browser has absolutely no knowledge of where it came
from or anything else about what happened on the server, except for the fact
that it may have form elements or possibly client-side XMLHTTP objects that
"point" back to server side code on the server from which it came.

I understand this may be a difficult concept to grasp, but it is critical
that you "get it" through careful study in order to progress as a developer.
Cheers!
Peter

--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"na****@hotmail.com" wrote:
Hello Peter,

Thank you for the response.

Then how does the dataadapter's update method work? I thought that it
looks at each row of the dataset and checks the status to see if it is
inserted, deleted etc and then updates accordingly. That means that the
dataset has to be stored somewhere. I was wondering if we do it
explicitly (like you mentioned) or is it done implictly by ASP.NET

Thanks,

Peter wrote:
Nashak,

This is the classic "Cient-side" vs "Server-Side" understanding issue.

The datagrid is a server control that uses the DataSet to render an HTML
Table in your web page. Once the Page class has completed processing and is
extinguished, the web page in the browser is 100% HTML (and possibly some
client script). The dataset is long gone, unless it has been stored in
Session, Application, or Cache.
Hope that helps.
Peter
--
Co-founder, Eggheadcafe.com developer portal:
http://www.eggheadcafe.com
UnBlog:
http://petesbloggerama.blogspot.com


"na****@hotmail.com" wrote:
Hello,
>
ASP.NET pages are disconnected html pages i.e once page is sent to the
browser, that is it. Let's say that I have a datagrid on my page and I
have used a dataset to fill this grid only during the first visit to
the page. My page loads displaying the data in datagrid. What is the
status of my dataset? Is the dataset stored anywhere when the page got
rendered (I am not caching it)?
>
Now let's say that I use a button event to modify all the rows of the
datatable inside the dataset. Now since this is a postback, my dataset
is not created. So how does the dataadapter.update method work to
update the status of the rows of the table in a dataset?
>
I hope I've explained the problem clearly. If not, then please let me
know what information you need and I will try my best to provide it.
>
>
Thank you.
>
>

Aug 12 '06 #4

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

Similar topics

3
by: Bill C. | last post by:
Hi, I've got a simple console app that just reads an XML file into a DataSet then prints out a description of each table in the DataSet, including column names and row values for each column. ...
3
by: Jeronimo Bertran | last post by:
Hi, I have an xml file that encapsulates a dataset definition within a set of tags (<dataset>)... here is an example <?xml version="1.0" encoding="utf-16"?> <dataset> <MyTable>...
5
by: Mike | last post by:
I need to expand the DataSet class by inheriting from it and adding functions that work on the data in the tables. However, since I can't upcast how can I get my base DataSet object assigned an...
3
by: JJ | last post by:
Hi, I need to pass a dataset to another win form along with a SqldataAdapter. I don't want to recreate the SqlDataAdapter again either. So to pass to another Win form in my windows form app, do...
5
by: Jason | last post by:
I am having problems understanding how to access a datasource only once, fill a single dataset, and then reference that dataset multiple times through different user controls(ascx) found on the...
2
by: John Holmes | last post by:
I have a web interface where the user types in ID's one at a time. After an ID is typed in, a button is clicked and the button click event has code that does a query and returns a data reader and...
15
by: JIM.H. | last post by:
Hello, Can I send a dataset as a parameter into stored procedure and import data to a table in the stored procedure? Thanks, Jim.
16
by: Geoff Jones | last post by:
Hi Can anybody help me with the following, hopefully simple, question? I have a table which I've connected to a dataset. I wish to add a new column to the beginning of the table and to fill...
22
by: Arne | last post by:
How do I pass a dataset to a webservices? I need to submit a shoppingcart from a pocket PC to a webservice. What is the right datatype? II have tried dataset as a datatype, but I can't get it to...
1
by: matt | last post by:
hello, i have a web app that allows users to query our oracle db and produce a dataset of report data. they then have the option to serialize this data and store it in the database. later, then...
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...
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: 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
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,...
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
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...
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.