What is the MVC equivalent of this code:
Posted
by Ian Boyd
on Stack Overflow
See other posts from Stack Overflow
or by Ian Boyd
Published on 2010-03-17T20:02:42Z
Indexed on
2010/03/17
21:01 UTC
Read the original article
Hit count: 283
Here's the easy pseudo-code:
void TextBox1Changed()
{
//If the text isn't a number, color it red
if (!IsValidNumber(TextBox1.Text)
TextBox1.Color = Pink;
else
TextBox1.Color = WindowColor;
}
What's the MVC enterprisey version?
© Stack Overflow or respective owner