Hello everyone:
I have an ASP.NET page containing a form. On the form I have a Textbox with a TextChange event like this:
<asp:TextBox ID="txtMonitorDataValues" runat="server" OnTextChanged="txtMonitorDataValues_TextChanged"></asp:TextBox>
I also have a method which sets the initial value or the text for the Textbox and as you can see the method is calling it's value from the database class which is all working well.
public void getIDval(){ Int32 intSecondHighestClientId = 0; intSecondHighestClientId = Convert.ToInt32(clsDatabase.GetHighestIdValue()); txtMonitorDataValues.Text = intSecondHighestClientId.ToString(); }
This method is called on form load, this allows the Textbox text to show the output value of the method:
On the form I have a label control:
What I am trying to do is change the label text each time the Texbox text changes on Button Click.
In a nutshell:
1. The page loads and assigned a value to the Textbox which is displayed on the form
2. When I click a button a new number is returned from the database via the method and displayed in the textbox.
The problem is I cannot get the label to display a message unless I manually change the text in the textbox.
Can someone, anyone please help.
Thanks - JavaMan