Question

I got a view, where 3 partial views are rendered: 1. Partial View: Main Entity (Description, Name, etc...) 2. PV: Some Values which need the ID from the Main Entity and an ID from another table 3. PV: another custom Value table (x,y values e.g.) which needs also the Main Entity ID

So my question is how do I bind that correctly, to create these dependend entities at once? The Main entity is not the problem, rather the other two PVs, because I'm not sure how to be able to add an custom amount of this entries in the view and then send them back altogether to the server. I guess its not possible with Navigation Properties of EF? But when using "Data Transfer Objects" (custom classes) how to handle that? Do I need to create empty value lists when getting the empty page first?

Was it helpful?

Solution

you may load the n number of the views in just simple steps

JQuery:

<Script>
$("#myPartialView1").load('/URL?Params='+Value);
$("#myPartialView2").load('/URL?Params='+Value);
$("#myPartialView3").load('/URL?Params='+Value);
</Script>

@Using(Html.BeginForm())
{

<div id="myPartialView1"></Div>
<div id="myPartialView2"></Div>
<div id="myPartialView3"></Div>

<input Type="Submit" Value="Submit">
}

All the data present in the views will be posted on the main action method. Hope this will be help full to you. Good Luck. Thanks is always appreciated. Please Vote.

OTHER TIPS

Actually I am not getting the exact point but please mention the what is the relationships present in the all the partial views may be foreign and primary keys.

Sorry not getting you.Please show the image for further help.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top