Solved

ASP.net VB.net gather value of text box text change

Posted on 2016-09-18
4
54 Views
Last Modified: 2016-09-19
Hi. The following four lines are used to add a text box to my web page in ASP.net. When the user changes the text in this text box how do
I get the text value in the procedure HandleTextChanged()

 Dim tb As New TextBox
 tb.ID = oControlName
 AddHandler tb.TextChanged, AddressOf HandleTextChanged
 Me.Panel_Controls.Controls.Add(tb)

    Sub HandleTextChanged()

    End Sub
0
Comment
Question by:murbro
  • 2
  • 2
4 Comments
 
LVL 12

Expert Comment

by:Ramkisan Jagtap
ID: 41804339
Dim tb As New TextBox
 tb.ID = oControlName
 tb.TextChanged += New EventHandler(HandleTextChanged)
 Me.Panel_Controls.Controls.Add(tb)

 Sub HandleTextChanged()

 End Sub

Open in new window

0
 

Author Comment

by:murbro
ID: 41804371
I am specifically looking at how to get the value of the text inside the procedure

 Sub HandleTextChanged()
   'HERE
 End Sub
0
 
LVL 12

Accepted Solution

by:
Ramkisan Jagtap earned 500 total points
ID: 41804383
I am not sure what exactly you are doing.
Based on my assumptions,
declare a variable and get the value in it.


Sub HandleTextChanged()
   Dim newText As New string
   newText = tb.Text
 End Sub

Open in new window

0
 

Author Closing Comment

by:murbro
ID: 41804429
Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video shows how to quickly and easily add an email signature for all users on Exchange 2016. The resulting signature is applied on a server level by Exchange Online. The email signature template has been downloaded from: www.mail-signatures…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question