protected void Button1_Click(object sender, EventArgs e)
{
string pic = "";
if (fu1.PostedFile.FileName.ToString() != "")
{
pic = sctp();
} StringBuilder sql = new StringBuilder();
sql.Append("insert into[info](type,showname,allsortid,alltypeid,endDate,content,picture,gsid,xx_or_zb,keywords)");
sql.Append("values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',{7},{8},'{9}')");
ArrayList al = new ArrayList(); al.Add(xxlx.SelectedValue);
al.Add(gqzt.Text.Replace("'"," "));
string[] aryddl = ddl.Value.Split(','); al.Add(aryddl[0]);
al.Add(aryddl[1]);
al.Add(jzrq.Text);
al.Add(ftb.Text);
al.Add(pic);
al.Add(userId);
al.Add(2);
string[] aryLei = className.Value.Split(',');
al.Add(gqzt.Text.Replace("'"," ") + "," + aryLei[0] + "," + aryLei[1]);
SqlCommand cmd = new SqlCommand(string.Format(sql.ToString(), al.ToArray()), con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("cgfbxx.aspx?page=fbgq");
}
{
string pic = "";
if (fu1.PostedFile.FileName.ToString() != "")
{
pic = sctp();
} StringBuilder sql = new StringBuilder();
sql.Append("insert into[info](type,showname,allsortid,alltypeid,endDate,content,picture,gsid,xx_or_zb,keywords)");
sql.Append("values('{0}','{1}','{2}','{3}','{4}','{5}','{6}',{7},{8},'{9}')");
ArrayList al = new ArrayList(); al.Add(xxlx.SelectedValue);
al.Add(gqzt.Text.Replace("'"," "));
string[] aryddl = ddl.Value.Split(','); al.Add(aryddl[0]);
al.Add(aryddl[1]);
al.Add(jzrq.Text);
al.Add(ftb.Text);
al.Add(pic);
al.Add(userId);
al.Add(2);
string[] aryLei = className.Value.Split(',');
al.Add(gqzt.Text.Replace("'"," ") + "," + aryLei[0] + "," + aryLei[1]);
SqlCommand cmd = new SqlCommand(string.Format(sql.ToString(), al.ToArray()), con);
con.Open();
cmd.ExecuteNonQuery();
con.Close();
Response.Redirect("cgfbxx.aspx?page=fbgq");
}
解决方案 »
- InotifyPropertyChanged接口应用
- 下载完成的判断?
- 淘宝搜索条件的异步实现
- <asp:TextBox Text="<%=base.GetText()%>" />有没有合适的写法?
- repeater理由有个checkbox。我为什么明明由check,但就得到的checked都是false
- 请问为什么像strlen(),strcat()这样的函数在ASP.NET中不能用,或者说无法使用#include"string.h"?谢谢
- 三层的项目如何使用Vss管理
- ASP.NET中点击Linkbutton实现对数据库中内容的分类筛选
- ***请帮助完善:登录后,才能看到页面的数据库forms验证问题?在线等待!***
- ASP.net的DataGrid问题
- 联动菜单实现了,但是无法得到他的值。大家帮忙看看。
- 棘手问题。分不多了。。。
估计是 mocrosoft.runtime.sript吧
若是的话
方在不同机器上时
先把引用 删除 再引用以下
试试吧