各位大侠,请请帮一下忙下面几段代码有错误没有,小弟在这先鞠躬了!
2 各位大侠,请请帮一下忙下面几段代码有错误没有,小弟在这先鞠躬了!
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;
using System.Data.SqlClient;
public partial class backmanage_updategoods1 : System.Web.UI.Page
{
protected SqlConnection strcon = new SqlConnection(System.Configuration.ConfigurationManager.AppSettings[ "conn "]);
protected DataSet ds = new DataSet();
protected void Page_Load(object sender, EventArgs e)
{
if (Session[ "admin "] == null)
{
Server.Transfer( "backlogin.aspx ");
}
strcon.Open();
bind1();
strcon.Close();
}
protected void bind1()
{
SqlDataAdapter sda = new SqlDataAdapter( "select goodsname,price,memberprice,picture,introduce,latenew,youhuiprice from tb_goods where id= " + Request.QueryString[ "id "], strcon);
DataSet ds = new DataSet();
sda.Fill(ds, "tb_goods ");
DataRow[] rows = ds.Tables[0].Select();
foreach (DataRow row in rows)
{
txtgoodsname.Text = row[ "goodsname "].ToString();
txtgoodsprice.Text = row[ "price "].ToSt