1

I need to work on a dynamic form which will be generated based on database table.

For example i have product Table with ID & Name columns

and i have following records in the table.

ID Name

1  Name One
2  Name Two
3  Name Four
4  Name Five

Now i need to generate a dynamic form in asp.net webform using data from this table.

Form will be similar to what is shown here http://codepen.io/anon/pen/gLNByB

I have not sure how to make it work with following tasks

  1. I have to generate form dynamically
  2. I have to pass these values & amount of Checked Checkbox & store them in Different table. (Values to be store will be ID & Amount

Any pointer in this regard would be of great help.

1 Answer 1

1

I have to generate form dynamically

You have to create your controls dynamicly in your OnInit EventHandler. You can loop over your data and create the needed Controls.

I have to pass these values & amount of Checked Checkbox & store them in Different table. (Values to be store will be ID & Amount

May you have a SubmitButton, on the btn_Click EventHandler, you can access the control values and do with them what ever you want.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.