SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 220 | Next

Rob Cameron and Dale Michalk

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

AddHandler(TextChangedKey, value);
}
remove
{
Events.RemoveHandler(TextChangedKey, value);
}
}
CHAPTER 4 ?–  THE WEBCONTROL BASE C LASS AND CONTROL STYLES 139
protected virtual void OnTextChanged(EventArgs e)
{
EventHandler textChangedEventDelegate =
(EventHandler)Events[TextChangedKey];
if (textChangedEventDelegate != null)
{
textChangedEventDelegate(this, e);
}
}
override protected void AddAttributesToRender(HtmlTextWriter writer)
{
writer.AddAttribute("type", "text");
writer.AddAttribute("name", UniqueID);
writer.AddAttribute("value", Text);
base.AddAttributesToRender(writer);
}
}
}
The Web Control Style Web Form
The Web Control Style web form is a workbench for testing both the Label and the TextBox
controls we have created so far in this chapter. It has a set of controls to allow the user to interactively
change style properties, rendering the control with its new styles on the web form.
Figure 4-8 displays what the web form looks like when displayed in a browser.
The top of the form is the TextBox control with properties that are set in the .aspx tag page
to make the TextBox background gray and set its text to Tahoma font with bold and italic features:
BackColor="#E0E0E0" Font-Italic="True" Font-Names="Tahoma">
Below the web form is a set of server controls that provide a control panel for styling a Label
control at the very bottom of the .


Pages:
208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6