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.
No. Making a post request leaves the current page, and the current page is the execution environment.
You'll need to include all the data you need to reconstruct the state in the submitted data and then rebuild it on the other side.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With