locked
Retaining the size of Drop Down List RRS feed

  • Question

  • I have 2 drop down lists. When i select 1st value from the 1st ddl, the 2nd ddl gets disabled. When i select 2nd value from 1st ddl, the 2nd ddl enables. This just what I needed. But there is a problem. When the 2nd ddl gets disabled, its size increases automatically & I don't want that. T have used table, update panel, trigger, content panel, still its not working. 
    I am attaching the portion of the code. Kindly help.

    <td>
    <label>Activity&nbsp;</label>
    </td>
    <td>
    <asp:UpdatePanel ID="Update_Panel1" runat="server">
    <ContentTemplate>
    <asp:DropDownList ID="ddl_Activity1" runat="server" AutoPostBack="True" 
    class="w100" onselectedindexchanged="ddl_Activity1_SelectedIndexChanged">     
    <asp:ListItem Text="Create Permanent Water Holes" Value="1"></asp:ListItem>
    <asp:ListItem Text="Improve Water Storage" Value="2"></asp:ListItem>
    </asp:DropDownList>
    </ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="ddl_SubActivity1" EventName="SelectedIndexChanged"/>
    </Triggers>
    </asp:UpdatePanel>
    </td>
    <td>
    <asp:label ID="lbl_SubActivity1" runat="server">Sub&nbsp;Activity</asp:label>
    </td>
    <td>
    <asp:UpdatePanel ID="Update_Panel2" runat="server">
    <ContentTemplate>
    <asp:DropDownList ID="ddl_SubActivity1" runat="server" 
    class="w100" AutoPostBack="True">
    <asp:ListItem Text="Desilting" Value="1"></asp:ListItem>
    <asp:ListItem Text="Deepening" Value="2"></asp:ListItem>
    <asp:ListItem Text="Repairing" Value="3"></asp:ListItem>
    </asp:DropDownList>
    </ContentTemplate>
    <Triggers>
    <asp:AsyncPostBackTrigger ControlID="ddl_SubActivity1" EventName="SelectedIndexChanged"/>
    </Triggers>
    </asp:UpdatePanel>    
    </td>

    Saturday, January 25, 2014 5:08 AM

Answers

  • For ASP.Net I'd ask them over here.

    http://forums.asp.net/

    or for classic ASP you can ask them here.

    http://forums.iis.net/1044.aspx/1?Classic+ASP

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    • Proposed as answer by Just Karl Sunday, January 26, 2014 4:33 PM
    • Marked as answer by Just Karl Sunday, February 2, 2014 5:57 PM
    Saturday, January 25, 2014 12:34 PM