开发者

how can i change the View Data data from j query and assign it to control?

Hi I am getting data in ViewData on my view in my asp.ne开发者_如何学运维t MVC application. I want to change the value of control dynamically. so I have write the Jquery for this. But How to get data from ViewData and and update it dynamically? how can i change the View Data data from j query and assign it to control ?


u can assign value of viewdata value to ur javascript variable at the top of ur page then u can use this variable in setting ur control values

var vdval = '<%=ViewData["key"]%>';

then use vdval to set ur control values

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜