2

I am creating a meeting booking application using .NET, and i want the approver page to be populated with collapsible bootstrap panels for each booking, each panel will have the booking info in the body. So once i get the booking info from my database how do i create the elements and populate it with data?

2
  • 1
    Use ASP.NET controls like Label to do so. You can populate the design with data from back-end. Commented Oct 11, 2016 at 8:03
  • If you're using .NET webforms then a Repeater is a good way to display a number of elements where the exact number to create is not known until runtime, but all have similar properties. It's strongly typed so you can bind a list of objects to it (e.g. the DTO objects from your database) or even a DataTable direct from the database and then it will loop through all the objects and render one instance of the HTML for each item supplied to it. Here's a sample tutorial: msdn.microsoft.com/en-us/library/zzx23804(v=vs.85).aspx there are many others around online Commented Oct 11, 2016 at 8:50

1 Answer 1

1

There are two approaches I can recommend. The first is using ASP.Net's razor markup to load information dynamically. This follows a Model, View, Controller approach and more information can be found here -> Asp.Net Razor Guide .

An arguably easier approach would be to use Angular.js to load elements and data dynamically while making api calls to your application to fetch data from your database. Angular is very convenient and designed with scenarios just like this in mind.

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

1 Comment

I say arguably as this requires a developer to be more comfortable with front end development.

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.