string year = Request.Form["year"]; string name = Request.Form["name"]; string rule = Request.Form["rule"]; string Tonnage_algorithm = Request.Form["Tonnage_algorithm"]; string fuel_oil = Request.Form["fuel_oil"]; //这是一个字段的变量是“scope” string scope = Request.Form["scope"]; string scope_type = Request.Form["scope_type"]; string scope_ton = Request.Form["scope_ton"]; //这样也是一个字段 变量“unit” string unit = Request.Form["unit"]; string unit_Time = Request.Form["unit_Time"];
string price = Request.Form["price"]; string sql = "insert into info_Standard(year,name,[rule],Tonnage_algorithm,fuel_oil,scope,price,unit)values(@year,@name,@rule,@Tonnage_algorithm,@fuel_oil,@scope,@unit )";
left,直接截取难道不行,或者说你想要个什么样子的?或者说right都可以,
我想把这三个合成一个字段插入数据库
string scope = Request.Form["scope"];
string scope_type = Request.Form["scope_type"];
string scope_ton = Request.Form["scope_ton"];
这两个是一个字段
string unit = Request.Form["unit"];
string unit_Time = Request.Form["unit_Time"];
这是两个字段 现在分成几个文本框输入 怎么组合一起在插到数据库