Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0
This is the forum to discuss the Wrox book ASP.NET 2.0 Website Programming: Problem - Design - Solution by Marco Bellinaso; ISBN: 9780764584640
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old October 11th, 2007, 03:39 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default Additional errata

Page 160, the regular expression is different from the one supplied in the downloaded code.

I didn't see it mentioned in the official errata list, so not sure if this is the proper way to report it?

Cheers,

Peter

http://entropia-online.blogspot.com/
__________________
http://entropia-online.blogspot.com/
Reply With Quote
  #2 (permalink)  
Old October 15th, 2007, 03:28 PM
Friend of Wrox
 
Join Date: Sep 2003
Location: Copenhagen, , Denmark.
Posts: 143
Thanks: 0
Thanked 1 Time in 1 Post
Default

The Showthread.aspx contains a slight bug as well. If you get a thread with more than 1 page worth of posts, the title (Thread: {0}) will *not* be updated, due to the title only being set in case of NOT a postback.

I did a very quick and very dirty solution:

protected void Page_Load(object sender, EventArgs e)
{
    threadPostID = int.Parse(this.Request.QueryString["ID"]);

    if (!this.IsPostBack)
    {
        threadPostID = int.Parse(this.Request.QueryString["ID"]);
        Post post = Post.GetPostByID(threadPostID);
this.Title = string.Format(this.Title, post.Title); post.IncrementViewCount();
        lblPageTitle.Text = string.Format(lblPageTitle.Text, post.ForumID, post.ForumTitle, post.Title);
        ShowCommandButtons(post.Closed, post.ForumID, threadPostID, post.AddedBy);
    }

became

protected void Page_Load(object sender, EventArgs e)
{
    threadPostID = int.Parse(this.Request.QueryString["ID"]);

    if (!this.IsPostBack)
    {
        threadPostID = int.Parse(this.Request.QueryString["ID"]);
        Post post = Post.GetPostByID(threadPostID);
        post.IncrementViewCount();
        lblPageTitle.Text = string.Format(lblPageTitle.Text, post.ForumID, post.ForumTitle, post.Title);
        ShowCommandButtons(post.Closed, post.ForumID, threadPostID, post.AddedBy);
    }

    try
    {
        Post post = Post.GetPostByID(threadPostID);
        this.Title = string.Format(this.Title, post.Title);
    }

    catch { }
}

http://entropia-online.blogspot.com/
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Additional page to my store d-print BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 29 November 23rd, 2007 11:32 AM
How a additional prefix in a namespace comes? diang BOOK: ASP.NET Website Programming Problem-Design-Solution 0 July 13th, 2006 11:40 PM
How to generate an additional field fdtoo SQL Server 2000 2 April 12th, 2006 09:44 AM
Additional basic types in C# Kep C# 1 July 1st, 2004 04:42 PM
Additional Wizards huskie Access 5 August 22nd, 2003 07:59 PM



All times are GMT -4. The time now is 10:48 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.