怎么取radiobutton的值并插入到数据库阿 请问如何读取radiobutton得值并插入到数据库里阿 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 如果只是一个radiobutton 一般只用来判断选中与否. radiobutton是没有selecteValue属性的. 用 `RadioButtonList你用RadioButton取值要写好多IF文件而用RadioButtonList只要写个RadioButtonList.selectItem.value就可以得到值了` string sValue = radiobutton.checked?"1":"0";把这个变量值写进数据库就好了. RadioButtonList.selectItem.value就可以得到值了`请问这个value值在哪里设定 //改变页面时,将该页分数字段的选择值写入数据库protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e) { //从行中找到RadioButtoList控件,循环取出其值 foreach (GridViewRow gvr in GridView2.Rows) { string score = ((RadioButtonList)gvr.FindControl("RadioButtonList1")).SelectedValue.ToString(); decimal score1 = Convert.ToDecimal(score); //取每条记录的关键字 string dk=GridView2.DataKeys[gvr.RowIndex].Value.ToString(); //构造更新语名,更新分数SqlDataSourcedj.UpdateCommand = "UPDATE [PJTest] SET [score] ="+ score1+" WHERE [ID] ="+dk; SqlDataSourcedj.Update(); } } RadioButtonList.selectItem.value就可以得到值了`请问这个value值在哪里设定出错了`对不起`应该是RadioButtonList.SelectedItem.Text 读取数据库中图片的问题 判断字符串是不是邮箱格式----无法识别的转义序列 请问谁有在线客服答疑系统 很急的问题.在线等候 面向对象问题 - 父类与子类的转换 在读取某条@Id记录的时候,将其int类型的字段hits自动加1 有关网站的日志???? ie7的问题:在内容显示列表页(gridview控件实现),只要一拖拉边上的导航条,左下角就提示“网页上有错误-对象不支持此属性或方法”(ie6完全正常) 有挑战性的问题? 前台请求技术 用c#开发WEB程序,倒出到excel,然后IE关闭的问题。 用vs如何连接mysql??
你用RadioButton取值要写好多IF文件而用RadioButtonList只要写个
RadioButtonList.selectItem.value就可以得到值了`
请问这个value值在哪里设定
//改变页面时,将该页分数字段的选择值写入数据库
protected void GridView2_PageIndexChanging(object sender, GridViewPageEventArgs e)
{
//从行中找到RadioButtoList控件,循环取出其值
foreach (GridViewRow gvr in GridView2.Rows)
{
string score = ((RadioButtonList)gvr.FindControl("RadioButtonList1")).SelectedValue.ToString();
decimal score1 = Convert.ToDecimal(score);
//取每条记录的关键字
string dk=GridView2.DataKeys[gvr.RowIndex].Value.ToString();
//构造更新语名,更新分数
SqlDataSourcedj.UpdateCommand = "UPDATE [PJTest] SET [score] ="+ score1+" WHERE [ID] ="+dk;
SqlDataSourcedj.Update(); }
}
请问这个value值在哪里设定
出错了`对不起`应该是
RadioButtonList.SelectedItem.Text