Click here to Skip to main content
12,404,478 members (75,967 online)
Rate this:
 
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
Updated 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
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160721.1 | Last Updated 21 Mar 2013
Copyright © CodeProject, 1999-2016
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