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
John Lester Almenanza
NA
8
5.6k
C# Validation
Mar 20 2015 11:18 AM
i am using this codes to separate masked textbox values then put a validation where hour can only contain 0 to 23 while minute is 0 to 59. But still this doesn't work.
string text = maskedTextBox1.Text;
string[] parts = text.Split(':');
try
{
var hour = Convert.ToInt32(parts[0]);
var minute = Convert.ToInt32(parts[1]);
if (hour > 23 || minute >59)
SendKeys.Send("{BACKSPACE}");
else
if ((maskedTextBox1.Text.Length == 2) && (string.IsNullOrEmpty(maskedTextBox1.Text)))
maskedTextBox1.Focus();
}
catch (Exception ex)
{
}
Help please :)
Reply
Answers (
1
)
in SQL Server And Adding Columns Dynamically in table
what is EF query that full fill the following needs