Breaking News

TextBox Text Changed Events In VB.Net

Know More :  ASP.Net  VB.Net  C#.Net  Sliverlight  XML  WPF  WCF Ajax
Let’s start in visual studio 2010, when the user changes the text in a textbox , a textchanged event occurs, just as it does when the user types in a standard textbox .You can read the new text in the textbox with the text property ; for example ,here is how we display the new text in the textbox every time the user changes that text by typing. Create a new project in vs2010 name it textchanged events in visual basic.net . Drag two textboxes from toolbox on form1 as shown in figure.. ScreenShot081





After double click on textbox1, textchanged event. copy code and paste it  to textbox1_textchanged event like this.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
        TextBox2.Text = TextBox1.Text
    End Sub
You Can also Convert VB.Net To C# , Python, Ruby . And now press f5 button or select debug from debug menu , your output as shown in figure and type anything in textbox1 , your type word is show in second textbox . Thanks. 
ScreenShot076
Know More :  ASP.Net  VB.Net  C#.Net  Sliverlight  XML  WPF  WCF Ajax

No comments