Click here to Skip to main content
13,052,433 members (40,982 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I want to use label for in cs part an i want to bind this label with table. i am using linq for bind this label.My code like this:

var id = (from a in linq_obj.videourl_msts
                 where a.video_status == "Active"
                 select new
                     srccode = a.video_url,
                     videoname = a.video_name

strImage.Append(" <asp:Label ID='lbl_video' runat="'server'" Text='' />");

how i get videoname in label.
I do this all in .cs file.
Posted 4-May-12 4:04am
Updated 24-Jan-13 7:34am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Hi ,
try this
foreach (var item in id)
       lbl_video.Text = item.video_name;

Best Regards

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170713.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100