nacho10f
nacho10f

Reputation: 5876

help with view rendering asp.net mvc

My app has these models:

patient, which has one patient_info, which has one history and has many exams.... I want to create a Report view where I show all this data.. right now Im creating the view and its turning out to be ugly and long.. is there a way I could create separate views for each of this things and then just render them in one Report View?

Upvotes: 1

Views: 101

Answers (2)

ebrown
ebrown

Reputation: 801

You could break up the report into partial views and render them using Htm.RenderPartial

Upvotes: 2

mdm20
mdm20

Reputation: 4563

You could create a controller action for some of the sections and grab that data via AJAX when needed. You could use an expander type control to determine what is shown and grab the data only when a section gets expanded. This would also allow the possibility of displaying the patient info while loading the history using AJAX so the page loads fast.

Upvotes: 1

Related Questions