First Set the Dropdownlist property as AutoPostback=true;
aspx code
---------
<asp:DropDownList ID="ddlSearch" runat="server" Width="100px" AutoPostBack="True"
onselectedindexchanged="ddlSearch_SelectedIndexChanged">
C# Code
--------
protected void dropdown_SelectedIndexChanged(object sender, EventArgs e)
{
if (ddlSelection.SelectedValue == "0")
{
txtAccountno.Visible = true;
}
else
{
txtAccountno.Visible = False;
}
}
Best Regard's
Tiju Thankachan
Saritha.rajeshkumar, if this helps please login to Mark As Answer. | Alert Moderator