@using BlogEngine.Core
@{
    var text = Context.Request.QueryString["q"] != null
        ? HttpUtility.HtmlEncode(Context.Request.QueryString["q"])
        : BlogSettings.Instance.SearchDefaultText;
    var widgetId = Model.Id;
}
<div class="Widget widget search">
    <div class="WidgetContent widget-content">
        <div id="searchbox">
            <input type="text" id="txt-@widgetId" placeholder="@Resources.labels.search..." onkeypress="if (event.keyCode == 13) { BlogEngine.search('@Utils.RelativeWebRoot', 'txt-@widgetId'); return false; }" />
            <input type="button" onkeypress="BlogEngine.search('@Utils.RelativeWebRoot', 'txt-@widgetId');" onclick="BlogEngine.search('@Utils.RelativeWebRoot', 'txt-@widgetId');" id="searchbutton" value="Search" />
        </div>
    </div>
</div>