views:

134

answers:

2

HI everyone, I'm having the following issue that is really driving me crazy.

After I perform any sort of postback, several controls do not rebind themselves, for instance

DetailsView with an attached ObjectDataSource (in my case ObjectContainerDataSource) LoginView is not showing the LoggedInTemplate but LoginStatus is showing me as logged in.

I'm almost desperate and I like to know if you've had the same issue or similar in the past and can give me some hint.

Thanks in advance

+1  A: 

Without seeing any of your actual code I would suggest you look at EnableViewState settings for the page and for the individual controls.

This is a good article on managing viewstate.

You should also look for code in a section like this in your page_load()

if(!IsPostback)
{
    // code to bind some of your controls
}

That code would only be called the first time you enter the page, but not in the postback. If you leave the page and come back then that bind code would run again.

Gary.Ray
A: 

Is your databind happening in the page_load event? If not, are you rebinding when the page is reloaded?

Are your controls loaded dynamically?

lomaxx