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
vidya kumari
NA
4
8.4k
Differnece Start and end date check no of months
Apr 29 2012 2:00 AM
I have three text StartTextbox and EndTextBox ,Textbox3 .Please careful textbox3(No of month). Now I want difference of start date and end date is Checked by No of Months .
Here function in customvalidation
protected
void
ValidateDuration(
object
sender,
ServerValidateEventArgs
e)
{
DateTime
start =
DateTime
.Parse(StartTextBox.Text);
DateTime
end =
DateTime
.Parse(EndTextBox.Text);
int
months = (end.Month - start.Month) + 12 * (end.Year - start.Year);
e.IsValid = months <=TextBox3;
}
Reply
Answers (
1
)
debug web form application
How to link navigation button in .net?