如何把dropdownlist的内容插入数据库啊? 初级问题啊! 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 插入?不是帮数据库的内容显示到dropdownlist? 在MSDN上察看:DropDownList.SelectedItem DropDownList.SelectedValue 的介绍 选择dropdownlist中的一个内容,然后把它插入到数据库啊 Insert Tb_XXXX (Field_x) value (DropDownList.SelectedValue.tostring()) Insert Tb_XXXX (Field_x) value (DropDownList.SelectedItem.text.tostring())要插入选择的文本内容的 话! 在MSDN上察看:DropDownList.SelectedItem DropDownList.SelectedValue 的介绍 第一获取选择值:DropDownList.SelectedValue第二步 插入数据库sql语句 insert into 数据表(字段名)values(DropDownList.SelectedValue) 第三步:OleDbCommand comm = GetCommand(); OleDbDataAdapter ada = GetDataAdapter(); comm.Connection = conn.VOleConn(); comm.CommandText = sql;//刚刚写的sql语句 comm.CommandType = commandtype;comm.ExecuteNonQuery();即可 界面设计的时候tabel表格调整某行,其他行“联动”。。。 DataBinding:“System.Data.DataRowView”不包含名为“Title”的属性。 怎么赋予构造函数参数,非普通问题啊 图片切割算法求解 图片上传控件使用出现的问题!!!!!!请前辈指导 请问如何修改配置文件app.config的值 我写的C#代码好奇怪啊?想请各位看看! 问题很简单,很急,但我不会,请教了,撒分~ 求救:哪位大哥大姐有这类聊天室的源代码? 如何在数据库中创建表。(在线等待) C#如何做搜索引擎? 谁给个利用Hook OpenProcess()防止结束自己的程序的代码(超急)
不是帮数据库的内容显示到dropdownlist?
DropDownList.SelectedItem
DropDownList.SelectedValue
的介绍
DropDownList.SelectedItem
DropDownList.SelectedValue
的介绍
DropDownList.SelectedValue
第二步 插入数据库
sql语句 insert into 数据表(字段名)values(DropDownList.SelectedValue)
OleDbCommand comm = GetCommand();
OleDbDataAdapter ada = GetDataAdapter(); comm.Connection = conn.VOleConn();
comm.CommandText = sql;//刚刚写的sql语句
comm.CommandType = commandtype;
comm.ExecuteNonQuery();
即可