Sunday, March 11, 2012

Two UpdatePanel and two SqlDatasource with FormParameters: too many database requests

Just addUpdateMode="conditional"to your update panels. This is what tells it to only respond to those items in your triggers collection.


Hi,

thank you for your reply and I'm sorry, in the provided source code I have removed this "Conditional" expression. But I did this of cource, but the behavior is the same and both SqlDataSources are fetching data ...

The UpdateMode is not the solution ...

Regards
Marc André


What is the code-behind for the two buttons?


Hi,

the two buttons have no codebehind code. They are only responsible for refreshing the UpdatePanel.

Regards
Marc André


Hmm, strange. Are both time labels updating too when you click either button? Try explicitly declaring an action for the button clicks (either .DataBind() for the appropriate gridview or .Update() for the appropriate updatepanel).


Hi,

Yes, i have implemented events for the buttons and i have tested some other options, but the behavior is still the same. I think the SqlDataSource binds always the Parameters, because the control values (Textboxes for searching) from both UpdatePanels will be sent to the server ...

Regards
Marc André

No comments:

Post a Comment