Repeater同时嵌RadioButtonList和CheckBoxList [问题点数:50分,结帖人soofan02]

Bbs1
本版专家分:0
结帖率 57.14%
Bbs7
本版专家分:17672
Bbs5
本版专家分:4575
Bbs7
本版专家分:17672
Bbs1
本版专家分:0
Bbs7
本版专家分:17672
Bbs1
本版专家分:0
Bbs7
本版专家分:17672
Bbs1
本版专家分:0
Bbs7
本版专家分:17672
Bbs7
本版专家分:17672
Bbs1
本版专家分:0
Bbs7
本版专家分:17672
Bbs1
本版专家分:0
Bbs2
本版专家分:141
radiobuttonLIST,checkboxlist,dropdownlist的动态显示问题!!
我想实现:rn 例如:在一表单中有一DROPDOWNLIST(值为:汉族,苗族………………)。从数据库中读出一个值(假如是:汉族),我想实现这个DROPDOWNLIST自动选择为“汉族”。如何实现,还有RADIOBUTTONLIST,CHECKBOXLIS呢??是否一样!!请指教。新手,最好有代码。C#。THANK U!
repeater 的ItemTemplate中嵌套了一个radiobuttonList ,怎么判断每个radiobuttonlist有被选中的项?
一个<em>repeater</em>,因为每一行的RadioButton个数不一定,在ItemTemplate中放一个RadioButtonList,取数据可以在服务端做,验证选中我想在客户端用js做,但是网上找的方法都不成功,大神们有何妙计?
repeater嵌套子repeater的循环绑定
如题:rn我在主<em>repeater</em>中嵌套了一个子<em>repeater</em>rn在给子<em>repeater</em> 绑定时 每个子<em>repeater</em>尾部都要有一个合计rn但是每次循环绑定时 最后一个子<em>repeater</em>的尾部合计都绑定不了rn其他地方都没有问题 不晓得到底是为什么 下面是绑定的代码rn[code=csharp]rn//主<em>repeater</em>行绑定rn protected void gv_list_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)rn rn string code = Request.QueryString["code"].ToString();rn HiddenField hid_code = (HiddenField)e.Item.FindControl("hid_code");rn Label lb_td = (Label)e.Item.FindControl("lb_td");rn Repeater rp_list = (Repeater)e.Item.FindControl("rp_list");rn rp_list.ItemDataBound += new RepeaterItemEventHandler(rp_list_ItemDataBound);rn DataSet ds = baseinfo.BindInfo("V_成本核算", "类别='材料' and 客户编号=" + int.Parse(code) + " and 部位编号=" + int.Parse(hid_code.Value));rnrn rp_list.DataSource = ds.Tables[0].DefaultView;rn rp_list.DataBind();rn rn} //子<em>repeater</em>明细绑定事件rn protected void rp_list_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn if (e.Item.ItemType == ListItemType.Footer)rn rn foreach (RepeaterItem item in this.gv_list.Items)rn rn Repeater rp_list = (Repeater)item.FindControl("rp_list");rn DataView dv = (DataView)rp_list.DataSource;rn object sc = dv.Table.Compute("SUM(市场金额) ", "");rn object kh = dv.Table.Compute("SUM(客户金额) ", "");rn object hs = dv.Table.Compute("SUM(核算金额) ", "");rn object cg = dv.Table.Compute("SUM(采购金额) ", "");rnrn Label lb_sc = (Label)rp_list.Controls[rp_list.Controls.Count - 1].FindControl("lb_sc");rn lb_sc.Text = sc.ToString();rn Label lb_kh = (Label)rp_list.Controls[rp_list.Controls.Count - 1].FindControl("lb_kh");rn lb_kh.Text = kh.ToString();rn Label lb_hs = (Label)rp_list.Controls[rp_list.Controls.Count - 1].FindControl("lb_hs");rn lb_hs.Text = hs.ToString();rn Label lb_cg = (Label)rp_list.Controls[rp_list.Controls.Count - 1].FindControl("lb_cg");rn lb_cg.Text = cg.ToString();rn rn rn [/code]
获取repeater嵌套子repeater的控件
protected void gv_list_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)rn rn Repeater rp_list = (Repeater)e.Item.FindControl("rp_list");rn rp_list.ItemDataBound += new RepeaterItemEventHandler(rp_list_ItemDataBound);rnrn DataSet ds = baseinfo.BindInfo("表名", "");rn rp_list.DataSource = ds.Tables[0].DefaultView;rn rp_list.DataBind();rn rn rn//子<em>repeater</em>绑定事件rn protected void rp_list_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn if (e.Item.ItemType == ListItemType.Footer)rn rn //如何获取子<em>repeater</em>中的控件rn //Repeater rp_list = (Repeater)e.Item.FindControl("rp_list");rn //DataView dv = (DataView)rp_list.DataSource;rnrn //Label lb_cg = (Label)rp_list.Controls[rp_list.Controls.Count - 1].FindControl("lb_cg");rn //lb_cg.Text = cg.ToString();rn rn
RadioButtonList在repeater中绑定的问题
在一个<em>repeater</em>中的Radiobuttonlist想用绑定于<em>repeater</em>的值,该怎么做?rnrn我是这样写的rn前台(代码是在<em>repeater</em>中,<em>repeater</em>已绑定数据):rnrn rn>中介rnrn>非中介rn rnrnrn.CS==================rnrn protected bool IsSelect(string zj,string rvalue)rn rn if (zj == rvalue)rn rn return true;rn rn elsern rn return false;rn rn rnrn这些是在一个大的<em>repeater</em>里面的,但是报错如下:rnrn分析器错误信息: 仅对具有 DataBinding 事件的对象提供数据绑定表达式支持。System.Web.UI.WebControls.ListItem 没有 DataBinding 事件。
Repeater嵌套的RadioButtonList SelectedIndexChanged事件
Repeater嵌套的RadioButtonList SelectedIndexChanged事件,我判断当RadioButtonList.SelectedValue=="3"时把Repeater的Item中的id值传给Repeater外面的一个GridView,让GridView根据传过来的id绑定数据,这个功能怎么实现呀?希望大家能帮帮我!!!!!谢谢大家了!!!!
关于repeater中的radiobuttonlist的几个问题
<em>repeater</em>中使用了<em>radiobuttonlist</em>控件。rn在<em>radiobuttonlist</em>的selectindexchanged实践中使用了 如下方法rn foreach (RepeaterItem item in rpusers.Items)rn rn RadioButtonList rbluser = item.FindControl("rblusers") as RadioButtonList;rn int shu = rbluser.SelectedIndex;rn if (true)rn rn Response.Write(shu);rn rn rn rn如果数据库中有多条记录,这样做的rn结果却是对所有的每一个<em>repeater</em>数据里的选中项都显示出来了,rn怎么做才能只显示我点击的那一条数据的事件呢(比如说有4条数据,每一条数据的<em>radiobuttonlist</em>有三个选项,第一条默认选中第一个,第二个默认选中第二个,第三条第三个,第四条第三个,我改变其中第2条数据也就是有选中的第2个变为第一个,怎么做可以保持其他不变,只将第2条数据更改的选出来添加到数据中呢)
repeater内使用RadioButtonlist的问题
<em>repeater</em>内使用RadioButtonlistrn绑定后单选按钮看不见rn有人知道怎么解决吗?
Repeater内CheckBoxList验证问题
unction CheckBoxList(sender, args)rnrn var flag = false;rn var inarr=form1.all.tags("input");rn for (var i=0; irn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn这样会验证CheckBoxList DropDownList,如何只让验证Repeater 内的CheckBoxList 控件呢,谢谢。rn100分,呵呵。
datalist里嵌套了RadioButtonList,怎么取得RadioButtonList的值
rn rn rnrn rnrn----------------------rnRadioButtonLis是这样绑定数据的rnprivate void vote_ItemDataBound(object sender, System.Web.UI.WebControls.DataListItemEventArgs e)rn rn Database data=new Database();rn SqlDataReader reader=null;rn SqlParameter[] prams=rn data.MakeInParam("@item_id",SqlDbType.Int,4,Convert.ToInt32(vote.DataKeys[(int)e.Item.ItemIndex].ToString())),rn ;rn data.RunProc("zz_ans_list",prams,out reader);rn RadioButtonList d=(RadioButtonList)e.Item.FindControl("ans");rn d.DataSource=reader;rn d.DataTextField="question";rn d.DataValueField="id";rn d.DataBind();rn data.Close();rn data.Dispose();rn rn-------------rn谢谢
如何获得动态RadioButtonList或CheckBoxList的值
兄弟,姐妹们,帮忙?rn如和来获得动态控件的值啊?rn
思归,help!!Radiobuttonlist,checkboxlist控件问题????
问题是:我在.vb文件里动态生成<em>radiobuttonlist</em>或<em>checkboxlist</em>,请问如何再在.vb里的另一个函数里获得<em>radiobuttonlist</em>或<em>checkboxlist</em>中所选的项及值??多谢了!!!
如何取出reapter中的RadioButtonList和CheckBoxList的值?
如何取出reapter中的RadioButtonList或者CheckBoxList的值?
Jquery.Validate验证CheckBoxList,RadioButtonList,DropDownList是否选中
Jquery.Validate是一个相当棒的客户端验证控件,它的功能强大就不必说了,本文主要介绍了它对asp.net中三类控件CheckBoxList,RadioButtonList,DropDownList是否选中的验证
CheckBoxList和RadioButtonList两种控件显示的大小
关于ASP。NET服务器控件中,有两个控件,甚是糟糕,分别为CheckBoxList和RadioButtonList,为什么我调整了这两种控件的宽度和高度之后,显示的时候,控件选择的框还是很小啊,总之,改不了显示的大小啊,有人能解决这个问题吗 求解…
我有两个控件radiobuttonlist and checkboxlist
我有两个控件<em>radiobuttonlist</em> and <em>checkboxlist</em>rnrn1rn 2rn rnrn 1rn 2rnrn选中<em>radiobuttonlist</em>则<em>checkboxlist</em>清空rn选中<em>checkboxlist</em>则<em>radiobuttonlist</em>清空rn谢谢!!!!!!!!!!!!!!!!!!!!!!!rnrn
repeaterradiobuttonlist如何绑定数据?
<em>radiobuttonlist</em>也是每次<em>repeater</em>循环中的数据 rn rn rn rn rn rn rn 这里不能绑定数据库中值 rn rn rn rn rn我表中有问题的选项A,B,C,D分别对应四个字段,我想把选项绑定到RadioButtonList里ListItem,在这里我应该怎么实现啊?
散分200.JS判断Repeater嵌套RadioButtonList
在线投票 问题 和答案自动加载的。rn前台代码如下:rn[code=HTML]rn rn 第题::rn rn rn rn [/code]rnrn可以加载rn问题1:我想点提交按钮时,用JS判断嵌套在Repeater 中所有的RadioButtonList是否选中rn问题2:当用户选择一个RadioButtonList的值时,我想在题目旁边给他放个DIV 来提示选中 用JS来控制。rn
为什么取不到Repeater中RadioButtonList的值?
为了做一个例如下面这样的选择提交页面,我用Repeater绑定问题题目,在其中加入RadioButtonList作为选项。rn问题1 xxxrn选择1 选择2 选择3 选择4 rn问题2 yyyrn选择1 选择2 选择3 选择4 rnrn用下面方法我无法取到RadioButtonList所选的值,但能取到Repeater中Literal控件的值(题目的内容我就放在里面)rnprotected void Button1_Click(object sender, EventArgs e)rnrn RadioButtonList rblist = (RadioButtonList)(Repeater1.Items[0].FindControl("RadioButtonList1"));rn textbox1.Text = rblist.SelectedValue;rnrnrn请教一下高手,这种情况下我该如何取RadioButtonList所选的值呢?rn谢谢~~
[求助]Repeater嵌套RadioButtonList读数据库问题
数据库wenti表结构为:rnrnid qus aus1 aus2 aus3rn1 问题1 A B Crn2 问题2 d e frn3 问题3 h i jrnrn我现在想用Repeater嵌套RadioButtonList来实现:rnrn rn rn 题目:rn 选项:rn rn rn rn rn rnrn目前已经可以显示出题目列表,但不知道怎么把RadioButtonList里的项目和aus1、aus2、aus3相关联,各位大侠教教我,小的感激涕零,谢谢,如果有更好的方法也请指出。
radiobuttonlist添加在repeater中的 数据绑定
<em>radiobuttonlist</em>添加在<em>repeater</em>中的 rn rn rn rn rn rn rn 这里不能绑定数据库中值 rn rn rn rn rn我表中一条记录有问题和问题的选项A,B,C,D分别对应四个字段,我想把选项绑定到RadioButtonList里ListItem分别对应每一个问题rn在这里我用rnpublic void rpQuiz_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e) rn rn if((e.Item.ItemType == ListItemType.Item) || (e.Item.ItemType == ListItemType.AlternatingItem)) rn rn this.Response.Write(e.Item.Controls[1].ToString());rn RadioButtonList rb = (RadioButtonList)e.Item.FindControl("RadioButtonList1");rn quiz w = new quiz();rn string Q1 = w.GetQ1();rn rb.Items.Add(new ListItem(Q1, "A")); rn rb.Items.Add(new ListItem("Option2", "B"));rn rb.Items.Add(new ListItem("Option3", "C"));rn rb.Items.Add(new ListItem("Option4", "D"));rn绑定到的数据每一题的选项都是第一题的选项,怎样把每一题的选项绑定到每一题的下面?
这个怎么实现的RadioButtonList还是Repeater
[img=http://images.cnblogs.com/cnblogs_com/jxyxhz/168852/r_1a1.jpg][/img]rnrnrn问题如题,最后怎么获取他选中的是哪个?rnrn用RadioButtonList好像不能绑定图片。rnrn-rn用Repeater获取到是简单,我只是想问问RadioButtonList行不行。
Repeater里面嵌套RadioButtonList怎么实现
表rn字段:ID Question A B C D Answerrn ID 问题? 选项A 选项B 选项C 选项D 答案rnrnRepeater控件循环“Question”,Repeater控件里面的RadioButtonList控件绑定选项“A、B、C、D”数据rnrn请问怎么实现??或者说这个数据表应该怎么设计会更好呢??谢谢解答!!!
询问repeater中嵌套RadioButtonList问题
代码如下:rn protected void Repeater1_ItemDataBound(object sender, System.Web.UI.WebControls.RepeaterItemEventArgs e)rn rn if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem) rn rn DataRowView rowv = (DataRowView)e.Item.DataItem;rnrn RadioButtonList rb = (RadioButtonList)e.Item.FindControl("RadioButtonList1");rnrn rb.Items.Add(new ListItem("www1","a"));//从数据库怎么读 rn rb.Items.Add(new ListItem("www2","b"));// rn rb.Items.Add(new ListItem("www3","c"));// rn rb.Items.Add(new ListItem("www4","d"));// rn rn rn rn rnrn为何前台的RadioButtonList1没有显示任何数据??rn
repeater 控件中的checkboxlist 不显示
[color=#FF00FF]话不多说,直奔正题rn如图是想要的效果:[/color]rn[img=https://img-bbs.csdn.net/upload/201409/08/1410165571_603797.jpg][/img]rnrn代码:rn[code=csharp]rnusing System;rnusing System.Collections.Generic;rnusing System.Linq;rnusing System.Web;rnusing System.Web.UI;rnusing System.Web.UI.WebControls;rnusing System.Web.Configuration;rnusing System.Data;rnusing System.Data.SqlClient;rn rnpublic partial class newadmin_test4 : System.Web.UI.Pagernrn private string _connstring = WebConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString;rn protected void Page_Load(object sender, EventArgs e)rn rn if (!Page.IsPostBack)rn rn get_lv1_data();rn rn rn rn protected void get_lv1_data()rn rn SqlConnection con = new SqlConnection(_connstring);rn SqlCommand cmd = new SqlCommand();rn cmd.Connection = con;rn cmd.CommandText = "select * from pro_category where pid=@pid order by shunxu";rn cmd.Parameters.AddWithValue("@pid", 0);rn rn SqlDataAdapter sda = new SqlDataAdapter(cmd);rn DataSet dst = new DataSet();rn using (sda)rn rn sda.Fill(dst);rn rn rn lv1.DataSource = dst;rn lv1.DataBind();rn rn public DataSet lv2data(object lv1id)rn rn SqlConnection con = new SqlConnection(_connstring);rn SqlCommand cmd = new SqlCommand();rn cmd.Connection = con;rn cmd.CommandText = "select * from pro_category where pid=@pid order by shunxu";rn cmd.Parameters.AddWithValue("@pid", lv1id);rn rn SqlDataAdapter sda = new SqlDataAdapter(cmd);rn DataSet dst = new DataSet();rn using (con)rn rn con.Open();rn sda.Fill(dst);rn rn rn return dst;rn rn rn public DataSet lv3data(object lv2id)rn rn SqlConnection con = new SqlConnection(_connstring);rn SqlCommand cmd = new SqlCommand();rn cmd.Connection = con;rn cmd.CommandText = "select * from pro_category where pid=@pid order by shunxu";rn cmd.Parameters.AddWithValue("@pid", lv2id);rn rn SqlDataAdapter sda = new SqlDataAdapter(cmd);rn DataSet dst = new DataSet();rn using (con)rn rn con.Open();rn sda.Fill(dst);rn rn rn return dst;rn rn rn rn rnrn[/code]rnrnrn前台页面:rn[code=html]rnrn rnrnrn rn sfrn rnrnrn rn rn rn rn rn () rn rn rn rn rn () rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrn[/code]
repeater中添加一个checkboxlist问题
Repeater控件中做一个表格:这个表格至少5行,每一行都有一排多选框(CheckBoxList),我做的一排只有一个选框,怎么显示多个选框啊?rnrnrn rnrn rn
判断repeater内的CheckBoxList是否被选中
<em>repeater</em>rn循环一个选项卡divrn每个div内都有个CheckBoxListrn[code=html]rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrn绑定rnrn protected void rptrLanguageDivs_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn ProductVariantAttribute pva = ProductAttributeService.GetProductVariantAttributeById(this.ProductVariantAttributeId);rn int ProductAttributeId = 0;rn if (pva != null)rn rn ProductAttributeId=pva.ProductAttributeId;rn rn if (e.Item.ItemType == ListItemType.AlternatingItem || e.Item.ItemType == ListItemType.Item)rn rn Language lg = (Language)e.Item.DataItem;rn int LanguageID = lg.LanguageId;rn CheckBoxList ckb = (CheckBoxList)e.Item.FindControl("cbl_ProductAttributeValueList");rn ckb.DataSource = ProductAttributeService.GetProductAttributeValues(LanguageID, ProductAttributeId, null);rn ckb.DataTextField = "Name";rn ckb.DataValueField = "ProductAttributeValueID";rn ckb.DataBind();rn rn rn[/code]rnrn在外部有个按钮rn点击如何判断 必须有一个CheckBoxList内被打勾,并且只能存在一个CheckBoxList被打勾rn并取值
绑定控件类,(已封装gridview ,CheckBoxList,DropDownList,RadioButtonList,Repeater),其他可以自己添加
NULL 博文链接:https://walleyekneel.iteye.com/blog/1021557
绑定控件类,(已封装gridview ,CheckBoxList,DropDownList,RadioButtonList,Repeater),其他可以自己添加...
暂时支持access 。sql,其他可以自己添加 绑定控件类(已封装gridview ,CheckBoxList,DropDownList,RadioButtonList,Repeater),其他可以自己添加
两个Repeater 怎么一起嵌套用
我想用第二个Repeater 获取第一个Repeater 的ID怎么实现
Repeater嵌套了CheckBox,id号怎么做?
[code=html]rnrn rn rn rn rn rn rn rn rnrn[/code]rnrn后台用的数据绑定rn[code=csharp]rn private void Bind_DealMan()rn rn rn //定义数据连接对象,其中数据库连接字符串是在Web.Config文件中定义的rn obj.open();rnrn //创建数据适配器对象rn OleDbDataAdapter da = new OleDbDataAdapter("select * from employee order by idx asc", obj.myconn);rn //创建DataSet对象rn DataSet ds = new DataSet();rn tryrn rn da.Fill(ds, "employee");rn Repeater1.DataSource = ds.Tables["employee"];rn Repeater1.DataBind();rn rn catch (Exception error)rn rn obj.myconn.Close();rn obj.myconn.Dispose();rn Response.Write(error.ToString());rn rn rn[/code]rnrnrn这样在前台根据数据库的记录数产生N个CheckBox,现在的问题是ID号怎么取啊,ID号还要用来最后取值呢?
repeater嵌套子repeater 如何实现对子repeater里的记录个数的判断?
父<em>repeater</em>嵌套子<em>repeater</em> 如何实现对子<em>repeater</em>里的记录个数的判断?rn因为子<em>repeater</em>里的记录可能很多啊也可能没有要做不同的处理。在线等待。谢谢
repeater嵌套子repeater, 如何实现对子repeater里的记录个数的控制?
如题
前台用Js怎么判断checkboxlistradiobuttonlist是否被选中?
前台用Js怎么判断<em>checkboxlist</em>和<em>radiobuttonlist</em>是否被选中?
如果为CheckBoxList和RadioButtonList的每个Item增加一属性?
当执行以下代码段刷新页面后,MyCheckBoxList的第一个CheckBox并没有属性MyAttribute,怎么样给MyCheckBoxList的每个Item增加一属性呢?RadioButtonList也有相同的问题。rnMyCheckBoxList.Items[0].Attributes.Add("MyAttribute", "MyValue");rnrn感谢!rn
在线调查的制作 动态生成多个RadioButtonList和CheckBoxList并取值
如题。rn制作一个在线调查,由数据库中取出有几个不同的单选题和复选题,并在页面上生成多个RadioButtonList和CheckBoxList,用户提交后,将选中的值提交到数据库。rn请给个参考代码,谢谢!
RadioButtonList
RadioButtonList
Radiobuttonlist
<em>radiobuttonlist</em>绑定了多个问题 每个问题有4个选项 怎么进行判断这个几个问题是否正确?也就是怎么判断错还是对 并算出分数呢?
在datalist里嵌套了一组RadioButtonList,如何访问这组控件?
rnrnrn选购rn选购rn选购rnrnrnrnrnrn.............................................rn Sub voteThis(ByVal sender As Object, ByVal e As DataListCommandEventArgs)rn Dim r5 As RadioButtonList = CType(e.Item.FindControl"RadioButtonList2"),RadioButtonList)rn Response.Write(r5.SelectedItem.Value)rn End Subrnrn报错:“未将对象引用设置到对象的实例”rnrn要怎样写???请教
如何获得嵌套在DataList中RadioButtonList控件的SelectedIndexChanged事件?
如何获得嵌套在DataList中RadioButtonList控件的SelectedIndexChanged事件?
嵌套在Datalist中的radiobuttonlist获取不到选中值
xxxxxxxxrn0A 0B 0Crnrnxxxxxxxxrn0A 0B 0Crnrnxxxxxxxxrn0A 0B 0Crnrn我的页面布局是这样的 我用js把全部<em>radiobuttonlist</em>的name设置为相同,整个页面为单选 但在后台 我在一个button的事件中用循环读取datalist的item 查找每一行的<em>radiobuttonlist</em> 并取出选中值 但怎么取都取不到 单步调试过 所有在<em>radiobuttonlist</em>中的项的selected 属性皆为false 即使是我选中的那一个也是 。 请大家帮我看看 给我点提示 谢谢!!
CheckBoxList
[color=#FF0000]前台:[/color]rnrn aaaarn bbbbrn ccccrn ddddrn eeeern ................rn zzzzrnrn[color=#FF0000]后台:[/color]rnstring[] str = new string'a','c','j','h','r'rnrn[color=#FF0000]如何在后台选中 CheckBoxList1的ListItem的Value = str[i]?[/color]rnrn[color=#FF0000]在线急等![/color]rnrnrnrnrnrn
checkboxlist
一般的<em>checkboxlist</em>控件都是rn口 AAArn口 BBBrn口 CCCrn怎么才能把全面的复选框弄到后面呢?rnAAA 口rnBBB 口rnCCC 口rn就这个样子的。。。
checkboxlist控件能嵌套在repeater控件里面吗?
我用checkbox可以rn可是换成了<em>checkboxlist</em>就不行了 rn有没有人做过?rn
Repeater套嵌Repeater时,时面的Repeater取得外面的Repeater从数据库中取得的值
做到这样一个项目,要给客户显示两级资讯类别,那我就选择用Repeater里放再放一个Repeater,循环读出并显示两级的资讯类别名称,并通过链接里的BID和SID来将资讯类别的ID传递到新的页面里去。 可是碰到这样的一个问题:里面的Repeater取不到外边的Repeater取得的资讯类别名称。后来,实在是没办法了,用了一个笨办法,设了一定变量,用来存储这个ID值,代码如下: 正面: &amp;l...
怎么给Repeater中的RadioButtonList控件添加事件处理?
我需要给Repeater中的RadioButtonList控件添加事件处理,处理内容:把RadioButtonList的选中的Index保存到数据库,代码怎么写?
记录微软的BUG一则--Repeater里的RadioButtonList不可以局部刷新
visible=
repeaterradiobuttonlist控件的SelectedIndexChanged事件怎么写
请问<em>repeater</em> 中<em>radiobuttonlist</em>控件的SelectedIndexChanged事件怎么写?小弟新人
怎么样取得绑定在repeater中RadioButtonList的选中的值?
rnrn选择: rnrnarnbrncrnrnrnrnrn请问我怎么样取得每一个RadioButtonlist选中的值?
repeater item中的radiobuttonlist问题,进者有分
一个<em>repeater</em>,每个ItemTemplate中都有一个<em>radiobuttonlist</em>和一个按钮,我如何在按下这个按钮时对这个<em>radiobuttonlist</em>进行操作呢?如下:rnrn rn rn rn rn rn rn rn rn rn rn 于rn rn rn 回答:rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn
页面上一个CheckBoxList控件,一个Repeater数据控件,怎样关联起来
点击CheckBoxList控件 Repeater数据控件动态改变 rnrn两者Guid可以关联起来! rnrn今天弄了一天了,就是弄不好!rnCheckBoxList.SelectedValue获取的是最靠前的选择项,而不是最后选择项rnrn所有选择项加上OnClick事件,点击选择项后JS获取Guid存储到HiddenField,然后再到后台调用HiddenField的值rnrn但这样也不行,SelectedIndexChanged事件要先于OnClick事件执行.....JS存值到HiddenField后再触发一个Button事件也不行,只能触发一次.. rnrnrn我真的不知道怎样做了,如果CheckBoxList有一个获取最后所选项的方法早完事了 -_-!!!!
求助:repeater中加入checkbox和checkboxlist,选中后提交,可是为什么没有办法获得checkboxlist选中的值??
*.aspxrnrnrnrnrnrnrn rnrnrnrnrnrnrnrn*.csrnrnprivate void Page_Load(object sender, System.EventArgs e)rnrnif(!IsPostBack)rnrnstring sql="";rnDataSet ds;rnsql="select * from col_test";rnds=db.GetDSDataSet(sql);rnRpt1.DataSource=ds.Tables[0].DefaultView;rnRpt1.DataBind();rnrn<em>checkboxlist</em>bind();rnrnrnprivate void <em>checkboxlist</em>bind()rnrnstring sql="";rnDataSet ds;rnLabel LBL_gj;rnfor(int i=0;i");rn///////////////CHKLST_gj该对象未定义??rnrnrnrn
为什么无法得到Repeater中的CheckBoxList的选中项目? 紧急!!!!!
做了一个用于显示2级分类的用户控件,展示是这样的:rn1rn1.1 1.2 1.3rn2rn2.1 2.2 2.3 2.4rn...rn代码是这样:rnrn rn rn rn rn rnrnrn当外部调用展示后需要得到用户选中的类别,但是当我查看回传后Repeater的Item中找到的2个CheckBoxList全部是未选中,无论界面上选中几个. viewstate全部打开了.rnrn这个问题应该如何解决? 谢谢大家,项目要求,急!
repeater里如何同时实现分页和排序?
System.Data.DataView dv = new System.Data.DataView(ds.Tables[0]);rndv.Sort = "sort desc,ID desc";rn<em>repeater</em>1.DataSource = dv;rn<em>repeater</em>1.DataBind();rn如果这样的话,我是可以排序成功。可是问题是,我的<em>repeater</em>1中还要实现分页,rnPagedDataSource pp = new PagedDataSource();rnpp.DataSource = ds.Tables[0].DefaultView;rnpp.AllowPaging = true;rnpp.PageSize = 6;rn<em>repeater</em>1.DataSource = pp;rn这样的话DataSource不是重复了吗?怎么办呢?
repeater可以同时绑定DataRow和DataTable么
数据表里有一组带分割符的字符串。NameId【1,2,3,4,5,6,7,8,9】rn我把他 分割出来。存到数组里了。rn<em>repeater</em>可以绑定DataRowrn但是。我的<em>repeater</em><em>同时</em> 绑定另外一张 数据表rn不知道怎么弄rn谢谢了。
嵌套在repeater中的gridview如何实现更新操作
如图,请各位大虾帮帮忙
如何设置嵌套在repeater里的datagird的ItemDataBound事件
.aspx里的内容rnrnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rnrnrnrn.aspx.vb里的内容rn Private Sub Sec_Sort_ItemDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DataGridItemEventArgs) Handles Sec_Sort.ItemDataBoundrn response.write("ASdasd")'用来测试事件的,结果发现根本该事件并没有运行rn Select Case e.Item.ItemTypern Case ListItemType.Item, ListItemType.AlternatingItem, ListItemType.EditItemrn Dim SortNameTxt As System.Web.UI.WebControls.TextBoxrn SortNameTxt = e.Item.FindControl("Edit_BBS_name")rn SortNameTxt.Text = DataBinder.Eval(e.Item.DataItem, "SortName")rn End Selectrn End Subrnrnrn我将datagird(上面的sec_sort)绑定到<em>repeater</em>(上面的fst_Sort),在DATAGIRD里面有一个很多服务器控件,所以我要在ItemDataBound给这些控件绑定数据.但因为这datagird是嵌到<em>repeater</em>里的.我将代码放到Sec_Sort_ItemDataBound里面根本不运行,请问我应该怎样给datagird里的控件绑定数据?只要举一个例子就好
Repeater嵌套子级怎么取父级的值
rnrn rnrnrn rnrnrnrnrnrnrn子级(CRepeater2)里的怎么能取到父级(CRepeater2)的rnrn意思就是子级(CRepeater2)里的需要显示的数据是父级(CRepeater2)的rnrnrn求助...rn
如何把多层菜单嵌套到Repeater中?
[code=HTML]rn rn Arn Arnrn rn Arn Arnrn rn Arn Arnrnrnrn " class="collapsed">rn下面的只能实现一个动态菜单。我要实现上面的多个菜单怎么实现呢?让ul也像li一样随着数据库记录递增。rnrn rn rn rn " target="frmright" title="">rn rn rnrnrn[/code]
Repeater中还嵌套了一个Repeater,请问如何实现编辑更新功能?
贴上代码,我点击了没反应rn[code=csharp] protected void rpeMenuCategory_ItemDataBound(object sender, RepeaterItemEventArgs e)rn rn tryrn rnrnrn if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)rn rn rn rn Repeater rpeSubMenu_cs = (Repeater)e.Item.FindControl("rpeSubMenu");rnrn DataRowView rowv = (DataRowView)e.Item.DataItem;rn int ParentId = Convert.ToInt32((rowv["T_ID"]));rnrn string SubMenu_sql = string.Format("Select * From T_SysMenu Where T_ParentID =0", ParentId);rnrn rpeSubMenu_cs.DataSource = db.RunDS(SubMenu_sql);rnrn rpeSubMenu_cs.DataBind();rnrn DbDataReader ddr = db.RunReader("Select T_Visible From T_SysMenu");rn while (ddr.Read())rn rn if (Convert.ToInt32(ddr[0]) == 1)rn rn CheckBox ckb = (CheckBox)e.Item.FindControl("chkVisible");rn ckb.Checked = true;rn rn rn string t_id = rowv["T_ID"].ToString();rn if (t_id != menuID.ToString())rn rn ((Panel)e.Item.FindControl("pnlItem")).Visible = true;rn ((Panel)e.Item.FindControl("pnlEdit")).Visible = false;rnrn rn elsern rn ((Panel)e.Item.FindControl("pnlItem")).Visible = false;rn ((Panel)e.Item.FindControl("pnlEdit")).Visible = true;rnrn rnrnrn rnrn rn catch (Exception ex) rn rn Console.Write(ex.Message);rn ((Panel)e.Item.FindControl("pnlEdit")).Visible = false;rn rn rn protected void GetAspNetPagerCount() rn rn count_sql = count_sql + "And T_ParentID = 0 ";rn int pageCount = Convert.ToInt32(db.RunScalar(count_sql));rn AspNetPager1.AlwaysShow = true;rn AspNetPager1.PageSize = 5;rn AspNetPager1.RecordCount = pageCount;rn rn protected void AspNetPager1_PageChanging(object src, Wuqi.Webdiyer.PageChangingEventArgs e)rn rn AspNetPager1.CurrentPageIndex = e.NewPageIndex;rn rpeCategoryBind();rnrn rn protected void rpeSubMenu_OnItemDataBound(object sender, RepeaterItemEventArgs e) rn rn if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)rnrn rn DbDataReader ddr = db.RunReader("Select T_Visible From T_SysMenu");rn while (ddr.Read())rn rn if (Convert.ToInt32(ddr[0]) == 1)rn rn CheckBox ckb =(CheckBox) e.Item.FindControl("chkVisible");rn ckb.Checked = true;rn rn rn rn rn rn protected void rpeMenuCategory_ItemCommand(object source, RepeaterCommandEventArgs e)rn rn if (e.CommandName == "Edit") rn rnrnrn menuID = int.Parse(e.CommandArgument.ToString());rn rnrn rn else if (e.CommandName == "Cancel") rn rn menuID= menuID - 1;rn rn else if (e.CommandName == "Update") rn rn rn rn [/code]rn[code=html]rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn [/code]rn后面还有一个Repeater 我先把大的弄上,就先不管那个,求代码最好,谢谢各位了!
RadioButtonList 取值
前台代码: rnrn rn后台代码:rnprotected void TP2_ItemCommand(object source, DataListCommandEventArgs e)rn rn RadioButtonList rb = (RadioButtonList)DataList3.Items[0].FindControl("RadioButtonList1");rn if (rb != null)rn rn string str = string.Empty;rn for (int i = 0; i < rb.Items.Count; i++)rn rn if (rb.Items[i].Selected)rn rn str = rb.Items[i].Value;rn GridBindRadio(str);rn rn rn rn rn //Response.Redirect("MydcShow.aspx?ID='" + Request.Form["TP2"] + "'");rn rn说明一下,RadioButtonList 是嵌套在datalist3中的,我能从库中动态读取RadioButtonList ,但是我在页面中无法多选,且选不中值,rb.Items[i].Selected为false,请问高手这是怎么回事??谢谢
asp.net radioButtonList
用radioButtonList 做了一个简单的投票程序,rn有三个选项;rn问题是,不管选投三个中的哪一个,数据库里的投票数只在其中一个选项上加1,其余两个不加,就算选了两外两个投也不加rn代码如下:rnprotected void Page_Load(object sender, EventArgs e)rn rn if (!IsPostBack)rn rn SqlConnection con = DB.CreateConnection();rn con.Open();rn SqlCommand cmd = new SqlCommand("select voteTitle from voteMaster where voteID=" + this.voteID, con);rn string title = Convert.ToString(cmd.ExecuteScalar());rn this.lblTitle.Text = title;rn //rn SqlCommand cmdItem = new SqlCommand("select * from voteDetails where voteID=" + this.voteID, con);rn SqlDataReader sdr = cmdItem.ExecuteReader();rn this.rbtnItems.DataSource = sdr;rn this.rbtnItems.DataValueField = "voteID";rn this.rbtnItems.DataTextField = "voteItem";rn this.rbtnItems.DataBind();rn sdr.Close();rn con.Close();rn rnrnprotected void btnVote_Click(object sender, EventArgs e)rnrn SqlConnection con = DB.CreateConnection();rn con.Open();rn SqlCommand cmd = new SqlCommand();rn cmd.Connection = con;rn cmd.CommandText = "update voteDetails set voteNum=voteNum+1 where voteID=" +this.voteID + " and voteDetailsID=" +this.rbtnItems.SelectedItem.Value;rn cmd.ExecuteNonQuery();rn con.Close();rn rnrn数据库是这样的:rncreate table voteDetailsrn(rn voteID int foreign key references voteMaster(voteID),rn voteDetailsID int not null,rn voteItem varchar(20) not null,rn voteNum int default 0,rn primary key(voteID,voteDetailsID)rn)
RadioButtonList的事件
RadioButtonList的items有rn0:aarn1:bbrn2:ccrn当点击一次选“aa”后又一次点选“aa”,触发哪个事件?rn我跟踪不到,报错“未将对象引用设置到对象的实例”
RadioButtonList问题
我有一组RadioButtonList1按钮 ---里面有三个单选按钮rn希望选种其中一个单选按钮的时候,让一个textbox显示在网页上rn选种其他两个单选按钮的时候 textbox就隐藏rnrn-----------下面是我在RadioButtonList事件里写的rnprivate void RadioButtonList1_SelectedIndexChanged(object sender, System.EventArgs e)rn rn if(this.RadioButtonList1.SelectedValue.Equals(3))rn rn this.TextBox1.Visible=true;rn rn elsern rn this.TextBox1.Visible=false;rn rn rnrn-------------
radiobuttonlist 和 radiobutton
有<em>radiobuttonlist</em> 和radiobutton两个控件,<em>radiobuttonlist</em>是通过读取数据库进行绑定的,radiobutton后边跟一个文本框,我想实现<em>radiobuttonlist</em>和radiobutton两个控件的单选。rn怎么做?求高手帮忙
两个 RadioButtonList
有两个<em>radiobuttonlist</em> ,怎样让他们使用起来就像一个<em>radiobuttonlist</em>
没有radiobuttonlist
问题又来了,找不到<em>radiobuttonlist</em>rn[img=https://img-bbs.csdn.net/upload/201611/18/1479468520_469648.png][/img]rn[img=https://img-bbs.csdn.net/upload/201611/18/1479468563_842863.png][/img]
datalist下的radiobuttonlist
我现在在做一个在线调查页面,在datalist控件里面嵌套了一个<em>radiobuttonlist</em>控件,现在要实现具体为:比如有三道题,每道题有四个选项ABCD,三道题我分别选择ABC时数据库中的值增加1rn数据库如下:rn[img=http://7381.2m2m.net/321.jpg][/img]rncntA cntB cntC cntD分别代表选该选项的次数rn我自己写了个代码,但是总是显示回调参数无效,不知道怎么解决rn页面代码如下:rn[code=HTML]rnrn rn rn rn rn rn rn rn rnrn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn Arn Brn Crn Drn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn rn[/code]rn代码如下:rn[code=C#]using System;rnusing System.Collections;rnusing System.Configuration;rnusing System.Data;rnusing System.Linq;rnusing System.Web;rnusing System.Web.Security;rnusing System.Web.UI;rnusing System.Web.UI.HtmlControls;rnusing System.Web.UI.WebControls;rnusing System.Web.UI.WebControls.WebParts;rnusing System.Xml.Linq;rnusing System.Data.OleDb;rnrnpublic partial class Default3 : System.Web.UI.Pagernrn protected void Page_Load(object sender, EventArgs e)rn rn rn OleDbConnection conn = new OleDbConnection();rn conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + Server.MapPath("App_Data/hqpx.mdb");rn conn.Open();rn OleDbDataAdapter oa1 = new OleDbDataAdapter("select Title,A,B,C,D from Survey", conn);rn DataTable dt1 = new DataTable();rn oa1.Fill(dt1);rn DataList1.DataSource = dt1;rn DataList1.DataBind();rn conn.Close();rn rn rnrnrnrnrn protected void Button1_Click(object sender, EventArgs e)rn rn rn OleDbConnection conn = new OleDbConnection();rn conn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data source=" + Server.MapPath("App_Data/hqpx.mdb");rn conn.Open();rn RadioButtonList list = new RadioButtonList();rn list.Items[0].Value = "A";rn list.Items[1].Value = "B";rn list.Items[2].Value = "C";rn list.Items[3].Value = "D";rnrn for (int i = 0; i < DataList1.Items.Count; i++)rn rnrn OleDbCommand cmd1 = new OleDbCommand("select A,B,C,D from Count where id=" + (i + 1) + "", conn);rn OleDbDataReader read = cmd1.ExecuteReader();rnrnrn if (list.SelectedValue == "A")rn rn int cnt = read.GetInt32(3);rn OleDbCommand cmdA = new OleDbCommand("update Count set A=" + (cnt + 1) + "", conn);rn cmdA.ExecuteNonQuery();rnrn rn else if (list.SelectedValue == "B")rn rn int cnt = read.GetInt32(4);rn OleDbCommand cmdB = new OleDbCommand("update Count set B=" + (cnt + 1) + "", conn);rn cmdB.ExecuteNonQuery();rn rn else if (list.SelectedValue == "C")rn rn int cnt = read.GetInt32(5);rn OleDbCommand cmdC = new OleDbCommand("update Count set C=" + (cnt + 1) + "", conn);rn cmdC.ExecuteNonQuery();rn rn else if (list.SelectedValue == "D")rn rn int cnt = read.GetInt32(6);rn OleDbCommand cmdD = new OleDbCommand("update Count set D=" + (cnt + 1) + "", conn);rn cmdD.ExecuteNonQuery();rn rn rnrnrn rnrn protected void Button2_Click(object sender, EventArgs e)rn rnrn rnrn[/code]
数据结构可视化迷宫问题下载
利用栈,创建迷宫,并找到出路,在屏幕上显示出路 相关下载链接:[url=//download.csdn.net/download/asdsad273723/2496570?utm_source=bbsseo]//download.csdn.net/download/asdsad273723/2496570?utm_source=bbsseo[/url]
华为C8650用户手册下载
华为C8650用户手册 相关下载链接:[url=//download.csdn.net/download/zwfczwfc/3983487?utm_source=bbsseo]//download.csdn.net/download/zwfczwfc/3983487?utm_source=bbsseo[/url]
lonsint.rar下载
lonsint lonsint 相关下载链接:[url=//download.csdn.net/download/b1162102/4558333?utm_source=bbsseo]//download.csdn.net/download/b1162102/4558333?utm_source=bbsseo[/url]
我们是很有底线的