I have a problem, and understand why it is happening but not the best way to fix it. I have SQLDatasource control with a parameter in its WHERE statement (WHERE ID = @ID). The parameter's source is a session variable. Control values on the page are bound to this SQLDatasource during the page load event. I then have a couple of buttons on the page that change the Session("ID") value in thier click event handler. When I click a button the page reloads, and while reloading the new Session value is assigned at some point. Unfortunatly it seems as though the SQLDatasource rebinds to the old session variable just before the new session value is assigned. None of the controls change on the first click of the button, but if it is clicked a second time, or if the page is reloaded (F5) again after the initial button is clicked, the controls on the page correctly reflect the proper valu ...
Go to the complete details ...