Solved

best way to pass query results from c# code behind to asp.net

Posted on 2013-06-25
2
439 Views
Last Modified: 2013-06-29
New to ASP.NET and C#, but seasoned database developer. What's the best way to pass query results from the C# layer to the presentation layer (ASP.NET)? Assuming an unknown # of rows and potential column additions on the fly (on the database side).

Thanks in advance!
0
Comment
Question by:merv11
2 Comments
 
LVL 12

Accepted Solution

by:
funwithdotnet earned 500 total points
ID: 39276816
I use a DataTable for most everything. Easy to bind to a GridView and many other controls. Easy to transform columns.

When passing rows to an ASP.NET control you only need worry about overloading  the web page (too much data/slow render times).
0
 

Author Comment

by:merv11
ID: 39286452
Exactly what I was looking for. Thank you!
0

Featured Post

Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Help Required 3 90
Sql Server group by 10 25
Find SQL query used by application 3 17
Query group by data in SQL Server - cursor? 3 29
Entity Framework is a powerful tool to help you interact with the DataBase but still doesn't help much when we have a Stored Procedure that returns more than one resultset. The solution takes some of out-of-the-box thinking; read on!
I have a large data set and a SSIS package. How can I load this file in multi threading?
Via a live example combined with referencing Books Online, show some of the information that can be extracted from the Catalog Views in SQL Server.
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

813 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now