how can validate empty data for text fields... i want to validate fields before inserting into database
maheen123
0
Newbie Poster
Recommended Answers
Jump to PostComparing a string to "" actually compares with a string which has a length of zero. This is not the same thing as an empty string. Use instead String.IsNullOrEmpty() to test both cases
If String.IsNullOrEmpty(TextBox1.Text) OrElse String.IsNullOrEmpty(TextBox2.Text) Then MsgBox("Please Enter the text") Exit Sub End If
If …
All 6 Replies
sonia sardana
-13
Posting Whiz
maheen123
0
Newbie Poster
sonia sardana
-13
Posting Whiz
sonia sardana
-13
Posting Whiz
Fire00f1y
0
Newbie Poster
Teme64
215
Veteran Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.