using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class search_search : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Request.QueryString["kw"] == null || Request.QueryString["kw"].ToString() == "")
        {
            Response.Redirect("Default.aspx");
        }
        else
        {
            DateTime time = DateTime.Now;
            Fm.Tags.Search search = new Fm.Tags.Search();
            search.Keywords = Request.QueryString["kw"].ToString();
            search.Pid = int.Parse(Request.QueryString["page"].ToString());

            Repeater1.DataSource = search.PageBind();
            Repeater1.DataBind();
            //Response.Write(search.Pid);
            FormPage.InnerHtml = search.Page();

            TimeSpan ts = DateTime.Now.Subtract(time);

            searchtime.Text = ts.ToString();

            searchtotal.Text = search.GetTotal().ToString();
        }
    }
}
