html:
<ItemTemplate>
<asp:DropDownList id=Label4 runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "coOpen").ToString().Trim() %>'>
<asp:ListItem Value="显示">显示</asp:ListItem>
<asp:ListItem Value="隐藏">隐藏</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
asxp:string coOpen=((DropDownList)e.Item.Cells[5].FindControl("Label3")).ToString();这样怎么得不到DropDownList的值 ?应该怎么写才可以得到值?
<ItemTemplate>
<asp:DropDownList id=Label4 runat="server" Text='<%# DataBinder.Eval(Container.DataItem, "coOpen").ToString().Trim() %>'>
<asp:ListItem Value="显示">显示</asp:ListItem>
<asp:ListItem Value="隐藏">隐藏</asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
asxp:string coOpen=((DropDownList)e.Item.Cells[5].FindControl("Label3")).ToString();这样怎么得不到DropDownList的值 ?应该怎么写才可以得到值?
解决方案 »
- 大家看看,在一个页面放置多个FCKEDITOR,会让页面速度变慢,要怎么解决阿,明天给分,我的性欲,大家看着办
- datagrid绑定列传值,高手帮忙啊,在线等!
- 客户端脚本中onmouseover不是Button有效属性?
- 关于在后台写Gridview的超级连接问题(有点难度)
- 求两个日期之间有多少天怎么算,在线等!随时结贴!
- 小弟模仿duwamish写程序对于如何将selece存储过程放入到数据实体中
- 绑定新浪微博
- js结合ajax发送请求,请求的页面过不去,求ajax注意点和原理,具体看代码。
- !!!数据显示问题 !!!
- 我实在写不好
- 客户端VBScript用msgbox弹出的提示框能不能把标题栏里的“VBScript”字眼给去掉?
- VS.NET运行自动编译的DLL,我把Aspx和Bin放到空间总出错
{
//点击表格打开
if (e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
e.Item.Attributes.Add("onclick","window.open(’Default.aspx?id=" + e.Item.Cells[0].Text + "’);");
}
//双击表格连接到另一页
//在itemDataBind事件中
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
string OrderItemID =e.item.cells[1].Text;
e.item.Attributes.Add("ondblclick", "location.href=’../ShippedGrid.aspx?id=" + OrderItemID + "’");
}
//双击表格打开新一页
if(e.Item.ItemType == ListItemType.Item || e.Item.ItemType == ListItemType.AlternatingItem)
{
string OrderItemID =e.item.cells[1].Text;
e.item.Attributes.Add("ondblclick", "open(’../ShippedGrid.aspx?id=" + OrderItemID + "’)");
}
★特别注意:【?id=】 处不能为 【?id =】
---------------------------DropDownList ddl = ((DropDownList)e.Item.Cells[5].FindControl("Label4"));
string coOpen = ddl.SelectedItem.Value;