社区
C#
帖子详情
*****datalist问题
rabies
2003-08-20 01:09:31
在datalist里加入了一个Button还有一个Dropdownlist
如何在Button按下之后获得Dropdownlist的值
int quantity =((DropDownList)ProductDataList.Items[1].FindControl("QuantityDropDownList")).SelectedIndex+1;
但是item[i]怎么获得?
触发的是Clickonbutton
如果不这么做,有没有其他办法?
谢谢大家
...全文
49
7
打赏
收藏
*****datalist问题
在datalist里加入了一个Button还有一个Dropdownlist 如何在Button按下之后获得Dropdownlist的值 int quantity =((DropDownList)ProductDataList.Items[1].FindControl("QuantityDropDownList")).SelectedIndex+1; 但是item[i]怎么获得? 触发的是Clickonbutton 如果不这么做,有没有其他办法? 谢谢大家
复制链接
扫一扫
分享
转发到动态
举报
写回复
配置赞助广告
用AI写文章
7 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
rabies
2003-08-20
打赏
举报
回复
怎么用ButtonColumn呢,有没有例子啊
谢谢大家了:)
rabies
2003-08-20
打赏
举报
回复
up...
cnhgj
2003-08-20
打赏
举报
回复
用ButtonColumn,然后调用ITEMCOMMAND事件,接着就跟思归大侠说的那样了
cnhgj
2003-08-20
打赏
举报
回复
加入asp:ButtonColumn,然后调用OnItemCommand事件,接着的就跟思归大侠说的那样了
rabies
2003-08-20
打赏
举报
回复
To saucer(思归, .NET MVP)
不可以啊
因为我是使Button触发事件,
如果给Datalist加了这个事件则根本不会触发啊
To jjcccc()
试过了,但由于是Button触发事件 SelectedItem根本好像就没有
jjcccc
2003-08-20
打赏
举报
回复
==>
int quantity =((DropDownList)ProductDataList.SelectedItem.FindControl("QuantityDropDownList")).SelectedIndex+1;
saucer
2003-08-20
打赏
举报
回复
add an ItemCommand handler for the DataList, then try
void DataList_ItemCommand(Object sender, DataListCommandEventArgs e)
{
int quantity =((DropDownList)e.Item.FindControl("QuantityDropDownList")).SelectedIndex+1;
}
android天气查询源码
dataList
.clear(); for (Province province : provinceList) {
dataList
.add(province.getProvinceName()); } adapter.notifyDataSetChanged(); listView.setSelection(0); titleText.setText...
DataList
多行数据后添加分隔线
类似 ******* ******* ******* ******* ----------******* ******* ******* ******* ----------******* ******* ******* ******* ----------方法一:在后台定义一个公共计数变量public...asp:
dataList
id=""> <...
HTML5标签
dataList
配合JS 我们尝试下利用 **** 来配合 JSONP 写个跨域请求百度搜索API的例子: 代码如下: 词条搜索:<input id="input" type="text" name="words" list="words"> <
datalist
id="words" style="width: 100px"> ...
html5
datalist
标签
类似自动完成效果。...就会提示
datalist
下面的列表中的值。当然要输入这些值的首字母。 ********************************************* User: Passw
HTML5中
datalist
标签的使用
定义一个
datalist
的标签需要给他一个id,input就是根据id来与其绑定的,
datalist
中的option就是和列表一样,里面的每个数据都是可被用户所选择的 <
datalist
id="name"> <option value=...
C#
110,529
社区成员
642,572
社区内容
发帖
与我相关
我的任务
C#
.NET技术 C#
复制链接
扫一扫
分享
社区描述
.NET技术 C#
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
让您成为最强悍的C#开发者
试试用AI创作助手写篇文章吧
+ 用AI写文章