I want split Javascript code by newlines, but the compiler gives me an error:
<%= Html.ActionLink("Delete", "delete", new { id = Model.Id },
new {
@class="button-link",
onclick = " javascript;
javascript goes here;
javascript goes here;
javascript goes here;
return false;"
}
); %>
You could use a verbatim string literal — starting the string with the
@symbol — but it probably makes more sense to move your JavaScript out into a separate.jsfile, as Darin suggests.