Prev | Current Page 839 | Next

Rob Cameron and Dale Michalk

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

";
}
else
{
text = "Switch to HTML view to edit the control's templates.";
}
return CreatePlaceHolderDesignTimeHtml(text);
}
}
}
Listing 13-3. The ResultDummyDataSource.cs Class File
namespace ControlsBook2Lib.CH12.LiveSearchControls
{
///
/// Provides a fictional Data source to show control rendering of
/// templates while control is in design-time mode
///

CHAPTER 13 ?–  P ACKAGI NG AND DEPLOYMENT 665
public sealed class ResultDummyDataSource
{
private const int TotalResultsCount = 100;
private ResultDummyDataSource()
{
}
///
/// Returns a LiveSearchService.SearchResponse data set that is valid
/// according to web service guidelines
///

///
page size of the LiveSearchService.SearchResponse set
/// LiveSearchService.SearchResponse instance
with Service.resultElement
/// entries present according to page size

public static LiveSearchService.SearchResponse
GetLiveSearchResults(int pageSize)
{
LiveSearchService.SearchResponse result = new
LiveSearchService.SearchResponse();
LiveSearchService.SourceResponse[] sr = new
LiveSearchService.SourceResponse[TotalResultsCount];
result.Responses = sr;
sr.SetValue(new LiveSearchService.


Pages:
827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851