Click here to Skip to main content
15,892,517 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello guys,

I was using Javascript codes to generate rows yes it was working, but when I used dropdown and made Connectivity with database then Postback happens all rows generated removed from the page ,I would like to know how to remove Postback problem in javascript to generate dynamic rows


Please Help me
Posted

1 solution

You should maintain the state of generated Rows.
Of course you can not use ViewState or Session through JavaScript ( At least I don't know how to do that ).
But still you can use HiddenField for this purpose because you can set there value at client side by JavaScript and can get there value at Server side by using HiddenField ID.

You should maintain data in HiddenField and on every Postback should generate them from that data that was saved in HiddenField.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900