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

using EnterpriseNET.BusinessLogicLayer;

public partial class UserControls_top : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        //加载
        if (!IsPostBack)
        {
            try
            {
                bindData();
            }
            catch
            {
                Response.Write("发生错误.");
                Response.End();
            }
        }
    }

    void bindData()
    {
        DataView dvlist0 = MajorClass.QueryMajorClass();
        ShowMajorClass.DataSource = dvlist0;
        ShowMajorClass.DataBind();

        Page.DataBind();
    }

    protected void Button1_Click(object sender, EventArgs e)
    {
        string keywords = Convert.ToString(SearchKeyword.Value);
        Response.Redirect("/psearch_" + System.Web.HttpUtility.UrlEncode(keywords) + "_1.html");
    }

}
