Squeezing in between LoadViewState and LoadPostData

K

kaniga

Hi,

I am trying to build an application framework for loading data into my
page controls (data-binding).

I though that I could load the data at Page_Init (calling to the
applications Business Logic),
and this would allow me to get the user's selections on postbacks,
i.e.
if I fill a drop-down-list on page init, I would get the user's
selection just before the Page_Load.


The problem is that I want to have the viewstate for my controls ready
for me, so I know which data I should load when I call the Business
Logic.

For example,
if I have a grid with a sorted column set, I want to get that sorted
column on every postback, so I can get the data with the proper ORDER
BY.

So I figured I should squeeze in between LoadViewState and
LoadPostData (which loads user's selections).
The problem is that there is no such event:
I cannot override LoadViewState for the page because it occurs just
before LoadViewState for all of the child controls.

Is there any solution for this ?

Yair Benyami.
 
B

bruce barker

use the LoadViewState override. just call the base method (which will load
viewstate) before calling your framework code.

-- bruce (sqlwork.com)
 
K

kaniga

The problem is that the LoadViewState method for the page is called
BEFORE the LoadViewState for any of its child controls.

I need to be able to respond AFTER all LoadViewState methods are
called and before LoadPostData.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top