You can aviod Javascript altogether and just use Asp.Net!
The Link button - lets call it Linkbutton1, will sit inside a Panel - Panel1. The expand and collapse feature will be controled by another Asp.Net control the CollapsoblePanel Extender - lets call that one Extender1, you can use code in the link button click to touch the Extender control
Extender1.Collapsed = True
This should keep it open through the round trip.