I have the next piece of code:
@(Html.Infragistics().Combo("CountriesCombo") .LoadOnDemandSettings(pLoad => pLoad.Enabled(true).PageSize(25)) .DataBind() .DataSourceUrl(@Url.Action("GetCountries")) .ValueKey("Id") .TextKey("Text") .Width("400px") .HeaderTemplate("<div class='dropDownHeaderFooter'>Available countries</div>") .FooterTemplate("<div class='dropDownHeaderFooter'>Total: {0} / {3}</div>") .FilteringType(ComboFilteringType.Remote) .Render())
If GetCountries fails (something bad happened in the backend for example), how to catch the exception with Ajax/Javascript/jQuery and show an alert in the client side?