You can set categories checkbox dynamically and checked by default.
With the following markup;
<SearchEngine:SearchBox ID="SearchBox1" runat="server"></SearchEngine:SearchBox>
<SearchEngineP:SearchBoxOptions ID="SearchBoxOptions1" runat="server" SearchBoxId="SearchBox1" Locations="" AutoGenerateContentCheckBoxes=false AutoGenerateLocationDropDown=false>
</SearchEngineP:SearchBoxOptions>
you can do this in codebehind
protected void Page_Load(object sender, EventArgs e)
{
SearchBoxOptions1.Contents.Add(new Keyoti.SearchEngine.Web.Design.StringItem("c1"));
SearchBoxOptions1.Contents.Add(new Keyoti.SearchEngine.Web.Design.StringItem("c2"));
(SearchBoxOptions1.ContentCheckBoxes.Controls[0] as CheckBox).Checked = true;
}
this will add c1 and c2 content option check boxes and check the first checkbox (c1).
|