$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
Input Server Side Event in ASP.NET
Home > How to > Input Server Event

Unlike multiple PerInput client side events, there is only one available Input sever side event, that is TextChanged server event, which will fire as long as the AutoPostBack property is set as true, the user types valid entry, and the input control has no focus. What needs to be demonstrated here is that, only when users actually change the input value but not the string or format in the input control, the TextChanged server event can occur.
When users choose InputNumericTextBox type of KT.UI Web PerInput control library, and input a certain value with more digits than you have predefined within input application, TextChanged event will occur. This is because if the value input has more digits than what have specified, the control will round done the value, thus, the vale actually have changed.

Sample Codes to Set TextChanged Server Event

Our users can refer to following ASP.NTE and C# sample codes to set the TextChanged server event by using the event handler to respond to the changes in the PerInput control.
Please see following ASPX demo codes for setting PerInput TextChanged event.

<kettic:PerTextBox OnTextChanged="PerTextBox1_TextChanged" ID="PerTextBox1" Width="120px"
runat="server" AutoPostBack="True" InvalidStyleDuration="100"></kettic:PerTextBox>

<kettic:PerNumericTextBox OnTextChanged="PerNumericTextBox1_TextChanged" ID="PerNumericTextBox1"
Width="120px" runat="server" Type="Percent" AutoPostBack="True"></kettic:PerNumericTextBox>

<kettic:PerMaskedTextBox OnTextChanged="PerMaskedTextBox1_TextChanged" ID="PerMaskedTextBox1"
Width="120px" runat="server" PromptChar="_" Mask="(###)-##-#######" AutoPostBack="True"></kettic:PerMaskedTextBox>

<kettic:PerDateInput OnTextChanged="PerDateInput1_TextChanged" ID="PerDateInput1"
runat="server" Width="120px" AutoPostBack="True"></kettic:PerDateInput>
Also, following snippets of C# sample codes are for C# users to set TextChanged server event.

protected void PerTextBox1_TextChanged(object sender, System.EventArgs e)
string msg = PerTextBox1.ID + " value has changed to " + PerTextBox1.Text;
logger1.Text = msg;

protected void PerNumericTextBox1_TextChanged(object sender, System.EventArgs e)
string msg = PerNumericTextBox1.ID + " value has changed to " + PerNumericTextBox1.Text + ".";
logger2.Text = msg;

protected void PerDateInput1_TextChanged(object sender, System.EventArgs e)
string msg = PerDateInput1.ID + " value has changed to ";
if (PerDateInput1.IsEmpty)
msg += "empty value";
msg += PerDateInput1.SelectedDate.ToString();
logger4.Text = msg + ".";

protected void PerMaskedTextBox1_TextChanged(object sender, System.EventArgs e)
string msg = PerMaskedTextBox1.ID + " values has changed to: " +
"<br />Text: " + PerMaskedTextBox1.Text +
"<br />TextWithPrompt: " + PerMaskedTextBox1.TextWithPrompt +
"<br />TextWithLiterals: " + PerMaskedTextBox1.TextWithLiterals +
"<br />TextWithPromptAndLiterals: " + PerMaskedTextBox1.TextWithPromptAndLiterals + ".";
logger3.Text = msg;