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
Lynn Emery
NA
47
56.3k
Hide or show label based on seach.
Apr 25 2013 7:58 AM
Hi, on my asp.net page I have a search box, a label and a database connection.
I am trying to show or hide the label depending on the data inputted into the search box.
For example if a user enters ID number 3452 into the search box and it is not in the database the label should be visible, however if it is a valid ID within the database the label should be hidden.
I have the following code in my system however the label is showing even if the ID entered is in the database is valid.
if (TextBox50.Text != "CCARNo")
{
Label5.Visible = true;
}
else
{
Label5.Visible = false;
}
Does anyone know what I must do to get the code working as expected?
Thank you for your help.
Reply
Answers (
1
)
Regex.Matches with two variables
Problem regarding inheritance