Click here to Skip to main content
15,894,740 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
Hi,

In my application I am using the dropdownlist for that I have return the selected index change event for making some controls to visible true and false. I have used the update panel for not refreshing the whole page. But when I select the dropdown the page is refreshing for every time. In my application I have used 7 updatepanels.
Can anyone solve my problem. Here is the code:
XML
<tr>
       <td>
        <asp:UpdatePanel id="UpdatePanel1" runat="server" UpdateMode="Conditional">
    <contenttemplate>
       <table align="center">




                <tr>

    <td align="left" >
        <asp:Label id="lblPriorityId" runat="server" CssClass="css_normalLabel"
            Text="Priority:" ></asp:Label></td>
    <td align="left" >
                <asp:DropDownList ID="ddlPriorityId" runat="server" CssClass="css_dropdown"
                    TabIndex="27" Width="100px">
                    <asp:ListItem value="S">Standard</asp:ListItem>
                    <asp:ListItem value="H">High</asp:ListItem>
                </asp:DropDownList></td>
                <td align="right">
            <asp:Label id="lblDecideToBidId" runat="server" CssClass="css_normalLabel"
            Text="Bid Manager Decision:" ></asp:Label></td>
                    <td align="left"
                        >
                <asp:DropDownList ID="ddlDecideToBidId" runat="server" CssClass="css_dropdown"
                            TabIndex="28" AutoPostBack="true"  OnSelectedIndexChanged="ddlDecideToBidId_SelectedIndexChanged"
                            Width="100px">

                    <asp:ListItem value="Y">Go</asp:ListItem>
                    <asp:ListItem value="N">No Go</asp:ListItem>
                </asp:DropDownList>

        </td></tr>

        <tr><td align="left">
<asp:Label ID="lblBidOwner" CssClass="css_normalLabel"  runat="server"
         Text="Bid Owner:"></asp:Label>
        </td><td align="left" >
            <asp:RadioButtonList ID="rdbBidowner" runat="server" CssClass="css_radiobutton_list"
                OnSelectedIndexChanged="rdbBidOwner_SelectedIndexChanged"
                RepeatDirection="Horizontal" AutoPostBack="True" Width="150px" TabIndex="29" >
                <asp:ListItem Value="S">Self</asp:ListItem>
                <asp:ListItem Value="B">Bid Engineer</asp:ListItem>
            </asp:RadioButtonList>
            </td>
            <td align="left">
             <asp:DropDownList ID="drpBidEngineer"  runat="server"
                 CssClass="css_dropdown" Visible="false" TabIndex="30" Width="100px">
            </asp:DropDownList>
        </td>
        </tr>


        </table>
        </contenttemplate>
       </asp:UpdatePanel>
       </td>
       </tr>


Thanks in Advance
Posted
Comments
Amir Mahfoozi 21-Dec-11 3:22am    
Enable AutoPostBack on drop down lists and write SelectedIndexChanged event handler and update the panel in there.
K Herms 21-Dec-11 4:00am    
How are the other updatepanels situated?

you must b using drop down out side of updatepanel
 
Share this answer
 
Use RenderMode='Partial' in DropDownList field. This will not refresh page.
 
Share this answer
 

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



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