How to ESCAPE "comma" in Javascript
<p><strong>EDIT1:</strong></p>

<pre><code>btnDelete.Attributes.Add("onclick", String.Format(@"return DeleteRow('{0}',{1},{2},{3});", e.Row.ClientID, e.Row.RowIndex, DataBinder.Eval(e.Row.DataItem, "Id"), "'" + DataBinder.Eval(e.Row.DataItem, "Name") + "'"));
</code></pre>

<p>edit:</p>

<p>i get this error:</p>

<p><strong>Message: Unterminated string constant</strong></p>

<p>i am passing the value from code behind and some of my text have somethinh lke this:</p>

<p><strong><code>Foo3, In.c</code></strong> </p>

<pre><code>   //javascript
    function DeleteRow(rowId, rowIdx, Id, Name) {         
        var textForMessage = "return confirm('Are you sure you want to delete this record with the name: \n{0} \n{1}');";
        //removed code...  
       return result;
    }
</code></pre>
