18 Jul 2012
12 Aug 2009
Link to this post
assuming that you're changing it's property on the Click Event, you shouldn't need the session. Changes in asp.net controls are maintained automatically using ViewState (a hidden variable on the page), so if you set Visible=False on the control at the page level, then on Click you change it to Visible=true, it should stay visible because the Viewstate will be updated when the event fires. So you should be able to remove any code on pageload that changes the visibility...
however all of this assumes you are posting to the page to make your search. If you are redirecting (which it sounds like you are, since you're using a querystring) then you would have to use another method. I would suggest instead of using the session, simply check if the query string is present and has a value. If so, then a search was performed, so the search box should be visible. you can even populate the search box with the parameter so users can see what was searched.
hope that helps!