Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4: in C# and VB by Imar Spaanjaars; ISBN: 9780470502211
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4 : in C# and VB section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old June 15th, 2014, 09:12 AM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Question concept of anonymous type data in LINQ

hi there,
sir , when was doing shaping data with anonymous type's try out on pg 493
with the following code , i am not able to configure where the data comes from?
Code:
<ItemTemplate>
    <h3> <asp:Literal ID="Literal" runat="server"  Text='<%# Eval ("Name") %>'></asp:Literal></h3>
        <asp:BulletedList ID="ReviewList" runat="server" DataSource='<%# Eval ("Reviews")%>' DataTextField="Title">
        </asp:BulletedList>
    </ItemTemplate>
 
Old June 15th, 2014, 09:40 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

What do you mean with "configure where the data comes from"? Isn't that what you're doing with the Eval statement?

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
nikhilrathi99 (June 16th, 2014)
 
Old June 16th, 2014, 12:58 AM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default

yes, with the eval we get the the data , but i was confused with the eval of reviews .


thanks
Nikhil
 
Old June 16th, 2014, 06:46 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

It works the same way. In that case, Eval gets the collection of reviews from the object that is currently being added to the repeater, one for each Genre.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
nikhilrathi99 (June 16th, 2014)
 
Old June 16th, 2014, 01:34 PM
Registered User
 
Join Date: May 2014
Posts: 8
Thanks: 4
Thanked 0 Times in 0 Posts
Default

Thanks you so much.Sir , i had lot of hope on this book sincerely reading it from very first page.SUCH A NICE BOOK..





Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested data controls using LINQ AdamPembs ASP.NET 3.5 Professionals 5 November 4th, 2010 02:52 AM
LINQ Anonymous Type - Alias guynorton ASP.NET 3.5 Basics 4 August 30th, 2010 06:51 PM
he conversion of a char data type to a datetime data type resulted in an out-of-range adamhw Classic ASP Basics 3 December 23rd, 2009 07:18 AM
Pivot data: Linq to Objects jimibt BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 September 22nd, 2008 01:22 PM
Data Type error but it is the correct type Mitch SQL Server 2000 2 March 19th, 2004 11:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.