Click here to Skip to main content
15,896,063 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
HI,


In my web application, i have use UpdatePanel for speed up the server response.
Its works fine in my local system, and our WINSERVER2008R2.

But in client side while publish my website in WEB SERVER 2008, it remain static, doesn't shows any errors

Please help me out...


Here is my Design View...

XML
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
   <ContentTemplate>

<asp:DropDownList ID="ddl_mode" runat="server" AutoPostBack="true" onselectedindexchanged="ddl_mode_SelectedIndexChanged">
                <asp:ListItem> By Cash</asp:ListItem>
                <asp:ListItem> By Cheque</asp:ListItem>
                <asp:ListItem> By Card</asp:ListItem>
</asp:DropDownList>

 </ContentTemplate>
    </asp:UpdatePanel>

 <asp:Panel ID="Pnl_pay_Cheque" runat="server">

         <table>
            <tr align="center">
                        <td>
                            <strong>Cheque No. :</strong></td>
                        <td>
                            <asp:TextBox ID="txt_Chequeno" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server"
                                ControlToValidate="txt_Chequeno" ErrorMessage="*Required"
                                SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
            </tr>
            <tr align="center">
                        <td>
                            <strong>Cheque Date :</strong></td>
                        <td>
                            <asp:TextBox ID="txt_Chequedate" runat="server"
                                onclick="showCalendarControl(this)"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server"
                                ControlToValidate="txt_Chequedate" ErrorMessage="*Required"
                                SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
             </tr>
             <tr align="center">
                        <td>
                            <strong>Bank Name :</strong></td>
                        <td>
                            <asp:TextBox ID="txt_Chequebank" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server"
                                ControlToValidate="txt_Chequebank" ErrorMessage="*Required"
                                SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
             </tr>
        </table>

</asp:Panel>


<asp:Panel ID="Pnl_pay_Card" runat="server">

        <table>
            <tr align="center">
                        <td>
                            <strong>Card No. :</strong></td>
                        <td>
                            <asp:TextBox ID="txt_cardno" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server"
                                ControlToValidate="txt_cardno" ErrorMessage="*Required" SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
             </tr>
             <tr align="center">
                        <td>
                            <strong>Bank Name :</strong></td>
                        <td>
                            <asp:TextBox ID="txt_cardbank" runat="server"></asp:TextBox>
                        </td>
                        <td>
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server"
                                ControlToValidate="txt_cardbank" ErrorMessage="*Required"
                                SetFocusOnError="true"></asp:RequiredFieldValidator>
                        </td>
              </tr>
         </table>

</asp:Panel>






Here is my Server Code

C#
protected void ddl_mode_SelectedIndexChanged(object sender, EventArgs e)
    {
        if (ddl_mode.SelectedIndex == 0)
        {
            Pnl_pay_Cheque.Visible = false;
            Pnl_pay_Card.Visible = false;
            txt_enteramt.Text = "0";

        }
        else if (ddl_mode.SelectedIndex == 1)
        {
            Pnl_pay_Cheque.Visible = true;
            Pnl_pay_Card.Visible = false;
            txt_enteramt.Text = "0";

        }
        else if (ddl_mode.SelectedIndex == 2)
        {
            Pnl_pay_Card.Visible = true;
            Pnl_pay_Cheque.Visible = false;
            txt_enteramt.Text = "0";
        }
        txt_enteramt.Text = "";
    }




Actually while user Changing the DropDownlist items, i need to hide/Show the respective Panels.
Posted
Updated 22-Feb-12 20:41pm
v3
Comments
Varun Sareen 23-Feb-12 0:20am    
Please post some code snippet.
J.Karthick 23-Feb-12 2:42am    
Question Updated, Please check

Dear as i can see in the code it seems your are putting the panel outside the update Panel control
in this case you can't update/refresh the controls outside the update panel.

try to put the panels between the <contenttemplate> and and it will work fine.

i'm ready for any question and u can communicate with me directly if you want put your email to send mine for fast answer


Thank you.
 
Share this answer
 
Comments
J.Karthick 24-Feb-12 6:09am    
Many thanks for your solution....i'll check this out
can you please explain more, can you put the aspx code you are using ?
so i can solve the problem for you.
 
Share this answer
 
Comments
J.Karthick 23-Feb-12 2:41am    
I have update my question, please check this now

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