0

I have created one custom WebPart and added SearchBoxScriptWebPart inside it. Code block:

<%@ Register TagPrefix="SearchWC" Namespace="Microsoft.Office.Server.Search.WebControls" Assembly="Microsoft.Office.Server.Search, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>
<div data-name="SearchBox" class="vde_SearchBox">
    <SearchWC:SearchBoxScriptWebPart ID="SearchBoxScriptWebPart" UseSiteCollectionSettings="false" 
        runat="server" Dir="LeftToRight" EmitStyleReference="False" ServerInitialRender="True" 
        ShowQuerySuggestions="False" TryInplaceQuery="False" UseSharedSettings="false" 
        ChromeType="None" __WebPartId="{E847430B-6408-464E-BFFC-6912EAB2493F}">           
    </SearchWC:SearchBoxScriptWebPart>
</div>

Using this my search user control is displayed but I'm not able to write anything inside it.

Is there any property missing?

0

I do suggest to rewrite your control as follows:

<SearchWC:SearchBoxScriptWebPart ID="SearchBoxScriptWebPart" UseSiteCollectionSettings="true" 
        runat="server" Dir="LeftToRight" EmitStyleReference="False" ServerInitialRender="True" 
        ShowQuerySuggestions="true" TryInplaceQuery="False" UseSharedSettings="true"
        ResultsPageAddress="/searchcenter/Pages/results.aspx" 
        ChromeType="None" __WebPartId="{E847430B-6408-464E-BFFC-6912EAB2493F}">           
    </SearchWC:SearchBoxScriptWebPart>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.