高手帮帮忙了。
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList dll = (DropDownList)this.DataList1.FindControl("DropDownList1");
Response.Redirect(dll.SelectedValue);
}
这个DropDownList1是内嵌在DataList1下的,我想获取到这个DropDownList1的选中值,不知道有无办法实现
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList dll = (DropDownList)this.DataList1.FindControl("DropDownList1");
Response.Redirect(dll.SelectedValue);
}
这个DropDownList1是内嵌在DataList1下的,我想获取到这个DropDownList1的选中值,不知道有无办法实现
解决方案 »
- 自定义Web控件如何添加视图
- winform , 里面的 Application_start 函数 到底是干什么用的
- 50分麻烦帮我看下错在哪
- 如何给SqlDataAdapter传入order by参数
- 为什么我在关闭网页弹出的子模式对话框后,它自己又自动打开?急啊~~在线等
- (高手请进)新浪网和CSDN网中,如何对文章内容的一些关键字加提示?(高手请进)
- 用Vistual Studio排版你烦了吗?
- 绑定数据到DataGrid的页面如何生成静态页面,包括分页?
- $$$$$$$$在线等~~asp+access插入新行的问题
- 怎么在webform的datagrid的标题栏加入一DropDownList控件?
- 实现一个用Cookie做的购物车
- 有关条码的问题
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList dll = (DropDownList)sender;
Response.Redirect(dll.SelectedValue);
}
{
DataListItem item= (sender as DropDownList).NamingContainer as DataListItem;
if(item!=null)//findcontrol查找控件
{
DataRowView drv =item.DataItem as DataRowView ;
if(drv !=null)
{
string id=string.Format("{0}",drv["id"]);
}
}
}
protected void DropDownList1_SelectedIndexChanged(object sender, EventArgs e)
{
DropDownList dll = e.Item.FindControl("DropDownList1");
Response.Redirect(dll.SelectedValue);
}试试,理论上可以