Posted on: 8/27/2014 7:41:05 AM | Views : 440

Hi,
I have a textbox for which I want to validate this server side. My code works fine while using Javascript, but doesnt works server side. Please see the JS code which is working and also the Server side code which is not working.
<!-- JS code -- > -<script type="text/javascript"> $(document).ready(function () { $('#ctl00_topNavigation_txtSearch').keyup(function () { var $th = $(this); $th.val($th.val().replace(/[^.%a-zA-Z0-9 ]/g, function (str) { alert('Special characters not allowed except %'); return ''; })); }); }); </script> <asp:TextBox ID="txtSearch" runat="server" class="txtfld-search" oncopy="return false" oncut="return false" onpaste="return false"></asp:TextBox> Server Side code whic ...

Go to the complete details ...