VB.NET Help - Checking If Textbox Contains Text
If you need help with a project or need to know how to do something specific in VB.NET then please ask your questions in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
10 posts
Page 1 of 1
Hey #code it and #codedrive (me) are working on a project where you register! We need to know wuts the code to check if a textbox contains text, i thought
Code: Select all
but it's not working! we have 5 textbox's and we need it all in one If!If textbox.text.contains letters then
Try this:
Code: Select all
If not textbox.text = nothing then
codedrive wrote:Hey #code it and #codedrive (me) are working on a project where you register! We need to know wuts the code to check if a textbox contains text, i thoughtwhat about
Code: Select allbut it's not working! we have 5 textbox's and we need it all in one If!If textbox.text.contains letters then
Code: Select all
if textbox.text < "" then
end if
Wrote in browser soo might be alittle off but this should work
Code: Select all
dim I as textbox in me.controls
if type of I.text.contains = "1" then
'do something
end if
Code: Select all
OrIf TextBox1.Text <> Nothing Then
'Textbox contains something
Else
'Textbox is empty
End If
Code: Select all
If TextBox1.text.lenght = 0 Then
'Textbox is empty
else
'Textbox contains something
CodenStuff wrote:Nope, it's just your sick and dirty mind. You sick twisted warped little pervo![]()
try
This has always helped me out.
+rep if I helped you :-)
Code: Select all
as an example. if textbox.text = "" then
msgbox"text box does not contain any text"
This has always helped me out.
+rep if I helped you :-)
Formerly known as RyggTonning.
PM me if you have any business proposals or similar.
PM me if you have any business proposals or similar.
I need it like i have 5 textbox's! I need on
If
End If
so it can check first to see if there all filled out then if its right it does a code :?
If
End If
so it can check first to see if there all filled out then if its right it does a code :?
Code: Select all
If TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then
MsgBox("some are empty")
Else
MsgBox("none of them are empty")
'continue registration...
End If
bisnes_niko wrote:I also need it to check a textbox would i use this codeCode: Select allIf TextBox1.Text = "" Or TextBox2.Text = "" Or TextBox3.Text = "" Or TextBox4.Text = "" Or TextBox5.Text = "" Then MsgBox("some are empty") Else MsgBox("none of them are empty") 'continue registration... End If
so i have the or's
,,,,,, And CaptchaConfirm.text=Captchacode.text , Would i use that to check if a code was entered right? THX to #MrAksel for Captcha system
Code: Select all
And yes, you would be able to check if the captcha is correct your way.If (TextBox1.Text + TextBox2.Text + TextBox3.Text + TextBox4.Text + TextBox5.Text).Contains("letters") Then
End If
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

10 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023