When try to enter special character in login id then it is not allowed. But when copy the special c

Posted by Pcjoshi under ASP.NET on 12/20/2012 | Points: 10 | Views : 912 | Status : [Member] | Replies : 4
Hello,
i want to prevent special characters in loginid but when i am entering special characters in login id then it is not accepting.
and allow special characters when i copy from notepad etc.
Can u help me please.




Responses

Posted by: Pavanandey on: 12/20/2012 [Member] Bronze | Points: 25

Up
0
Down
then you can call the same function once again in textbox focus left event

Thanks
Pavan Kumar
Mark Answer if this fits the need

Pcjoshi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Funda on: 12/20/2012 [Member] Starter | Points: 25

Up
0
Down
Can you use Javascript ????

Pcjoshi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/20/2012 [Member] [MVP] Gold | Points: 25

Up
0
Down
@Pcjoshi
You can use Ajax FilteredTextBoxExtender Control to avoid this error.
Try This.

<asp:TextBox runat="server" ID="TextBox1" autocomplete="off"></asp:TextBox>
<asp:FilteredTextBoxExtender ID="ftbFirstName" runat="server" TargetControlID="TextBox1"
FilterType="LowercaseLetters, UppercaseLetters, Custom" ValidChars=" -.,">
</asp:FilteredTextBoxExtender>


Pcjoshi, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Ranjeet_8 on: 12/20/2012 [Member] [MVP] Gold | Points: 25

Login to post response