Try below..
JQuery code below..
<script language="javascript" type="text/javascript">
function alphanumericsonly(ob)
{
var invalidChars = /([^a-z0-9])/gi
if(invalidChars.test(ob.value))
{
ob.value = ob.value.replace(invalidChars,"");
}
}
$('.mobile').keyup(function()
{
alphanumericsonly(this);
});
Text box below..
<asp:TextBox ID="TextBox1" class="mobile" runat="server"></asp:TextBox>
Above code will restricts other characters except
alphanumerics on
keyup event...
Hope this works fine..