Click here to Skip to main content
14,549,480 members
Rate this:
Please Sign up or sign in to 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:
<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?
Rate this:
Please Sign up or sign in to vote.

Solution 1

you must b using drop down out side of updatepanel
   
Rate this:
Please Sign up or sign in to vote.

Solution 2

Use RenderMode='Partial' in DropDownList field. This will not refresh page.
   

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




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100