I am porting a web forms application to MVC3
I have a partial view inside a partial view and the inner partial view is displayed on the basis of content from the model of the parent view.
The parent partial view has this model
@ModelType List(Of Integer)
and then these lines for adding multiple instances of a partial view in the same page.
<div style="width: 25%; vertical-align: bottom; float: left; clear: left">
@Html.Partial("ArtBlock")
</div>
<div style="width: 25%; vertical-align: bottom; float: left; clear: left">
@Html.Partial("ArtBlock")
</div>
<div style="width: 25%; vertical-align: bottom; float: left; clear: left">
@Html.Partial("ArtBlock")
</div>
This div is repeated four times with four values of the List(Of Integer)
. That is, if the first index contains a larger value than 100, it should display the first div above and so on...
UPDATE: The inner partial controls are supposed to be accessed from the database on the basis of id from the index of the list.
I have created the functions in the DAL (which is a separate dll) and now only a function call remains.
In the web forms, the inner user controls were bound using the following...
ArtBlock1.Artikel = DataService.Artikel_GetByID(oList(0))
Can anybody help me on what to do to achieve this?