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 242 | Next

Rob Cameron and Dale Michalk

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

Textbox textbox =
(ControlsBook2Lib.Ch04.Textbox)Controls[1];
textbox.ApplyStyle(TextboxStyle);
textbox.MergeStyle(ControlStyle);
}
override protected void Render(HtmlTextWriter writer)
{
PrepareControlHierarchy();
RenderBeginTag(writer);
RenderChildren(writer);
RenderEndTag(writer);
}
}
}
The InputBox Style Web Form
We now put our new server control to the test with an updated version of the styling workbench
from the previous example. The web form example for the InputBox control takes the previous
style setting workbench and adds the ability to set styles for the Label and the TextBox as well.
Figure 4-14 provides a snapshot of the updated workbench with a panel for styling both child
controls.
The control panel for each child control??™s Style has the same feature set as our previous
Web Control Style web form, minus the ability to set the CssClass attribute. It does add a radio
button group at the top of the control boxes that allows you to either set or not set the styling
for the Label or TextBox control. The full code listings for the web form and the code-behind
class file are shown in Listings 4-7 and 4-8, respectively.
CHAPTER 4 ?–  THE WEBCONTROL BASE C LASS AND CONTROL STYLES 159
Figure 4-14.


Pages:
230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254
hotel jelenia góra Russian bride Free English grammar and study guid powiekszenia wielkoformatowe counter strike 1.6