ASP.Net MVC - 将值从 Jquery 分配给视图
我在 Jquery 中有一个值。我需要将该值应用于具有模型的视图。 例如,我需要将其分配给以下内容:
@Html.HiddenFor(model => model.programid)
我尝试存储在 model.programid 中的变量称为 progid。
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 following:
@Html.HiddenFor(model => model.programid)
the variable that I am trying to store in model.programid is called progid.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您使用编辑器模板,则需要添加
@ViewData.TemplateInfo.HtmlFieldPrefix
If you're in an editor template, you'll need to add
@ViewData.TemplateInfo.HtmlFieldPrefix