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
narasiman rao
NA
519
766k
Validate the course name in repeater control in Asp.net
Jul 4 2014 3:15 AM
In Repeater Control as follows
CourseName CourseDate Amount
RAFF 29 Jun 14 500
RFPFF 30 Jun 14 600
Submit (Button)
In the above repeater control i want to validate RPST course must be there in the repeater control.
if RPST course is not there in the repeater control i want to show the message "RPST course must be there".
In the above repeater control RAFF and RFPFF course is there. But RPST course is not there in repeater control.
When user clicks the Submit Button i want to validate RPST course must be there.
For that i written a code as follows
if (rptCart1.Items.ToString().Trim() != "RAFF")
{
Label23.Text = "RAFF Course must be there";
}
else if (rptCart1.Items.ToString().Trim() != "RFPFF")
{
Label23.Text = "RFPFF course must be there";
}
else if (rptCart1.Items.ToString().Trim() != "RPST")
{
Label23.Text = "RPST Course must be there";
}
In repeater control both the courses RAFF and RFPFF course is there. Only RPST course is not there.
But when i click the submit button message shows "RAFF Course must be there".
But in the repeater control RAFF course is there. RPST course only is not there.
from my above code what is the mistake i made.please help me.
Reply
Answers (
1
)
Evaluate a string expression
Contact ID alarm system in C#.NET with VoIP