I have a simple aspx page.
In this page I want to add dynamically dropdownlist-textbox pairs that represent key-value pairs. But I dont know how much it is when page loading. So I must add these controls to page dynamically(in runtime)
If I add these controls in codebehind 2 problems arise :
- Page is reloaded in every appending because of autopostback. It couses blink.
- Whenever page reloads, previous appending disappear.
If I add these controls in client-side(javascript) :
- Controls cannot be reachable in codebehind(because no runat=server) so validation steps open to user(I think validation steps must operate in codebehind othervise this is an integrity problem).
What would be true approach about this problem ? Could give example ?