i wants to add Single Quote to string value Received from object
sb.Append("<input type='button' id='buyNow_"+i+"' class='GetQuote' onclick='return getProposerSection('"+ objResponse.objQuoteDetails[i].PlanName+ "')'/>"
i wants to add Single Quote to string value Received from object
sb.Append("<input type='button' id='buyNow_"+i+"' class='GetQuote' onclick='return getProposerSection('"+ objResponse.objQuoteDetails[i].PlanName+ "')'/>"
The easiest way is this:
sb.Append("<input type='button' id='buyNow_"+i+"' class='GetQuote' onclick='return getProposerSection(\""+ objResponse.objQuoteDetails[i].PlanName+ "\")'/>"
Notice the double quotes at the beginning and end of your attribute value.
Use backslash ("\") character for escaping the character
check link How do I write a backslash (\) in a string?