Click here to Skip to main content
15,887,485 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Dear Folks,

I have two form in my asp .net site. when i click the button it will post back to server by using update panel, after post back how to set default form. below is the code

ASP.NET
<div>
      <asp:ScriptManager ID="sc" runat="server" EnablePartialRendering="true" LoadScriptsBeforeUI="false" ScriptMode="Release"   > 
      </asp:ScriptManager>
      <asp:UpdatePanel runat="server" ID="uPanel" UpdateMode="Conditional">
         <ContentTemplate>
            <asp:Panel runat="server" ID="pnlEtryForm">
               <table>
                  <tr>
                     <td>
                     </td>
                     <td>
                     </td>
                  </tr>
                  <tr>
                     <td colspan="2">
                        <asp:Button runat="server" ID="btn" Text="test" OnClick="btn_click" />
                     </td>
                  </tr>
               </table>
            </asp:Panel>  
                
            <div id="pnlFormDonate"  runat="server" visible="false">
               <form id="frmDonate" action="https://www.sandbox.paypal.com/cgi-bin/webscr" method="post">
               <input class="empty" type="hidden" id="bus" name="business" value="kanag._1336399919_per@gmail.com"/>
               <input type="hidden" name="cmd" value="_donations"/>
               <input type="hidden" name="item_name" value="Donation For IJP"/>
               <input type="hidden" id="itemNo" name="item_number" value="Donate for IJP Ministry"/>
               <input type="hidden" name="amount" id="amt"/>
               <input type="image" src="https://www.paypalobjects.com/en_US/i/btn/btn_donateCC_LG.gif" id="don"
                  border="0" name="submit" alt="PayPal - The safer, easier way to pay online!"/>
               <img alt="" border="0" width="1" height="1" src="https://www.paypal.com/en_US/i/scr/pixel.gif"/>
               </form>
            </div>         
         </ContentTemplate>
      </asp:UpdatePanel>

   </div> 


the above code when i click the button test, it will postback to server and in the code behind i hides the button test and i shows the pnlFormDonate div, after post back i click the paylpal donate image it does not redirect to the paypal page.

note :

it works fine in the firefox but it does not work in IE and Chrome...

pls tell me any one..


Thanks & Regards,
Kanagaraj.M
Posted
Updated 8-Jul-12 20:10pm
v2

Hi kanagmathes,

your question not clearing the your doubt,

if you want to redirect your page from form1 to form2 without url change then use server.transfer.
 
Share this answer
 
Comments
kanagmathes 9-Jul-12 1:09am    
Thanks for your reply prateefgiet..

i updated my question...

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