Hi all, I am trying to polish up a program a program that I have converted from a Windows Form in to an ASP.NET Web Application. I have several questions:
1.) I have a drop down box where users can select their variables, but users can also enter their variables manually into various text fields. What I want is for the drop down box to show a string like "Choose Variables" when ever the user enters their variables manually. I want this to happen without having to reload the page.
2.) In the Windows Form version of this application I had a RichTextBox that populated with data (line by line) after a calculation was made. I used "AppendText" in my Windows Form, but that is not available in ASP.NET, and neither is the RichTextBox. I am open to suggestions here, I tried to use just a text box but that isn't working right.
3.) In my Windows Form application I was using "KeyPress" events to prevent incorrect characters from being entered into the text fields. My code for these events looked similar to this:
Private Sub TextBox_KeyPress(ByVal sender As System.Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles TextBox.KeyPress
If (e.KeyChar < "0" OrElse e.KeyChar > "9") AndAlso e.KeyChar <> ControlChars.Back AndAlso e.KeyChar <> "." Then
e.Handled = True
End If
End Sub
How can I make this work again... also without reloading the page.
4.) This is not a major issue, but I would like all of the text to be selected when the cursor enters a field. In my Windows Form application I used "SelectAll", but again, that is not available in ASP.NET
Thanks in advanced.