Following is a sample in which, replace to double single quote for asp textbox text using Javascript is shown.
HTML
<div>
<asp:TextBox ID="txtWithSingleQuote" runat="server"/>
<asp:Button ID="btnSubmit" Text="Submit" runat="server" />
</div>
Javascript
<script type="text/javascript">
$(function () {
$("body").on("click", "[id*=btnSubmit]", function () {
alert($('[id*=txtWithSingleQuote]').val().replace(/'/g, '"'));
return false;
});
});
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head><title>
</title></head>
<body>
<form method="post" action="Default.aspx" id="form1">
<div class="aspNetHidden">
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE0MDM4MzYxMjNkZPpUge/9ZdO35V8tk788b8ZRQuyCyz//rW5G8vIOdlIX" />
</div>
<div class="aspNetHidden">
<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEdAAMkiwvsYiwL9JQSgz1CaV9piTiTQ2GMdtY1bt/JRZMeLTzmltaUM7aEAN+g9cP/m126MKdes5s2l4VzCuoQcy+HdcBCW1v2cpXuHSYAaWxDSA==" />
</div>
<input name="txtWithSingleQuote" type="text" id="txtWithSingleQuote" />
<input type="submit" name="btnSubmit" value="Submit" id="btnSubmit" />
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript">
$(function () {
$("body").on("click", "[id*=btnSubmit]", function () {
alert($('[id*=txtWithSingleQuote]').val().replace(/'/g, '"'));
return false;
});
});
</script>
</form>
</body>
</html>
Demo