15.08.2013 Views

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

Ektron CMS400.NET Developer Reference Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Programmatically Predefined General Search<br />

Results Replaced By Specific Search Results<br />

This Code behind example shows a predefined search appearing<br />

on a Web page, then being replaced by more specific search<br />

results. This example creates a hyperlink list of book publishers.<br />

When you click a specific publisher, it replaces the publisher list<br />

with a book list from that publisher.<br />

Follow these steps.<br />

1. Add an IndexSearch Server Control to a Web form.<br />

2. Set the following properties:<br />

• DisplayXslt = ecmTeaser<br />

• Hide = True<br />

• HitsMarker = (blank)<br />

• ShowSearchBoxAlways = False<br />

• Weighted = True<br />

• XmlConfigId = 4<br />

3. Add two Literals.<br />

4. Add the following code to the Page Load Event in code behind.<br />

Dim bRet As Boolean<br />

If Request.QueryString("publisher") "" Then<br />

<strong>Ektron</strong> <strong>CMS400.NET</strong> <strong>Developer</strong> <strong>Reference</strong> <strong>Manual</strong>, Version 5.1, Revision 5 129

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!