Hi
You can write this JavaScript Function nd then call it on Textbox event
<script type="text/javascript" language = "javascript">
function Check(e)
{
var unicaode = e.charcode ? e.charcode : e.KeyCode
if (!((unicaode >= 48 && unicaode <= 57) || (unicaode = 64) || (unicaode >= 65 && unicaode <= 90) || (unicaode = 95) || (unicaode = 46) || (unicaode >= 97 && unicaode <= 122) ))
{
alert('Invalid character');
return false;
}
else
{
return true;
}
}
</script>
And call it on TextBox event
<asp:textbox id="txtInput" runat="server" style="position :absolute " onkeypress="return Check(event)" xmlns:asp="#unknown"></asp:textbox>
Thank You