asp.net-mvc – Html.TextBoxFor在POST操作中不显示更新的值
发布时间:2020-05-28 13:29:25 所属栏目:asp.Net 来源:互联网
导读:在我看来,我有 %:Html.LabelFor(model = model.IPAddress)% div class=editor-field %:Html.TextBoxFor(model = model.IPAddress)% %:Html.ValidationMessageFor(model = model.IPAddres
|
在我看来,我有 <%:Html.LabelFor(model => model.IPAddress)%>
<div class="editor-field">
<%:Html.TextBoxFor(model => model.IPAddress)%>
<%:Html.ValidationMessageFor(model => model.IPAddress)%>
</div>
在我的控制器(post方法)中,我有这个 [HttpPost]
public ActionResult Manipulation(MyModel model){
//I change modele here
if(somthing)
model.IPAddress="100.100.100.100";
return View(model);
}
所以,我的问题是: 你能帮助我吗? 解决方法尝试:ModelState.Clear(); return View(model); 如果不是结果!返回JSON结果,然后通过javascript更新 (编辑:安卓应用网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
相关内容
- asp.net – 从SyndicationContent读取内容文本
- asp.net-mvc – ASP.NET MVC和Unity 1.2容器问题
- 使用ASP.NET将HTML表导出到Excel
- asp.net-mvc – MVC控制器操作参数为null
- asp.net – 如何向DropDownList添加初始“select”值
- ef-code-first – 如何使用LocalDB和EF,而不使用迁移
- asp.net-mvc – MVC – 重定向在构造函数内
- asp.net-mvc – 在ASP.NET MVC中在HTTP和HTTPS之间移动
- 在asp.net中HttpContext.Current.User和Thread.CurrentPrin
- asp.net下使用jquery 的ajax+WebService+json 实现无刷新取
推荐文章
站长推荐
- asp.net – 当使用HttpContextScoped()时,Struct
- asp.net-mvc – 使用OWIN和WsFederation为MVC,we
- asp.net-mvc – 从控制器重定向初始化不工作
- asp.net – GridView在行选择后滚动回到顶部
- asp.net – 解析服务器端标记时出错
- asp.net – Silverlight初始化错误2110 Internet
- asp.net – DNN vs Composite C1 – Pro and Con
- asp.net-mvc – 使用Html.RouteLink添加一个css类
- asp.net – 如何禁用.NET事件日志警告?
- asp.net – SignalR和HttpContext / Session
热点阅读
