大侠们,这是怎么回事啊
using System;
using System.Data;
using System.Configuration;
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;
using System.Data.OleDb;
using help2;
public partial class index : System.Web.UI.Page
{
SqlHelp2 helpchg = new SqlHelp2();
protected string about = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!this.IsPostBack)
{
OleDbDataReader dr = helpchg.getDataReader("select about_content from [about]");
this.FormView1.DataSource = dr;
this.FormView1.DataBind();
repeater_producttype.DataSource = dr;
dr = helpchg.getDataReader("select producttype_id,producttype_name from producttype order by producttype_order asc");
this.dd_type.DataSource = dr;
this.dd_type.DataValueField = "producttype_id";
this.dd_type.DataTextField = "producttype_name";
this.dd_type.DataBind();
dr = helpchg.getDataReader("select top 10 product_id,product_name,product_smallimgurl,product_bigimgurl from product where product_tj=1 order by product_id desc");
this.datalist_tj.DataSource = dr;
this.datalist_tj.DataBind();
}
BindGrid();
}
protected void BindGrid()
{
string str = "select producttype_id,producttype_name from producttype order by producttype_order asc";
DataSet ds = helpchg.getds(str);
this.repeater_producttype.DataSource = ds;
this.repeater_producttype.DataBind();
}
protected DataSet Getsmall(string id)
{
string str = "select smallproducttype_id,smallproducttype_name from smallproducttype where producttype_id=" + id + "";
DataSet ds = helpchg.getds(str);
return ds;
}
protected void Image1_ServerClick(object sender, ImageClickEventArgs e)
{
Response.Redirect("productlist.aspx?type=" + this.dd_type.SelectedValue.Trim() + "&key=" + this.txt_key.Text.Trim());
}
}