开发者

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

开发者 https://www.devze.com 2023-01-18 00:27 出处:网络
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

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

精彩评论

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