前台:
<asp:DataList ID="DataList1" runat="server" Width="97%">
........
........
<FooterTemplate>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr bgcolor="#ffffff">
<td height="25" colspan="7">
<div align="right">
<asp:DropDownList ID="drpReceiver" runat="server"></asp:DropDownList>
</div>
</td>
</tr>
</table>
</FooterTemplate>
</asp:DataList>我在后台判断,在某种情况下,不允许drpReceiver显示出来,但我写this.drpReceiver.Visible,会报错
<asp:DataList ID="DataList1" runat="server" Width="97%">
........
........
<FooterTemplate>
<table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
<tr bgcolor="#ffffff">
<td height="25" colspan="7">
<div align="right">
<asp:DropDownList ID="drpReceiver" runat="server"></asp:DropDownList>
</div>
</td>
</tr>
</table>
</FooterTemplate>
</asp:DataList>我在后台判断,在某种情况下,不允许drpReceiver显示出来,但我写this.drpReceiver.Visible,会报错
解决方案 »
- 怎么用正则表达式取链接的文字
- 请问有人知道怎么样使用ajsx实现进度条吗?
- 无刷新三级联动取不到值的问题?
- Vb.net中的Ctype相当于c#中的什么呢?
- ASP.NET 和 AciteX 之间互传消息
- 大虾帮忙..!!Asp.net(C#)对SQL server2000 表中数据修改问题.
- 刚学.NET,关于数据库访问的问题。
- 请问有没有javascript结合asp.net的书籍或者程序 我看到的ASP.net都没有javascript?
- 关于vs.net2003当中新建asp.net工程的问题!
- 大家帮我看看,为什么这个程序不能编译成Dll?
- HTML 查找问题,大侠请进
- 为什么iis执行失败
{
DropDownList dll = (DropDownList)e.Item.FindControl("drpReceiver");
dll.Visible = false;
}
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
DropDownList DropDownList1= (DropDownList)e.Item.FindControl("drpReceiver");
}
}
protected void DataList1_ItemDataBound(object sender, DataListItemEventArgs e)
{
if (e.Item.ItemType == ListItemType.Footer)
{
DropDownList DropDownList1= (DropDownList)e.Item.FindControl("drpReceiver");
string values=DropDownList1.selectvalue;
把值存到viewstate里面或者存到cookiee里面。直接调。
}
}
声明个变量 吧DropDownList.SelectedItem.text传过去不行?