Prev | Current Page 367 | Next

Rob Cameron and Dale Michalk

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

apress.com">Apress <>
Microsoft <>
ASP.Net



' Thanks for visiting this site



The HeaderTemplate and FooterTemplate templates go into the final HTML verbatim. The
code that builds the hyperlinks correctly inserts the SeparatorTemplate template with the <>
characters as well. The next section discusses how to store data as child tags that are part of a
server control.
Parsing Data from the Control Tags
The TemplateMenu control has one major limitation. The data it uses to display the hyperlinks is
hard-coded in its constructor. A user of this control must have the source code to modify what
is displayed. This is not the best way to go about building controls that are flexible and adaptable.
Giving web developers a way to pass in the necessary data is a much better approach and
is what we cover in the sections that follow.
The approach that we take to add customizable data to the control is to use child tags that
pass in the data to the control.


Pages:
355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379