In my html, I use Model.Subcontract.company
How can I reference that data in my jQuery?
Dynamic content in static content
1:Id with / causes problems with routing [duplicate]
Set the value to an html element and then access it via jquery.. How to define route & controller structure for 2 controllers?ASP.NET MVC - HTML.BeginForm and SSLasp.net mvc IDataErrorInfo validation when using ViewModel
<input type="hidden" value="<%= Model.Subcontract.Company %>" id="hidData" name="hidData" /> $("#hidData").val();
2:How to make data available when one Controller's View calls another Controller's View?
This is an effective way to reference the model as an object in jQuery:. Is WPF and MVC same concepts?
If you want to avoid the harmless, intellisense error:. jQUERY onclick post
var model = @Html.Raw(Json.Encode(Model))
var model = [@Html.Raw(Json.Encode(Model))];
I was able to did it like this:.
It's always easier to figure it out after you've given up and asked the question!.
"<%= Model.Subcontract.company %>"