TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Ankush
NA
267
63.5k
Allow 2 decimal points / dots in textbox using c#
Mar 15 2016 1:24 AM
I am developing a windows application using c#.
The user enters a website name which should allow only 2 dots for eg www.google.com
I have written but that is accepting only 1 dot. The code I have written is :-
if
((e.KeyChar ==
'.'
) && ((sender
as
TextBox).Text.IndexOf(
'.'
) > -1))
{
e.Handled =
true
;
}
Thanks in Advance ...!!!
Reply
Answers (
4
)
How to get number of days in between two dates
how to retrive value from db when value select from dropdown