?
Solved

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

Posted on 2013-06-25
2
Medium Priority
?
444 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 12

Accepted Solution

by:
funwithdotnet earned 2000 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

Will your db performance match your db growth?

In Percona’s white paper “Performance at Scale: Keeping Your Database on Its Toes,” we take a high-level approach to what you need to think about when planning for database scalability.

Question has a verified solution.

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

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Suggested Courses

771 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