I am working on MVC application , i want to apply one if condition but not working. i am missing something. It says too many characters in character literal
Invalid expression term {
(function () {
$(document).ready(function () {
app.applyDatatable("tblInitPricing", false, [7], [7], 5, "desc", true);
var sr = @Html.Raw(Json.Encode(Model.CanvasJsonData));
@if(Model.IsValidCanvasUser)
{ //i am trying to open this curly braces here
Sfdc.canvas(function() {
Sfdc.canvas.client.publish(sr.client, {
name: 'mybox.sendVal', payload: { value : 'request created'} });
}) () ;
}//i am trying to end this curly braces here
});
})();