As I said, posting single-line questions on multiple threads under different titles only makes the job more difficult for us and results in longer response times.
If you already in such urgent situation, could you please be more specific and instead of posting "help, it is urgent" every few minutes, give us all details and more detailed description of what you are trying to achieve?
As for you questions, if I understand it correctly, you want to search only groups (or some other section), based on the selected radio button. The code to achieve this would look like this:
protected
void
btnSearch_Click(
object
sender, EventArgs e)
{
if
(txtSearch.Text ==
this
.DefaultSearchText || String.IsNullOrEmpty(txtSearch.Text))
{
txtSearch.Text = !String.IsNullOrEmpty(
this
.DefaultSearchText) ?
this
.DefaultSearchText : DefaultResources.Search_EnterSearchPhrase;
return
;
}
//by default, SearchResultsUrl variable equals to /search/{Query}/
string
resultsPageUrl = SearchResultsUrl.Replace(
"{Query}"
, MonoSoftware.Web.UrlEncoder.UrlEncode(txtSearch.Text), StringComparison.InvariantCultureIgnoreCase);
string
url = LocalizationUtility.RewriteLink(resultsPageUrl);
if
(resultsPageUrl.Equals(SearchResultsUrl))
url = url.Append(UrlParams.Search.SearchTerm, MonoSoftware.Web.UrlEncoder.UrlEncode(txtSearch.Text));
url = UrlFormatter.ResolveUrl(url);
foreach
(
string
key
in
SearchParams.Keys)
{
url = url.Append(
new
UrlParam<
string
>(key), SearchParams[key]);
}
//this is where you would put your cusom code. Instead of looping through the collection of search providers, you would loop through the list of your radio buttons
//group search provider name is GroupSearchProvider, the template name is Default
if
(SearchProviders !=
null
)
{
foreach
(SearchProviderItem provider
in
SearchProviders)
{
url = UrlUtility.AddToUrlWithDuplicates(url, UrlParams.Search.Provider.Name, provider.Name);
url = UrlUtility.AddToUrlWithDuplicates(url, UrlParams.Search.Template.Name, provider.Template);
}
}
Response.Redirect(url);
}
Now, if you want to change the behavior of any of the existing provider or implement your own, you can use khorvat's suggestions and information from my earlier post.