views:

18

answers:

2

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
+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
Will this work really?
Lalit
yes it does work
Muhammad Adeel Zahid