Click here to Skip to main content
15,886,091 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Hi,

I have added ScriptManager and ScriptManagerProxy in my page.
I have added text box and drop ddown list boxes in each script..

When I select any one of the dd list box,
both text box values are getting cleared.

Pleas help me how to avoid this.

Below is my ScriptManager code.

C#
<asp:ScriptManager ID="ScriptManager1" runat="server">
     </asp:ScriptManager>

<asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
            <table class="style7" style="border: thin groove #C0C0C0" width="460px" >
                
            <tr>
                <td>
                    <asp:Panel ID="Panel1" runat="server" Width="222px" align="center">
                      <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                    </asp:Panel>
                </td>
            </tr>
            <tr>
                <td align="center">
                        <asp:DropDownList ID="DropDownList1" runat="server" AutoPostBack="True">
                            <asp:ListItem>Overlall DAT Compliance</asp:ListItem>
                            <asp:ListItem>Laptop DAT Compliance</asp:ListItem>
                            <asp:ListItem>Server DAT Compliance</asp:ListItem>
                            <asp:ListItem>Desktop DAT Compliance</asp:ListItem>
                        </asp:DropDownList>
                
                </td>
            </tr>
            </table> 
            </ContentTemplate>
                </asp:UpdatePanel>


Below is my ScriptManagerProxy code

C#
<asp:ScriptManagerProxy ID="ScriptManager2" runat="server">
            </asp:ScriptManagerProxy>
            <asp:UpdatePanel ID="UpdatePanel2" runat="server">
                <ContentTemplate>
            <asp:Panel ID="Panel5" runat="server" Width="222px" align="center"
                    style="z-index: 5; left: 17px; top: 615px; position:absolute; height: 31px; width: 210px">
            <table class="style7" style="border: thin groove #C0C0C0" width="460px" >
                
            <tr>
                <td>
                <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>   
                </td>
            </tr>
            <tr>
                <td align="center">
                        <asp:DropDownList ID="DropDownList2" runat="server" AutoPostBack="True" 
                            onselectedindexchanged="DropDownList2_SelectedIndexChanged">
                            <asp:ListItem>Overlall DAT Compliance</asp:ListItem>
                            <asp:ListItem>Laptop DAT Compliance</asp:ListItem>
                            <asp:ListItem>Server DAT Compliance</asp:ListItem>
                            <asp:ListItem>Desktop DAT Compliance</asp:ListItem>
                        </asp:DropDownList>
                
                </td>
            </tr>
            </table> 
            </asp:Panel>
            </ContentTemplate>
            </asp:UpdatePanel>
Posted
Updated 16-Sep-13 23:35pm
v4
Comments
Thanks7872 16-Sep-13 1:25am    
Title and question are quite different as the actual problem have nothing to do with ScriptManagerProxy. I suspect.
srmohanr 16-Sep-13 1:33am    
Please ignore the title.. look in to my description..
Thanks7872 16-Sep-13 1:40am    
Title is not there to be ignored. It is there for some reasons.
srmohanr 16-Sep-13 1:42am    
Now I have changed my title, can you pls give a solution for this now..

 
Share this answer
 
Comments
Member 10186638 19-Sep-13 1:39am    
what exactly you want,can explain clearly
add

UpdateMode="Conditional" in your update panel

Quote:
<asp:updatepanel id="UpdatePanel1" runat="server" updatemode="Conditional" xmlns:asp="#unknown">
 
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