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 />
<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
|