I use to append according to data array in table on button click, but when I click other button due to postback all the created structure goes away, is there any way that I can retain that structure inspite of postback?
Thanx
When you redirect to another page all values that were stored in javascript variables are garbage collected and are no longer available. There are different techniques allowing you to persist values on the client side. One is using cookies. Another is using HTML5 local storage.
If you need to preserve Javascript state across postbacks then your best bet is to serialise your data and store it in a hidden form field whenever it changes, then reload from this field at page reload time. However, I'd recommend if possible replacing the postbacks with AJAX calls to prevent them happening in the first place.
Retain Javascript objects across postbacksin order to attract more pertinent answers, because static fields are an entirely different concept (and are indeed supported by Javascript).