how to access the Model Classes in Jquery in asp.net mvc ?
+3
A:
Model classes are part of server side. You can't just access them by jQuery (and any other client-side javascript)
Andrey
2010-09-30 10:57:16
+2
A:
u can always assign values of flat items (non complex types) to js variables using <%%> tags in ur views
var abc = '<%=Model.ABC%>';
now u can use abc as a javascript variable
Muhammad Adeel Zahid
2010-09-30 11:06:28
Will this work really?
Lalit
2010-10-01 04:23:12
yes it does work
Muhammad Adeel Zahid
2010-10-01 05:03:21