I have this form
@using (Ajax.BeginForm("opImportFile", "Operacao", new AjaxOptions { HttpMethod = "POST",
OnSuccess = "LimparCampos('true')", OnFailure = "LimparCampos('false')" },
new { id = "formUpdStoringSettings" }))
{ ... }
Instead of true or false, I would like to pass a string returned by /Operacao/opImportFile
Is this possible?
Based on the documentation, the callback is being provided with the returned ajax content, which itself has a “
get_data()method to get the response from the server”.In your definition, you probably just need to point to the callback method, and not actually call it yourself (meaning, don’t include the paramters):