Mar 14, 2013, 12:59 PM
[CLOSED] [MVC] How to get json values after RemoteValidation
Hi,
I have a TextField with RemoteValidation
Views:
Thank you,
I have a TextField with RemoteValidation
Views:
Html.X().TextField().ID("advisor_id1")
.FieldLabel("advisor_id1").MsgTarget(MessageTarget.Side).ValidateOnBlur(true)
.IsRemoteValidation(true)
.RemoteValidation(r =>
{
r.Url = Url.Action("CheckAdvisor2", "Resource");
r.Method = HttpMethod.POST;
r.Json = true;
//r.Complete = "App.int_advisor_id1.setIndicator(response)";
})
Controllers:public JsonResult CheckAdvisor2(string value)
{
var resource = "valid";
return new JsonResult
{
Data = resource == value
? new { valid = true, message = "ok" }
: new { valid = false, message = "invalid" }
};
}
My question is how I can get json values after validations. For examples: Set indicator text of this textfield with Listeners (RemoteValidationFailure, RemoteValidationValid,...)Thank you,
Last edited by Daniil; Mar 14, 2013 at 5:48 PM.
Reason: [CLOSED]