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

Example of basic data output using C# in ASP.NET?

Hi All,

I'm curious to know if anyone can point me to some basic but complete
examples of C# ASP.NET code that retrieves and displays records from an
SQL Server table?

I've been experimenting with Visual Web Developer 2005 Express, and I
have managed to create a page that displays a GridView, however I'm
more interested at this point in learning from examples where datasets
are explicitly created and output to the browser by iterating through
the recordset and writing HTML etc.

Can anyone point me to any examples like this?

Many thanks in advance!

Much warmth,

planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org

May 25 '06 #1
3 1623
check here. htye provide good samples and cover big part of what you
could need

http://samples.gotdotnet.com/quickstart/howto/

hope this helps
Galin Iliev[MCSD.NET]
www.galcho.com

May 25 '06 #2

If you want more control of the output, then look at the asp:repeater
control.

If you're trying to revert back to the asp days of

Response.Write "<table>
Response.Write "<tr>"

You're barking up the wrong tree,

(outside the possibilty youre wrting your own server controls. (not
usercontrols, but server controls).

...

98% of the time, I think you want to stick with the DataBind()'ing .. and
the controls MS provides.

The repeater takes more setup time, but gives you the most control.


<pl**************@gmail.com> wrote in message
news:11**********************@y43g2000cwc.googlegr oups.com...
Hi All,

I'm curious to know if anyone can point me to some basic but complete
examples of C# ASP.NET code that retrieves and displays records from an
SQL Server table?

I've been experimenting with Visual Web Developer 2005 Express, and I
have managed to create a page that displays a GridView, however I'm
more interested at this point in learning from examples where datasets
are explicitly created and output to the browser by iterating through
the recordset and writing HTML etc.

Can anyone point me to any examples like this?

Many thanks in advance!

Much warmth,

planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org

May 25 '06 #3

sloan wrote:
If you want more control of the output, then look at the asp:repeater
control.

If you're trying to revert back to the asp days of

Response.Write "<table>
Response.Write "<tr>"

You're barking up the wrong tree,

(outside the possibilty youre wrting your own server controls. (not
usercontrols, but server controls).


In a sense, yes, that is what I'm trying to do - or, to put it another
way, I'm coming across from PHP, and I want to get productive in C# as
quickly as possible. If it's not the best code, I can live with that.

But thanks for your thoughts - it at least gives me an idea of where I
should be aiming at.

Much warmth,

planetthoughtful
---
"Lost in thought"
http://www.planetthoughtful.org

May 25 '06 #4

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

Similar topics

1
by: Courtney L. | last post by:
I have a feeling there is just some basic info about exec that I do not know. But I don't understand how to get back a response from a URL using cURL (from the command line using exec()). Here's...
7
by: Michael Foord | last post by:
#!/usr/bin/python -u # 15-09-04 # v1.0.0 # auth_example.py # A simple script manually demonstrating basic authentication. # Copyright Michael Foord # Free to use, modify and relicense. #...
4
by: Bradley Grant | last post by:
Does anyone out there know of where I could find some C# example programs for accessing USB Devices. There just does not seem to be much out there on this subject. Even after doing a Google,...
1
by: bruce | last post by:
hi... i have the following test python script.... i'm trying to figure out a couple of things... 1st.. how can i write the output of the "label" to an array, and then how i can select a given...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.