I work with jQuery form and ASP.NET MVC. Preview 5 ASP.NET MVC has an extension method for HttpRequest called IsAjaxMvcRequest that determines if POST has been requested by Ajax. This extension method basically “sniffs” a form value called __MVCASYNCPOST and (mostly) returns true if it sees this element.
What I want to do is paste this value using a script (I cannot use a hidden field because it defeats the target) in the form message - and I don't know how to do it with jQuery.
Here is my code:
<script type="text/javascript"> $(document).ready(function() { $('#jform').submit(function() { </script>
I really need to know how to do this :), but I do not! In addition, code savings are required here, so the LOC score is evaluated.
user1151
source share