Had no problem getting the bulleted list displayed from Chapter 13, but wanted to extend it a little. The idea was to turn the listitems in to links so I could create a "details" page for the user.
I changed the bulleted list definition to:
Code:
<asp:BulletedList ID="lstReviews" runat="server"
DataSource='<%# Eval("Reviews") %>' DataTextField="Title"
DisplayMode="HyperLink" DataValueField='Id'
BulletStyle="Disc" >
which correctly converts the items to links. Problem is, this gives me links like:
localhost/Site/Reviews/17
where "17" is ths id from the record. What I need to do is inject some additional information to turn this in to
localhost/Site/Reviews/
ReviewDetail.aspx?Id=17
Nothing I've tried has got me anywhere.
Any suggestions as to how I can achieve this please?
I've tred adding code to the DataValueField in the bulleted list and have tried to define a field in the LINQ statement - but that won't work because I have no direct access to add fields to the Reviews collection.
Thanks
Steve