singleweblogsearch.cs
来自「本系统是在asp版《在线文件管理器》的基础上设计制作」· CS 代码 · 共 52 行
CS
52 行
//------------------------------------------------------------------------------
// <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 + =
减小字号Ctrl + -
显示快捷键?