asp.net - Close server-side form after submit postback
I have a form with the runat="server" attribute set. (This is not the main form on the page)
It is inside a div which is hidden by default.
Using jQuery I show it on a click event of another button.
When the form is submitted the postback happens and I want to hide the div again if the postback completed without errors. If there was a validation error, I want to leave the form visible and the server-side code handles showing the correct error.
What I'm missing is how to tie in the postback return to the jQuery han开发者_如何学JAVAdler to re-hide the form. One idea I had was using a hidden form field, but I would rather find a more elegant solution.
Thank you!
I would simply set the Visibility to False on the server side :-)
精彩评论