troubleshooting Question

check if user typed in asp textbox

Avatar of maqskywalker
maqskywalker asked on
ASP.NETJavaScript
2 Comments1 Solution93 ViewsLast Modified:
I'm using ASP.NET Web Forms.

In a ASP TextBox that holds a string, how do i check if a user typed in the textbox?
Sometimes the textbox might contain a string already on page load. I'm not checking if the textbox is empty.
I want to check if the user typed anything in the textbox.


So on button click if they user typed anything in the textbox

Then set this variable CheckTextBoxTyped = "Yes"

If nothing was typed in the texbox set this variable CheckTextBoxTyped = "No"


Right now i have this:



    Protected Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click

    Dim CheckTextBoxTyped As String

    CheckTextBoxTyped = "Yes"


    CheckTextBoxTyped = "No"

    End Sub
ASKER CERTIFIED SOLUTION
Paul MacDonald
Director, Information Systems

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 1 Answer and 2 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros