Yes, it is definitely possible to include JavaScript in Razor and utilize values from your Model object to create dynamic scripts. An example would be:
var foo = {someValue: '@Model.SomeValue,', someOtherValue: '@Model.SomeOtherValue'};
There are various approaches to achieve the desired outcome. One option is to design a form using Html.BeginForm and customize the submit button to resemble a link. This eliminates the need for JavaScript. Another alternative is to employ JQuery to assign a function to the click event of your link:
<input type="text" id="ZIP" name="ZIP" />
<a <a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="92fae0f7f4afd2c7e0febcd3f1e6fbfdfc">[email protected]</a>("VerifyZIP","Controller",new{ @id = "my-link")>Send To Controller</a>
<script>
$('#my-link').click(function () {
var url = '@Url.Action("VerifyZIP","Controller")';
var zipValue = $('#ZIP).val();
var params = { zipValue };
$.get(url, params, function(response) {
// do something with response
);
});
</script>
You could also implement the above as an inline function with an onClick attribute, if preferred.
The approach you take greatly depends on the specific requirements of your project. It appears that a simple form might suffice for your needs.