Jul 07, 2011, 11:31 AM
[CLOSED] Remote validation for textfield in MVC project
Hello:
I try to do the remote validation for textfield in MVC project. When I input something, the remote validation do fired. But when the validation finished I always get a request error message from my controller.
here is the textfield markup
Could you please have a look to see what cause the error?
Thnk you
I try to do the remote validation for textfield in MVC project. When I input something, the remote validation do fired. But when the validation finished I always get a request error message from my controller.
here is the textfield markup
<ext:TextField ID="textField" Width="270" MaxLength="50" MinLength="4" AllowBlank="false"
runat="server" FieldLabel="Name:"
ValidateOnBlur="true" MsgTarget="Qtip" Text="Name Validation Test"
BlankText="You must input the name." IsRemoteValidation="true">
<RemoteValidation Url="~/Controller/CheckName" Json="true">
</RemoteValidation>
</ext:TextField>
the action method in controller public AjaxResult CheckName(string value)
{
AjaxResult result = new AjaxResult();
result.ErrorMessage = "validation failed";
return result;
}
I am not quite sure the return type and value is correct. Maybe that causes the error.Could you please have a look to see what cause the error?
Thnk you
Last edited by Daniil; Jul 08, 2011 at 12:07 PM.
Reason: [CLOSED]