Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8
This is the forum to discuss the Wrox book Beginning ASP.NET 2.0 by Chris Hart, John Kauffman, David Sussman, Chris Ullman; ISBN: 9780764588501
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 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 January 18th, 2008, 12:36 PM
Authorized User
 
Join Date: Sep 2007
Location: Rugeley, , United Kingdom.
Posts: 48
Thanks: 0
Thanked 0 Times in 0 Posts
Default VB Ch7 p242 Try It Out "The DataList Control"

Apart from some problems with the location of MatchImages, I arrived fairly painlessly at the end of the exercise but I have only one row and one column on the Gallery-All.aspx page when I run in IE6. I changed the Repeat Columns property to 3 and the RepeatDirection property to Horizontal. The appearance of the content section in Design View is as expected (whether debugging or not). Changing these parameters and re-saving before running has no effect on the layout.

The source in the content placeholder is:
    <asp:datalist ID="DataList1" runat="server" DataKeyField="PictureID" DataSourceID="SqlDataSource1" RepeatColumns="3" RepeatDirection="Horizontal">
        <itemtemplate>
            FixtureID:
            <asp:label ID="FixtureIDLabel" runat="server" Text='<%# Eval("FixtureID") %>'></asp:label><br />
            &nbsp;<asp:image ID="Image1" runat="server" ImageUrl='<%# Eval("PictureURL", "~/MatchImages/{0}") %>' /><br />
            <asp:label ID="NotesLabel" runat="server" Text='<%# Eval("Notes") %>'></asp:label><br />
            Uploaded By Our Member:
            <asp:label ID="UploadedByMemberNameLabel" runat="server" Text='<%# Eval("UploadedByMemberName") %>'></asp:label><br />
        </itemtemplate>
    </asp:datalist>

    <asp:sqldatasource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:WroxUnitedforGallery %>"
        SelectCommand="SELECT [FixtureID], [PictureID], [PictureURL], [UploadedByMemberName], [Notes] FROM [Gallery]">
    </asp:sqldatasource>

Oddly, this page doesn't have a corresponding code page but, looking back through the Try It Out exercise, no code changes have been done. I'm wondering though if the missing code page is a sign that the DataList properties have not been saved with the page. Gallery-All.aspx was created right at the beginning of the exercise, having first created Gallery.aspx opting for the master page and the separate code page. I chose File, Save As and entered Gallery-All.aspx. This process obviously didn't create a code page. I checked the errata in this area and someone has suggested a re-write of Step 1, removing the Save As procedure thus ditching Gallery-All. Perhaps a "Redo from start" is in order.

Would appreciate any tips. I won't be visiting the forums for a few days due to holiday, but I am keen to know how to fix this and will read your replies as soon as I get back.


Richard
Rugeley, UK
WinXP Pro SP2
VBW Express
__________________
Richard
Rugeley, UK
WinXP Pro SP2
VBW Express + SQL Server 2005 Express




Similar Threads
Thread Thread Starter Forum Replies Last Post
VB Ch7 p247 Try It Out Using DetailsView Rich57 BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 0 January 31st, 2008 08:38 AM
How to code href into DataList control cJeffreywang ASP.NET 2.0 Basics 0 September 26th, 2007 02:43 PM
Paging with datalist control amit.jagtap ASP.NET 2.0 Basics 1 August 13th, 2007 03:12 AM
Can ADODC and DataList Control be used in vb 2005? ly_he Pro Visual Basic 2005 1 November 5th, 2006 10:49 PM
DataList Control causes screen flicker Jan_Ma Classic ASP Components 0 June 30th, 2003 04:33 PM





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