How do you post the current page to a different aspx page ?

Skill/Topic: Beginner
A) FORM ACTION="actiopage.aspx" RUNAT="server" method="post"
B) FORM ACTION="actiopage.aspx" method="post"
C) FORM id="Form1" method="post" runat="server"

Showing Answers 1 - 18 of 18 Answers

Mandar

  • Dec 12th, 2005
 

FORM ACTION="actiopage.aspx" RUNAT="server" method="post"

  Was this answer useful?  Yes

Mahendra raja

  • Jan 10th, 2006
 

FORM ACTION="actionpage.aspx" RUNAT="server" method="post"

  Was this answer useful?  Yes

Bhavna Kuklani

  • Feb 21st, 2006
 

<form id="132" action="first.aspx" method="post" runat="server">

  Was this answer useful?  Yes

sumalatha

  • Apr 1st, 2006
 

FORM ACTION="actiopage.aspx" RUNAT="server" method="post"

  Was this answer useful?  Yes

cylops

  • Apr 19th, 2006
 

The correct answer is Form id="Form1" method="post" runat="server"Explanation:- why other two are wrong c the code below


After pasting the code into the page, select File > Preview in Browser (or F12), and then enter a value in the text field and click the submit button. The page does not redirect to next.aspx as specified in the form's action attribute. If you select View Source in the browser, you will see that the action attribute is rewritten instead to the name of the file that the form resides on.An ASP.NET web form is posted back to the page it is on. That is one of the biggest differences between ASP and ASP.NET. In ASP, it is possible to redirect to another page to process the results passed using Request objects. In ASP.NET, all of this can now be done on a single page. The form method in ASP.NET is always POST. This happens if runat="server" is one of the form tag's attributes.

  Was this answer useful?  Yes

Guest

  • Mar 5th, 2007
 

We can not set action property to some other page in ASP.Net, even if we set it to different value also if you see the view source it will give the current page name only.

For posting to different URL, we have to mention "PostBackUrl" of button to different page.

Eg.

<asp:Button ID="Button2" runat="server" Text="Button" PostBackUrl="Default2.aspx" />

  

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions