SqlConnection conn=new SqlConnection(ConfigurationSettings.AppSettings["conn"]);
conn.Open();
String sql1="select name from chanpin where name='"+Cname.Text+"'";
SqlDataAdapter da=new SqlDataAdapter(sql1,conn);
DataSet ds=new DataSet();
da.Fill(ds,"chanpin");
string Path="";
string FileName="";
int Po;
long FileSize;
string fType;
if(File1.PostedFile.FileName.Trim()!="") //PostFile's Filename is not empty
{
string sql="update chanpin set name=@name,zhiNo=@zhiNo,jieshao=@jieshao,imgurl=@imgurl,pric=@pric,youxiao=@youxiao,chNo=@chNo,lianren=@lianren,leiid=@leiid,imgbiao=@imgbiao,xinxi=@xinxi,comname=@comname,sheng=@sheng,shi=@shi,adrees=@adrees,lianphone=@lianphone,lianshou=@lianshou,liandian=@liandian,wang=@wang where chanid='"+Request.QueryString["chanid"]+"'";