⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 singleweblogsearch.cs

📁 本系统是在asp版《在线文件管理器》的基础上设计制作
💻 CS
字号:
//------------------------------------------------------------------------------
// <copyright company="Telligent Systems">
//     Copyright (c) Telligent Systems Corporation.  All rights reserved.
// </copyright> 
//------------------------------------------------------------------------------

using System;
using System.Web.UI.WebControls;
using CommunityServer.Blogs.Components;
using CommunityServer.Components;

namespace CommunityServer.Blogs.Controls
{
	/// <summary>
	/// Summary description for SingleWeblogSearch.
	/// </summary>
	public class SingleWeblogSearch : WeblogThemedControl
	{
		public SingleWeblogSearch()
		{
			//
			// TODO: Add constructor logic here
			//
		}

        private TextBox SearchBox = null;
        private LinkButton SearchButton = null;

	    protected override void AttachChildControls()
	    {
	       SearchBox = FindControl("SearchBox") as TextBox;
            SearchButton = FindControl("SearchButton") as LinkButton;
            SearchButton.Click +=new EventHandler(SearchButton_Click);

            string q = Context.Request.QueryString["q"];
            if(!Globals.IsNullorEmpty(q))
                SearchBox.Text = q;
        }

        private void SearchButton_Click(object sender, EventArgs e)
        {
            string searchText = SearchBox.Text;
            if(!Globals.IsNullorEmpty(searchText))
            {
                //SearchQuery query = SearchQuery.SectionSearch(searchText,CurrentWeblog.SectionID);
                Context.Response.Redirect(BlogUrls.Instance().IndividualSearch(CurrentWeblog,searchText,1));
                Context.Response.End();
            }
        }
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -