I want to code a line like this in my mvc view:
<input type="button" id="Show" name="Show" onclick="javascript: AjaxPostAndProcess('myController/MyAction',{input1: ($('#formId').find( 'input[name="input1"]').val()})" />
but the doublequotes around “input1” are inside the singlequotes enclosing the parm to .find, and it’s all inside the doublequotes of the onclick expression. Is there any way to escape this to get it to work?
I would do it differently:
Keeping it unobtrusive. But to answer you question you could replace them with
"