Link to home
Start Free TrialLog in
Avatar of Seven price
Seven priceFlag for United States of America

asked on

linq load data to label

Yes I want to load about 10 rows of data. 3.5 frame c#

  DataContext db = new DataContext();

 var AptTrans = from value in
                               (from data in db.Types
                                orderby data.urityTypeID descending
                                select new
                                {
                                    TypeID = data.TypeID,
                                    TypeName = data.TypeName

                                })
                           group value by value.TypeID into c
                              select c.Distinct();

loadTypes = '<table>';
loadTypes += '<tr><td>' + TypeID + '</td><td>' + TypeName + '</td></tr>;
loadTypes = '</table>;


<asp:label runat=server id="loadTypes" />

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Fernando Soto
Fernando Soto
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Seven price

ASKER

love it. Thanks
Not a problem sevensnake77, glad I was able to help.