Create Row With Java Script But Its Gone On My Asp Panel
Solution 1:
This problem arises because you've misunderstood the ASP.NET life cycle. When you have a postback to the server (for example, after clicking ButtonNext), any client side changes that you've made will disappear, and the page is regenerated from the server and sent to the client.
There's several ways to get around this:
You can use server side code to add new rows. This is the least efficient but easiest method.
You can detect on the server by reading the posted form values how many rows were added and what their values were, then recreate them on the server and send them back as part of the response.
You can eliminate postbacks and use client side JavaScript to do showing/hiding of the panel. I like this style best because it's the most efficient use of resources, and you don't have both client and server side trying to manipulate the DOM.
Post a Comment for "Create Row With Java Script But Its Gone On My Asp Panel"