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
Anna Hawks
NA
193
0
IsNullorEmpty not recognizing Null Value
Jan 30 2008 11:07 AM
I am trying to prevent a person from editing a form once it has already been approved by checking the approved date within a formview with the IsNullOrEmpty method. However, it is registering as NOT null/empty regardless of what is in the SQL Data Source. Here is the code:
if (!String.IsNullOrEmpty(frmChgRequest.FindControl("ApprovedDateLabel").ToString()))
{
lblErrorMessage.Text = "This Request has already been approved and cannot be edited.";
e.Cancel = true;
}
Since it is checking the Label in the Formview do I need to do this differently?
Thanks for your help!
Reply
Answers (
6
)
page_Load Event
Number of references to an object.