I am facing an issue with a link button in a gridview as shown below
<asp:LinkButton ID="lbtnEdit" runat="server" OnClientClick='<%# String.Format("Edit(\"{0}\", \"{1}\");return false;",Eval("Comment").ToString(),Eval("Status")) %>' >Edit</asp:LinkButton>
Everything works fine except when there are double quotes in the comment field. I tried changing it to Eval("Comment").ToString().Replace(/'/g, "\'") but unfortunately I received an error stating "The server tag is not well formed."
If anyone has any suggestions or solutions for this issue, please let me know.