Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 4.5 : in C# and VB
This is the forum to discuss the Wrox book Beginning ASP.NET 4.5: in C# and VB by Imar Spaanjaars; ISBN: 978-1-118-31180-6
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 4.5 : in C# and VB 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 21st, 2013, 04:26 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Gridview View State

If view state is disabled for GridView Control can a row event be fired? I was a bit confused on that when you went over GridViews in the book.
 
Old January 21st, 2013, 04:38 PM
Friend of Wrox
 
Join Date: May 2011
Posts: 411
Thanks: 13
Thanked 7 Times in 7 Posts
Default Speaking of view state:

Some questions for you that I am not sure about after reading some of the information in your book.
What types of objects are stored in the ViewState?

· How is view state managed internally on the server?


How does a DataGrid bind to DataSet if DataSet does not implement IEnumerator?


In case of class a : b and class c : a can I access property of class b in c?

Last edited by vbboyd; January 21st, 2013 at 08:57 PM..
 
Old January 25th, 2013, 04:02 PM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

First of all, please start a new thread for a new topic. Makes things easier to manage. Secondly, please post a new post for a new question and don't alter the existing ones. Updating a post doesn't trigger e-mail notifications and as such may go unnoticed.

That said, any class that s Serializable (has the Serializable attribute applied) can be stored in ViewState. However, the fact you could doesn't mean you should. In general, only store tiny bits of information in ViewState such as numbers, short strings etc. The .NET controls store stuff like the current page Index and other state data, but *can* also store the actual data, which is typically a bad idea because of the site.

ViewState is not stored at the server. When a page posts back, it's used to prepopulate the page with existing values and state.

>> In case of class a : b and class c : a can I access property of class b in c?

Why don't you try it out? The best way to discover things like this.

The extended answer is: it depends on the visibility / access scope of the property. Public and protected properties can be seen; private ones can't.

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!





Similar Threads
Thread Thread Starter Forum Replies Last Post
View state question. vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 1 April 25th, 2012 05:38 PM
AJAX and View State vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 1 February 22nd, 2012 02:09 PM
The View State Issue vbboyd BOOK: Beginning ASP.NET 4 : in C# and VB 2 January 27th, 2012 10:06 AM
Session State|View State|Do I have other options? rockon ASP.NET 1.x and 2.0 Application Design 2 October 5th, 2005 07:10 PM





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