Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
A neat little UI trick to change the color of changed Text
Message
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
A neat little UI trick to change the color of changed Text
Divers
Thread ID:
00719469
Message ID:
00719469
Vues:
45
All,

I just thought this was interesting:

In your InitializeComponent:
this.myTextBox.TextChanged += new System.EventHandler(this.TextBox_Changed);
The event to process:
private void TextBox_TextChanged(object sender, System.EventArgs e)
{
     ((TextBox)sender).ForeColor = System.Drawing.Color.Red;
}
Pretty Simple. Note this does not change the color until after the page has been posted.
Is there a cute way to do this so that the control could generate the JS necessary to do this in RealTime?

Doug
Douglas Osborne
Don't spend your life just wishing - http://www.AllGiftRegistry.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform