小编mar*_*tin的帖子

Asp.NET MVC Html.TextBox刷新问题

我有一个asp.net mvc 2和html.textboxfor助手的问题.我在表单中使用以下代码:

<%= Html.TextBoxFor(model => model.Zip, new { @class = "txt", id = "zip", tabindex = 1 })%>
Run Code Online (Sandbox Code Playgroud)

当用户发送表单时,我验证了zipcode,当zip无效时我们设置了更正后的zip.我的模型有更正的zip,从asp生成的html代码包含旧的zip值.

示例:用户写拉链:12345我的验证类,更正了拉链:12346我的模型包含新拉链:123456,关于gui我只看到12345

问题是什么?

asp.net asp.net-mvc caching refresh html.textbox

9
推荐指数
1
解决办法
4834
查看次数

标签 统计

asp.net ×1

asp.net-mvc ×1

caching ×1

html.textbox ×1

refresh ×1