<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Customize SearchBoxEx</title>
	<atom:link href="http://www.sharepointblog.nl/2007/10/16/customize-searchboxex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharepointblog.nl/2007/10/16/customize-searchboxex/</link>
	<description>Michiel Lankamp</description>
	<lastBuildDate>Sun, 31 Jul 2011 11:07:54 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Purvi Chauhan</title>
		<link>http://www.sharepointblog.nl/2007/10/16/customize-searchboxex/comment-page-1/#comment-13</link>
		<dc:creator>Purvi Chauhan</dc:creator>
		<pubDate>Thu, 28 Oct 2010 03:37:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharepointblog.nl/?p=29#comment-13</guid>
		<description>Hi 

I have been looking how to do this exact customisation, I am very very new to sharepoint and struggling to get my head round it all. Your code is perfect but, what I am confused about is what you do with the code, I do not  understand when you say create your own control?
Sorry if I sound a bit dim but I am very confused regarding this matter. Please can you explain what to do with this code 

Thank you much appreciated

Purvi</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>I have been looking how to do this exact customisation, I am very very new to sharepoint and struggling to get my head round it all. Your code is perfect but, what I am confused about is what you do with the code, I do not  understand when you say create your own control?<br />
Sorry if I sound a bit dim but I am very confused regarding this matter. Please can you explain what to do with this code </p>
<p>Thank you much appreciated</p>
<p>Purvi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jackie Sun</title>
		<link>http://www.sharepointblog.nl/2007/10/16/customize-searchboxex/comment-page-1/#comment-7</link>
		<dc:creator>Jackie Sun</dc:creator>
		<pubDate>Thu, 20 May 2010 05:21:45 +0000</pubDate>
		<guid isPermaLink="false">http://www.sharepointblog.nl/?p=29#comment-7</guid>
		<description>Hi Mike,

Please let me introduce myself. My name is Jackie Sun. I’m a programmer from Beijing, China.
 
After I read this article about how to Customize SearchBoxEx, I think it is very very helpful for the beginer to learn how to reuse all the logic of SearchBoxEx and provide new render logic, like me. Then, I run the code on my server, it works successful. Thanks for your share!

Now, I’m working hard for SharePoint Web Part Development. The main job is customize the search interface in SharePoint with Fast For SharePoint Server. But the official examples is little, so I want to consult you.

The problem is how to add a time select control in the search box. Like diagram 1.
(see diagram 1 URL)
https://k7edcg.blu.livefilestore.com/y1mr-ruYysz3BCL4WRXpxBk7gUUxs5m1tesqLFY-GzZ8lmntx_QDdRV1KwFFkIk3Y9KnDuZMV3z0hXz-Qpn6LVs512Q9ynSTuhQJ_IZTi5icqQylEF6-tj1lWnP2eF1MxzPk4niaQGNdNZ-cm0H5Sritg/searchbox.jpg

The original SharePoint search box is like diagram 2.
(see diagram 2 URL)
https://k7edcg.blu.livefilestore.com/y1m6Vd0FgllKDFtmQnb6B31iVkewyzM1D8EpctjpAgYQ6lRcUnoj9NUlRziUxsxtytPsXsaPOMUJqeDtrw2nT-nG4-qIJ987slWzIhfbPAZtZ1XsMRTS9ljDvxtV9rF86EQk2mD7EaL3zD0wWmvqiLZeA/oldsearchbox.jpg

In past two days, I tried to do some customization, but I can’t deliver the value of the time select control to the search result as parameter. 
I’m trying to add a DropDownList control, then add SelectedIndexChanged event process procedure code. All codes is following:

Code:
    public class MySearchbox : SearchBoxEx {
	    ...
		DropDownList timeSelect;
	  
        protected override void CreateChildControls()
        {
     	    base.CreateChildControls();
			
            Table searchBoxTable = base.Controls[0] as Table;
            TableRow searchBoxTableRow = searchBoxTable.Rows[0];
            TableCell timeCell = new TableCell();
			
            timeSelect = new DropDownList();
			timeSelect.EnableViewState = false;
            timeSelect.Items.Add(new ListItem(&quot;Last 3 Year&quot;));
            timeSelect.Items.Add(new ListItem(&quot;Last 3 month&quot;));
            timeSelect.Items.Add(new ListItem(&quot;Last 3 week&quot;));
            timeSelect.Items.Add(new ListItem(&quot;Last 3 day&quot;));
            timeSelect.SelectedIndexChanged += new EventHandler(timeSelect_SelectedIndexChanged);

            timeCell.Controls.Add(timeSelect);
            searchBoxTableRow.Cells.AddAt(1, timeCell);
        }

        // Response for SelectedIndexChanged Event
		void timeSelect_SelectedIndexChanged(object sender, EventArgs e)
        {
            base.AppQueryTerms = &quot;I DON’T KNOW HOW TO SET IT.&quot;;
            base.AppendToQuery = false;
        }
		
        ...
	}
	
I think I should pass the arguments by setting AppQueryTerms, but I don’t know how to set it. The program is failed, so I can&#039;t get any search results.

Is this idea wrong? Do you have some good suggestions? 

Thank you very much.

Yours
Jackie Sun</description>
		<content:encoded><![CDATA[<p>Hi Mike,</p>
<p>Please let me introduce myself. My name is Jackie Sun. I’m a programmer from Beijing, China.</p>
<p>After I read this article about how to Customize SearchBoxEx, I think it is very very helpful for the beginer to learn how to reuse all the logic of SearchBoxEx and provide new render logic, like me. Then, I run the code on my server, it works successful. Thanks for your share!</p>
<p>Now, I’m working hard for SharePoint Web Part Development. The main job is customize the search interface in SharePoint with Fast For SharePoint Server. But the official examples is little, so I want to consult you.</p>
<p>The problem is how to add a time select control in the search box. Like diagram 1.<br />
(see diagram 1 URL)<br />
<a href="https://k7edcg.blu.livefilestore.com/y1mr-ruYysz3BCL4WRXpxBk7gUUxs5m1tesqLFY-GzZ8lmntx_QDdRV1KwFFkIk3Y9KnDuZMV3z0hXz-Qpn6LVs512Q9ynSTuhQJ_IZTi5icqQylEF6-tj1lWnP2eF1MxzPk4niaQGNdNZ-cm0H5Sritg/searchbox.jpg" rel="nofollow">https://k7edcg.blu.livefilestore.com/y1mr-ruYysz3BCL4WRXpxBk7gUUxs5m1tesqLFY-GzZ8lmntx_QDdRV1KwFFkIk3Y9KnDuZMV3z0hXz-Qpn6LVs512Q9ynSTuhQJ_IZTi5icqQylEF6-tj1lWnP2eF1MxzPk4niaQGNdNZ-cm0H5Sritg/searchbox.jpg</a></p>
<p>The original SharePoint search box is like diagram 2.<br />
(see diagram 2 URL)<br />
<a href="https://k7edcg.blu.livefilestore.com/y1m6Vd0FgllKDFtmQnb6B31iVkewyzM1D8EpctjpAgYQ6lRcUnoj9NUlRziUxsxtytPsXsaPOMUJqeDtrw2nT-nG4-qIJ987slWzIhfbPAZtZ1XsMRTS9ljDvxtV9rF86EQk2mD7EaL3zD0wWmvqiLZeA/oldsearchbox.jpg" rel="nofollow">https://k7edcg.blu.livefilestore.com/y1m6Vd0FgllKDFtmQnb6B31iVkewyzM1D8EpctjpAgYQ6lRcUnoj9NUlRziUxsxtytPsXsaPOMUJqeDtrw2nT-nG4-qIJ987slWzIhfbPAZtZ1XsMRTS9ljDvxtV9rF86EQk2mD7EaL3zD0wWmvqiLZeA/oldsearchbox.jpg</a></p>
<p>In past two days, I tried to do some customization, but I can’t deliver the value of the time select control to the search result as parameter.<br />
I’m trying to add a DropDownList control, then add SelectedIndexChanged event process procedure code. All codes is following:</p>
<p>Code:<br />
    public class MySearchbox : SearchBoxEx {<br />
	    &#8230;<br />
		DropDownList timeSelect;</p>
<p>        protected override void CreateChildControls()<br />
        {<br />
     	    base.CreateChildControls();</p>
<p>            Table searchBoxTable = base.Controls[0] as Table;<br />
            TableRow searchBoxTableRow = searchBoxTable.Rows[0];<br />
            TableCell timeCell = new TableCell();</p>
<p>            timeSelect = new DropDownList();<br />
			timeSelect.EnableViewState = false;<br />
            timeSelect.Items.Add(new ListItem(&#8220;Last 3 Year&#8221;));<br />
            timeSelect.Items.Add(new ListItem(&#8220;Last 3 month&#8221;));<br />
            timeSelect.Items.Add(new ListItem(&#8220;Last 3 week&#8221;));<br />
            timeSelect.Items.Add(new ListItem(&#8220;Last 3 day&#8221;));<br />
            timeSelect.SelectedIndexChanged += new EventHandler(timeSelect_SelectedIndexChanged);</p>
<p>            timeCell.Controls.Add(timeSelect);<br />
            searchBoxTableRow.Cells.AddAt(1, timeCell);<br />
        }</p>
<p>        // Response for SelectedIndexChanged Event<br />
		void timeSelect_SelectedIndexChanged(object sender, EventArgs e)<br />
        {<br />
            base.AppQueryTerms = &#8220;I DON’T KNOW HOW TO SET IT.&#8221;;<br />
            base.AppendToQuery = false;<br />
        }</p>
<p>        &#8230;<br />
	}</p>
<p>I think I should pass the arguments by setting AppQueryTerms, but I don’t know how to set it. The program is failed, so I can&#8217;t get any search results.</p>
<p>Is this idea wrong? Do you have some good suggestions? </p>
<p>Thank you very much.</p>
<p>Yours<br />
Jackie Sun</p>
]]></content:encoded>
	</item>
</channel>
</rss>

