Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 September 24th, 2009, 11:53 AM
Authorized User
 
Join Date: Sep 2009
Posts: 23
Thanks: 9
Thanked 1 Time in 1 Post
Default DataPager & PlaceHolder positions

Imar,

I just completed the last Try It out for chapter 16 that started on page 586. Everything worked as expected while running the Default.aspx page from the PhotoAlbums folder, but I did notice that in albums that contained only one or two picture or when viewing the last page of a larger album, that the DataPager that was added back in chapter 13 on page 469 and the PlaceHolder that contains the Album's creator and bio floated up and to the right.

I checked the official Planet Wrox website online and it didn't exhibit this behavior. For every album there, both the DataPager and PlaceHolders remained in a constant position at the bottom of the page above the footer.

My idea to resolve this would be to put both the DataPager and PlaceHolder in a div that leverages a CSS class that keeps it in a constant position, however I'm not sure if the DataPager can be removed from within the <LayoutTemplate> tags. Any insight would be greatly appreciated.

Thanks,

John
 
Old September 24th, 2009, 12:04 PM
Authorized User
 
Join Date: Sep 2009
Posts: 23
Thanks: 9
Thanked 1 Time in 1 Post
Default

Imar,

After looking into this further, it appears to be yet another problem with IE 8. When I ran the page with Compatibility View on, the DataPager and PlaceHolder remained just above the footer regardless of the albums size.

John
 
Old September 25th, 2009, 03:18 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 John,

If I understand you correctly, the live site has the same problem, right?

You can add a clear: both style on the div that surrounds the pager:

<div style="clear: both;">
<asp:DataPager ID="DataPager1" runat="server" PageSize="3">
<Fields>
<asp:NextPreviousPagerField ButtonType="Button" ShowFirstPageButton="True" ShowLastPageButton="True" />
</Fields>
</asp:DataPager>
</div>

This creates a break before the pager and puts it on its own line, below the pictures.

Hope this helps and is what you're after. If not, please let me know.

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:
jsymons (September 25th, 2009)
 
Old September 25th, 2009, 07:50 AM
Authorized User
 
Join Date: Sep 2009
Posts: 23
Thanks: 9
Thanked 1 Time in 1 Post
Default

Imar,

Yes, the same problem impacts the live site, but only if you are viewing it with IE 8. Your solution of adding style="clear: both;" to the div that contains the DataPager resolved the issue regardless if your running IE 8 with Compatibility View on or off. As always thanks for all your help with my questions.

Thanks,

John





Similar Threads
Thread Thread Starter Forum Replies Last Post
Dynamically Add textboxes and place there values in respective positions sanjivbshinde ASP.NET 2.0 Professional 0 January 5th, 2009 02:30 AM
C#.Net Development Engineer (2 positions) lashan C# 4 January 25th, 2008 03:41 PM
Oracle PL/SQL Developer (2 positions) lashan SQL Server 2005 0 January 7th, 2008 01:14 PM
ordinal positions JENKINSACTIVE Pro VB Databases 0 November 29th, 2004 08:25 AM
Specifying column positions Bemerson XSLT 0 June 17th, 2004 10:36 PM





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