tags:

views:

15

answers:

1

Hi,

Every time i enter set of values like Group Name,Group Abbreviation,URL in the text boxes and click the save button automatically its saves in the database and for each set of values a new details view has to be generated dynamically with a web panel and the header of the web panel should have the value of Group Name. Example:

 Group1

Name Group1

Abbreviation G1

URL http://stackoverflow.com

  Group2

Name Group2

Abbreviation G2

URL http://stackoverflow.com

A new details view with web panel like the above has to be generated every time the save button is clicked.

Thanks in Advance.

A: 

This solution assumes each group is a single database record.

  1. Use a datasource which pulls all of the IDs for the groups that should be displayed on the page.
  2. Create a repeater control and set its datasource to the datasource created in step 1
  3. Add a hidden input field to the content template for the repeater control. Bind it's value to the group's id.
  4. Add a details view control to the repeater control template.
  5. Add a datasource to the repeater control template that returns a group record filtered on the hidden input control.

When you submit a new group, make sure to rebind the data on the repeater control created in step 2.

Alternatively, it would be much easier to just use a listview if possible.

wllmsaccnt
Thank you so much for your answer.I have tried the procedure but i was not able to solve it.Can you please give the code for above explaination.
Sree