Click here to Skip to main content
11,712,820 members (90,734 online)
Rate this: bad
good
Please Sign up or sign in to vote.
See more: ASP.NET
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
                 {
                     code=a.intglcode,
                     srccode = a.video_url,
                     videoname = a.video_name
                 }).ToList();
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
Edited 24-Jan-13 7:34am
v2

1 solution

Rate this: bad
good
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
M.Mitwalli
  Permalink  

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

  Print Answers RSS
0 CHill60 335
1 Sergey Alexandrovich Kryukov 290
2 OriginalGriff 240
3 Andy Lanng 160
4 Maciej Los 130
0 CHill60 335
1 Sergey Alexandrovich Kryukov 300
2 OriginalGriff 230
3 Andy Lanng 160
4 Maciej Los 130


Advertise | Privacy | Mobile
Web04 | 2.8.150819.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2015
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