473,396 Members | 1,996 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.

Display data with ASP.NET

With other solutions I would get a recordset, read each record and
display data by formating my html as I wanted to display values of
each record. I am trying to display data in a three column three row
table with paging. How does this translate to ASP.NET - or - what
ASP.NET tools do I use to accomplish this and how.

Thank you.

Apr 20 '07 #1
4 2050
<se*********@yahoo.comwrote in message
news:11*********************@y5g2000hsa.googlegrou ps.com...
With other solutions I would get a recordset, read each record and
display data by formating my html as I wanted to display values of
each record. I am trying to display data in a three column three row
table with paging. How does this translate to ASP.NET - or - what
ASP.NET tools do I use to accomplish this and how.
There's nothing to stop you doing exactly this in ASP.NET if you want to...
The only difference is that ASP.NET uses ADO.NET natively (since it's part
of the Framework), not ADO...

The ADO.NET equivalent of an ADO Recordset is (more or less) the DataSet
object. It has a collection of tables, and each table has a collection of
rows etc...

However, ASP.NET has databound controls e.g. <asp:GridViewwhich accept an
ADO.NET object such as a DataSet as their DataSource property - this means
that most of the ASP Classic "donkey work" is removed.

Do a Google search for ASP.NET DataSet <asp:GridView>
Apr 20 '07 #2

#1 Rule with Asp.Net

DO NOT LOOP OVER RECORDS TO CREATE HTML.

Here is a decent place to start.

http://www.asp101.com/samples/database_aspx.asp
Notice the use of
..DataSource = (some object)
..DataBind()
DO NOT LOOP OVER ITEMS AND CREATE HTML.
I would look at the
asp:repeater control.

<se*********@yahoo.comwrote in message
news:11*********************@y5g2000hsa.googlegrou ps.com...
With other solutions I would get a recordset, read each record and
display data by formating my html as I wanted to display values of
each record. I am trying to display data in a three column three row
table with paging. How does this translate to ASP.NET - or - what
ASP.NET tools do I use to accomplish this and how.

Thank you.

Apr 20 '07 #3
Thank you for the helpful response.

OK - I like the fact that <asp:GridViewmakes life easier with
things like "AllowPaging = "True"" and "AllowSorting = "True"".

But I still am not sure how to control the display of my data.
Example: I want to use a the value of my ProductID field to build an
image URL and display it in a <tr><td></td></tr>. Then in a new row I
want to use the value of my ProductDescription field to display text,
and etc ...

It appears that <asp:GridViewdisplays all field data returned from
the query and displays it in a simple table view. Am I missing
something?

Should I be using another asp construct for my purpose?
On Apr 20, 10:10 am, "Mark Rae" <m...@markNOSPAMrae.netwrote:
<seth_hic...@yahoo.comwrote in message

news:11*********************@y5g2000hsa.googlegrou ps.com...
With other solutions I would get a recordset, read each record and
display data by formating my html as I wanted to display values of
each record. I am trying to display data in a three column three row
table with paging. How does this translate to ASP.NET - or - what
ASP.NET tools do I use to accomplish this and how.

There's nothing to stop you doing exactly this in ASP.NET if you want to...
The only difference is that ASP.NET uses ADO.NET natively (since it's part
of the Framework), not ADO...

The ADO.NET equivalent of an ADO Recordset is (more or less) the DataSet
object. It has a collection of tables, and each table has a collection of
rows etc...

However, ASP.NET has databound controls e.g. <asp:GridViewwhich accept an
ADO.NET object such as a DataSet as their DataSource property - this means
that most of the ASP Classic "donkey work" is removed.

Do a Google search for ASP.NET DataSet <asp:GridView>

Apr 20 '07 #4
I should also mention that I am trying to create a page with three
rows of three table cells each.

On Apr 20, 4:34 pm, seth_hic...@yahoo.com wrote:
Thank you for the helpful response.

OK - I like the fact that <asp:GridViewmakes life easier with
things like "AllowPaging = "True"" and "AllowSorting = "True"".

But I still am not sure how to control the display of my data.
Example: I want to use a the value of my ProductID field to build an
image URL and display it in a <tr><td></td></tr>. Then in a new row I
want to use the value of my ProductDescription field to display text,
and etc ...

It appears that <asp:GridViewdisplays all field data returned from
the query and displays it in a simple table view. Am I missing
something?

Should I be using another asp construct for my purpose?

On Apr 20, 10:10 am, "Mark Rae" <m...@markNOSPAMrae.netwrote:
<seth_hic...@yahoo.comwrote in message
news:11*********************@y5g2000hsa.googlegrou ps.com...
With other solutions I would get a recordset, read each record and
display data by formating my html as I wanted to display values of
each record. I am trying to display data in a three column three row
table with paging. How does this translate to ASP.NET - or - what
ASP.NET tools do I use to accomplish this and how.
There's nothing to stop you doing exactly this in ASP.NET if you want to...
The only difference is that ASP.NET uses ADO.NET natively (since it's part
of the Framework), not ADO...
The ADO.NET equivalent of an ADO Recordset is (more or less) the DataSet
object. It has a collection of tables, and each table has a collection of
rows etc...
However, ASP.NET has databound controls e.g. <asp:GridViewwhich accept an
ADO.NET object such as a DataSet as their DataSource property - this means
that most of the ASP Classic "donkey work" is removed.
Do a Google search for ASP.NET DataSet <asp:GridView>- Hide quoted text -

- Show quoted text -

Apr 20 '07 #5

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

Similar topics

3
by: StepH | last post by:
Hi, I'm building a little application, which the goal is to: 1./ Collect data via Serial line and or via a file (for playback). 2./ Display these data as graph, oscilloscope, ... How manage...
13
by: Dan R Brown | last post by:
I have a large form that is generated dynamically in a jsp using xml / xslt. So, to break up this form into several "tabbed" sections, I break up the form using <div> tags. Each <div...
2
by: Kay | last post by:
This function is used to display the context of a queue. I input an integer comparing with the queue cuisine number, if cuisine number is same as the input, it shows the context. However, it cannot...
19
by: dmiller23462 | last post by:
Hi guys....I have absolutely NO IDEA what I'm doing with Javascript but my end result is I need two text boxes to stay hidden until a particular option is selected....I've cobbled together the...
7
by: Stefan Finzel | last post by:
Hi, is there a way to change the display property on Windows Mobile 2003 SE Mobile/Pocket Internet Explorer? See following example. Please note: visibilty property has the same problem. Is...
1
by: JK | last post by:
In my win form, I'm trying to display a Crystal report with the data in my dataset only but, if I follow the steps in this msdn page: ...
18
by: Alpha | last post by:
Hi, I'm working on a Windows applicaton with VS 2003 on windows 2000. I have a listbox that I have binded to a dataset table, "source" which has 3 columns. I would like to display 2 of those...
1
by: Eric Keung | last post by:
Hi all, my case is I want to get an image from access database and I just know it's "OLE object" field type at access I also don't know how to insert it into access here is my code and it just...
1
by: John Phelan-Cummings | last post by:
When I add the name of a new individual in a, bound form, it will not display that person’s name in a label control of a second unbound form. I have a scheduling program that I am working on. ...
18
by: Terry Holland | last post by:
I have an asp.net (1.1) application that connects to a SQL server 2000 db. I have a stored procedure in my db that out puts data in xml format. What I need to be able to do is display that xml...
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
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
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
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
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.