Click here to Skip to main content
15,888,454 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Sell.aspx code

XML
<asp:DropDownList ID="ddlsellprty" runat="server" AutoPostBack="true"
                                onselectedindexchanged="ddlsellprty_SelectedIndexChanged"></asp:DropDownList>



Sell.cs Code

C#
protected void ddlsellprty_SelectedIndexChanged(object sender, EventArgs e)
    {
        string check = ddlsellprty.SelectedItem.Value;
        if (check == "Other")
        {
            txtother.Visible = true;
        }


    }
Posted
Comments
Tuduru Sai Krishna 8-Oct-13 3:40am    
Have you added the Items in Dropdown list with value "Others"..
I think there is no problem with the code..
Check whether Dropdown list contains an item with value "Others"..
pkvartej7121 8-Oct-13 3:50am    
yes but selected index change method is not called by dropdownlist
Tuduru Sai Krishna 8-Oct-13 3:51am    
set the "AutopostBack" property of the dropdown list to "true"..
By default it is false..

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900