开发者

how to access the Model Classes in J query?

开发者 https://www.devze.com 2023-01-18 17:44 出处:网络
how to access the Model 开发者_JAVA百科Classes in Jqueryin asp.net mvc ?Model classes are part of server side. You can\'t just access them by jQuery (and any other client-side javascript)u can always

how to access the Model 开发者_JAVA百科Classes in Jquery in asp.net mvc ?


Model classes are part of server side. You can't just access them by jQuery (and any other client-side javascript)


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

0

精彩评论

暂无评论...
验证码 换一张
取 消