• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 447
  • Last Modified:

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

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
merv11
Asked:
merv11
1 Solution
 
funwithdotnetCommented:
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
 
merv11Author Commented:
Exactly what I was looking for. Thank you!
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now