same PartialView but with different data.
I can definitely place a partialView more than once but how I should differentiate between the partial view. How to set the data in both the instances differently? Do I get any instanceID or something like that.
I have to show the same PartialView but with different data.
that means you have 2 diffferent data – let’s say Data1 and Data2
@Html.RenderPartial("My_Partial_View" , Data1)
@Html.RenderPartial("My_Partial_View" , Data2)
Data1 and Data2 in
@Html.RenderPartial("My_Partial_View" , Data1) line is model right?
passing diferent models with renderpartial.
Now next question comes how can I have two instances of same model with different data in a view page?
how can I have two instances of same model with different data in a view page?
I think it’s not possible. You could declare a var with the same type than the model and assing its value:
@ModelType MOD_EditCreateUser @Code Dim model2 As MOD_EditCreateUser = Model End Code