Prev | Current Page 773 | Next

Rob Cameron and Dale Michalk

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

The Search control does not
expose a starting index property, as it assumes it will be on a one-based scale when it executes
the query. RedirectToLiveSearch is a special property that provides the Search control the
capability to ignore the Live Search web service and redirect the web form to the Live Search
web site as if the user had typed in a query at the Live Search site directly.
The actual UI for the Search control is built in the composite control fashion of adding
child controls from within the following CreateChildControls method. The first control added
to the collection is a HyperLink to provide a clickable link back to Live Search as well. Note that
the image is the official image made available by the Live Search service. The searchTextbox
Search
2. Query params 3. Return
Live Search
4. Data bind
5. Display templates
1. Catch bubbled-up
command event 6. Pass data for paging
7. Display pages as
hyperlink commands
1 2 3
Pager
Result
596 CHAPTER 12 ?–  B U ILDING A COMPLEX CONTROL
control is a TextBox control that grabs the input from the user. The searchButton control is a
Button control that handles posting the page contents from the client back to the web server.
Several LiteralControl instances are also added to the Controls collection to fill in the HTML
spacing between the controls and provide breaks.


Pages:
761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785