Prev | Current Page 666 | Next

Rob Cameron and Dale Michalk

"Pro ASP.NET 3.5 Server Controls and AJAX Components"

Empty;
else
return (string)title;
}
set
{
ViewState["title"] = value;
}
}
public int MaxLength
{
get
{
object maxLength = ViewState["maxLength"];
if (maxLength == null)
return 0;
else
return (int)maxLength;
}
set
{
ViewState["maxLength"] = value;
}
}
public int Size
{
514 CHAPTER 10 ?–  OTHER SERVER CONTROLS
get
{
object size = ViewState["size"];
if (size == null)
return 0;
else
return (int)size;
}
set
{
ViewState["size"] = value;
}
}
public bool Password
{
get
{
object password = ViewState["password"];
if (password == null)
return false;
else
return (bool)password;
}
set
{
ViewState["password"] = value;
}
}
public bool Numeric
{
get
{
object numeric = ViewState["numeric"];
if (numeric == null)
return false;
else
return (bool)numeric;
}
set
{
ViewState["numeric"] = value;
}
}
CHAPTER 10 ?–  OTHER S ERVER C ONTROLS 515
public event EventHandler TextChanged;
public bool LoadPostData(string postDataKey,
NameValueCollection postCollection)
{
string postedValue = postCollection[postDataKey];
if (!Text.Equals(postedValue))
{
Text = postedValue;
return true;
}
else
return false;
}
public void RaisePostDataChangedEvent()
{
OnTextChanged(EventArgs.Empty);
}
protected virtual void OnTextChanged(EventArgs e)
{
if (TextChanged != null)
TextChanged(this, e);
}
}
}
As we discussed previously, mobile controls do not render themselves.


Pages:
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678