Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

AddressValidation.cshtml

@model AddressValidationModel

<script asp-location="Footer">
    $(function() {
        @if (Model.IsError)
        {
            <text>alert('@Model.Message');</text>
        }
        else
        {
            <text>
                var customerConfirmation = confirm('@Model.Message');
                if (customerConfirmation) {
                    var postData = {
                        addressId: '@Model.AddressId',
                        isNewAddress: '@Model.IsNewAddress'
                    };
                    addAntiForgeryToken(postData);

                    $.ajax({
                        cache: false,
                        type: 'POST',
                        url: '@Url.Action("UseValidatedAddress", "AddressValidation")',
                        data: postData,
                        dataType: 'json'
                    });
                }
            </text>
        }
    });
</script>