For accessing Model of View by Javascript I can use
var additional = '@Html.Raw(Json.Encode(Model))';
But how about Model of Partial view from the main view?
The problem I'm facing is I load partial view into a Keno UI window widget via jQuery ajax call, Inside the partial view I have Upload widget and it has some event ( ie: onUpload event ) , if i put the onUpload event inside the partialview, it doesn't recognize it. So I had to put it in Main view.
In that case '@Html.Raw(Json.Encode(Model))' return the Model of Main view and not the partial one.
Any ideas on how to resolve this problem?
@{ Html.RenderAction("YourView"); }