1. Code behind.
protected void TextBox1_TextChanged(object sender, EventArgs e) { Label1.Text = Server.HtmlEncode(TextBox1.Text); }
2. Event trigger
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity"
<i:Interaction.Triggers> <i:EventTrigger EventName="TextChanged"> <i:InvokeCommandAction Command="{Binding StartTextChanged}" /> </i:EventTrigger> </i:Interaction.Triggers>
3. MVVM ( Prefered)
<TextBox Text="{Binding MyText,Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}"/>