Wrox Programmer Forums
|
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 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 May 15th, 2009, 11:37 AM
Authorized User
 
Join Date: Mar 2009
Posts: 75
Thanks: 16
Thanked 1 Time in 1 Post
Default ControlState in ArticleListing

Why do we need to save&load contol's state?
Viewstate is not enough?

Please explain, thanks.
 
Old May 15th, 2009, 11:50 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

User control state used to be stored in ViewState in ASP.NET 1.1. In version 2.0, control state was created as a separate state mechanism, so that viewstate could be turned off if desired, without messing up user control state.
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
 
Old May 16th, 2009, 10:09 AM
Authorized User
 
Join Date: Mar 2009
Posts: 75
Thanks: 16
Thanked 1 Time in 1 Post
Default

So if I won't disable viewstate I can remove the control state functionality, right?

And also, where do we set the properties like enableHighlighter and _showCategoryPicker of this class?

Last edited by yevi; May 16th, 2009 at 10:44 AM..
 
Old May 18th, 2009, 10:11 AM
Lee Dumond's Avatar
Wrox Author
 
Join Date: Jan 2008
Posts: 923
Thanks: 12
Thanked 166 Times in 162 Posts
Default

Quote:
Originally Posted by yevi View Post
So if I won't disable viewstate I can remove the control state functionality, right?
No. As I said, since the release of 2.0, user controls use Control state, not Viewstate. If you need to preserve state in a user control, you need to use Control state. Viewstate being enabled or disabled has no effect on Control state.

[/quote]
__________________
Visit my blog at http://leedumond.com
Follow me on Twitter: http://twitter.com/LeeDumond

Code:
if (this.PostHelpedYou)
{
   ClickThanksButton(); 
}
The Following User Says Thank You to Lee Dumond For This Useful Post:
yevi (May 18th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
ArticleListing - Order By... philthy BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 8 March 25th, 2009 09:32 AM
Sorting with ArticleListing.ascx BradenBR BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 0 February 15th, 2007 11:55 PM
ArticleListing control Koleraba BOOK: ASP.NET 2.0 Website Programming Problem Design Solution ISBN: 978-0-7645-8464-0 1 December 12th, 2006 11:42 AM





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