TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Dale Hermsen
NA
14
0
Using linq to SQL in ASP.NET with DAL
Nov 20 2009 12:16 PM
How do you get the data from an SQL Table using Linq by way of a Data Access Layer? I've seen numerous articles that show how to get the specific fields, but they all do console.writeline at the end. I want to bind the data to a textbox or label, or both. I can get 1 field OK by this: int numberfld = GetData.getRecord(ID); which calls the method in the DAL and returns the value. So, how do you go about returning the data for more than 1 column from the DAL so it can be used to populate any number of textboxes or labels? I've made it work using a foreach, but that seems like poor coding technique when I only want one row.
Reply
Answers (
4
)
Problem with DrawString under Windows 7
Process running invisible from Windows Service