restore dynamically created javascript table structure after asp.net button post back
On runtime i am creating table structure using javascript and appending it to the div which is placed in an update panel. Problem here is, when i use asp.net button control, onClick of the button it posts the page to server and whatever javascript tables i have created it goes off. When i use html input button (input type="button") i don't face this problem and t开发者_StackOverflow社区ables also stay there. But i have to use asp.net button to take necessary actions on the server side. Is there any way that i can restore the structure or use asp.net button control alongwith dynamic javascript. Any help would be appreciated.
Thanks.
You need to save your table structure in an Hidden
field just before clicking/submitting on asp.net button. On Post back, you can redisplay that. The asp.net button has property
OnClientClick, you can use this property.
精彩评论