C#代码:
protected void DropDownListDB_SelectedIndexChanged(object sender, EventArgs e)
{
if (DropDownListDB.SelectedValue == "Other")
{
LabelIfOtherDb.Visible = true;
TextBoxIfOtherDb.Visible = true;
}
}
ASP 代码:
<asp:DropDownList AutoPostBack="True" ID="DropDownListDB" runat="server" Height="20px"
Width="158px">
<asp:ListItem>- Select -</asp:ListItem>
<asp:ListItem>Oracle</asp:ListItem>
<asp:ListItem>MS SQL Server</asp:ListItem>
<asp:ListItem>MySQL</asp:ListItem>
<asp:ListItem>MS Access</asp:ListItem>
<asp:ListItem>Other</asp:ListItem>
</asp:DropDownList>
我有AutoPostBack="True"
,但它仍然没有显示我隐藏的文本框/标签..有什么建议吗?