I have to format a number in a TextBox while it is being typed. Right after the TextBox looses focus, I need to do other processing on server side, including some database queries.
I'm doing the formatting by handling the onkeyup event, client side. But when I add the handler, the onTextChanged event stops firing on the server. I've tried different return values for the handler but unfortunatelly I'm stuck.
To reproduce the problem, here is a sample where the formatting function was replaced by a simple "convert to uppercase" function. You'll see that, contrary to the expected, the Label doesn't get filled when the TextBox looses focus. It does get filled, however, if the user presses the ENTER key.
What can I possibly be doing wrong with such a simple task?
<%@ Page Language="VB" %>
<script language="VB" runat="server">
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)
'' Adding the event handler like this has the same effect as adding it inline
Protected Sub txtTextBox_TextChanged(ByVal sender As Object, ByVal e As System.EventArgs)
lblTextBox.Text = S
View Complete Post