Solved

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

Posted on 2016-09-18
4
35 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now