ASP.NET MVC 3:远程验证后形成不张贴 [英] ASP.NET MVC 3: form not posting after remote validation
问题描述
我要疯了!
我的code是有点太多,张贴在这里,但这个问题很简单:如果我装饰我的模型的一个领域,编辑表单不火了(即点击提交按钮,没有任何反应)。 p>
我可以张贴在这里,远程验证声明和函数:
[必需]
[远程(CheckNomeAssociazione,Associazioni)]
公共字符串诺姆{搞定;组; }
和是这种功能
公共JsonResult CheckNomeAssociazione(字符串诺姆)
{
返回JSON(真,JsonRequestBehavior.AllowGet);
}
如果我评论了[远程...'行中,code是完美的。如果我让它到位,程序步骤到远程验证,但不会做别的。
任何人都具有相同或类似的问题?
提前致谢
安德烈
这可能是晚了一点,但只是作为一个更新,这已不再是jQuery的验证1.8的问题。它不再是突破 $。的getJSON()
,即使是最新的(因为这个职位的jQuery 1.5.2)的作品。
I'm going crazy! My code is a little too much to post here, but the problem is simple: if I decorate a field of my model, the editing form doesn't fire anymore (i.e. clicking the submit button, nothing happens).
I can post, here, the remote validation declaration and function:
[Required]
[Remote("CheckNomeAssociazione", "Associazioni")]
public string Nome { get; set; }
and this is the function:
public JsonResult CheckNomeAssociazione(string Nome)
{
return Json(true, JsonRequestBehavior.AllowGet);
}
If I comment the '[Remote...' row, the code is perfect. If I let it in place, the application steps into the remote validator, but doesn't do anything else. Anyone having same or similar problem? Thanks in advance Andrea
This may be a little late, but just as an update, this is no longer an issue in jQuery Validate 1.8. It no longer breaks $.getJSON()
, even the latest (as of this post jQuery 1.5.2) works.
这篇关于ASP.NET MVC 3:远程验证后形成不张贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!