应输入类型,命名空间定义或文件尾

usingSystem;usingSystem.Data;usingSystem.Configuration;usingSystem.Collections;usingS... 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;

public partial class Regist : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

}
protected void Button1_Click(object sender, EventArgs e)
{
string myConnetionString ="serve=YL-201111181822\\SQL2005;UserID=sa;Password=sitsa;database=CTTS;";
SqlConnection myConnection = new SqlConnection();
protected void Insert_Click(object sender, EventArgs e)
{
string insertString = "insert into 客户(ClientID,ClientPassword,PhoneNumber,Email,State,City,Address,Zip) values('" + TextBox1.Text + "','" + TextBox2 + "','" + TextBox3.Text + "','" + TextBox4.Text + "','" + TextBox5.Text + "','" + TextBox6.Text + "','" + TextBox7.Text + "','" + TextBox8.Text + "')";
string insertString = "insert into 设备名(ClientID,EquipName,EquipQuantity,ProduceCom) values('" + TextBox1.Text + "','" + TextBox9.Text + "','" + TextBox10.Text + "','" + TextBox11.Text + "')";
string insertString = "insert into 配置(ClientID,InfoName,InfoValue) values('" + TextBox1.Text + "','" + TextBox12.Text + "','" + TextBox13.Text + "')";
SqlCommand myCommand = new SqlCommand(insertString, myConnection);
myConnection.ConnectionString = myConnetionString;
myConnection.Open();
myCommand.ExecuteNonQuery();
myConnection.Close();
GridViewBind();
}
}

}
展开
 我来答
gudicao
推荐于2017-11-24
知道答主
回答量:18
采纳率:0%
帮助的人:15.6万
展开全部
protected void Button1_Click(object sender, EventArgs e)
{
string myConnetionString ="serve=YL-201111181822\\SQL2005;UserID=sa;Password=sitsa;database=CTTS;";
SqlConnection myConnection = new SqlConnection();

此处少了个括号 ,最后结束时你多一个括号,你应该是想嵌套函数吧,但是函数是不能相互潜逃的
本回答被提问者采纳
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
TableDI
2024-07-18 广告
Excel一键自动匹配,在线免费vlookup工具,3步完成!Excel在线免费vlookup工具,点击32步自动完成vlookup匹配,无需手写公式,免费使用!... 点击进入详情页
本回答由TableDI提供
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式