Home
Help
Register
Log in

Search

 
   Active Threads  

You are here: Home > LLBLGen Pro > LLBLGen Pro Runtime Framework> Does the LLBLGenProDataSource2 *need* ViewState?
 

Pages: 1
LLBLGen Pro Runtime Framework
Does the LLBLGenProDataSource2 *need* ViewState?
Page:1/1 

  Print all messages in this thread  
Poster Message
MattWoberts
User



Location:
Lancaster, UK
Joined on:
08-Apr-2004 10:24:31
Posted:
497 posts
# Posted on: 24-Sep-2007 11:48:00.  
Hi,

I'm working on a page which is creating quite a lot of viewstate, thus making the file size pretty big. It uses a repeater to repeate a user control a number of times (about 10). Inside the user control an LLBLGenProDataSource2 object is used to get the data for a grid - all works fine.

The file size for this page with a little data is 181K.

Howerver, if I modify the LLBLGenProDataSource to set EnableViewState = false, then the file size drops to a whopping 69K, but it stops working! When I save a grid's data, nothing is updated in the database.

Do I have to use the viewstate? What exactly is is storing in there - thats quite a lot of data!

[Edit]
I can confirm that the PerformWork method isn't firing when viewstate is set off. I wonder if I need to re-wire this up in the page load to make it start working...
[/Edit]

[Edit2]
Nope, the PerformWork just wont fire without viewstate, this is a major problem for me! I hope Frans is reading Wink
[/Edit2]
Matt  Top
MattWoberts
User



Location:
Lancaster, UK
Joined on:
08-Apr-2004 10:24:31
Posted:
497 posts
# Posted on: 24-Sep-2007 12:29:35.  
Aha, just re-read the docs:

The LLBLGenProDataSource2 control contains a data containing object, be it an entity collection, TypedList or TypedView. This data is cached in-between postbacks, until the data has to be refreshed. The place where this data is cached is either in the viewstate, ASP.NET cache or the session

Sheesh, I apologise for posting before being 100% sure the info was not in the docs!


Matt  Top
Otis
LLBLGen Pro Team



Location:
The Hague, The Netherlands
Joined on:
17-Aug-2003 18:00:36
Posted:
38021 posts
# Posted on: 24-Sep-2007 12:31:25.  
To be able to perform 2-way databinding, the original data has to be stored somewhere. Regular Smiley So you can pick your poison where to store it. Regular Smiley
Frans Bouma
LLBLGen Pro / ORM Profiler Lead Developer | Blog | Twitter
 
Top
Pages: 1  


Powered by HnD ©2002-2007 Solutions Design
HnD uses LLBLGen Pro

Version: 2.1.12172008 Final.