I will state my question again related to the code that follows:
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles TextBox1.TextChanged, TextBox2.TextChanged
Dim txt As TextBox = CType(sender, TextBox)
txt.Text = txt.Text.ToUpper
End Sub
When there is a button on the webform along with the above two textboxes the
code above will execute when I hit the enter key in each textbox
Why, When I remove the button on the form and hit the enter key in each
textbox nothng happens?
thanks
"Herfried K. Wagner [MVP]" <hi***************@gmx.at> wrote in message
news:OK**************@TK2MSFTNGP12.phx.gbl...
"barry" <fl******@ix.netcom.com> schrieb: The code below works fine for one textbox (hit enter key) but adding
another
textbox and including the handle for it will not change either textbox
without switching the focus to say a button. Do not understand the
concept why it works for one but not two boxes.
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e
As System.EventArgs) Handles TextBox1.TextChanged
Dim txt As TextBox = CType(sender, TextBox)
txt.Text = txt.Text.ToUpper
Is this the complete code?
Short but complete programs
<URL:http://yoda.arachsys.com/csharp/complete.html>
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>