I have a value in Jquery. I need to apply that value to a view which has a model. For example, I need to do assign it to the :
@Html.HiddenFor(model => model.program.programid)
我试图在<代码>model.program.programid上储存的变量称为prog
。
我尝试:
$( #program_programid ).val(prog);
但它似乎没有给它分配价值。