p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   General .NET (http://p2p.wrox.com/forumdisplay.php?f=122)
-   -   Form Action Problem.. (http://p2p.wrox.com/showthread.php?t=23518)

NitinJoshi January 6th, 2005 01:10 AM

Form Action Problem..
I'm having <Form id="form1" action="abcd.aspx"> this tag problem....
when i does this the current form which has to go on action related form it doesnot go...rather it goes to the same page..i.e. current page...when i see the View Source in internet Explorer...the form tag shows <form id="form1" action="current form name"> i.e the name of my form from where i have given action in the form tag...

the code is here

current form
    <body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server" action="Target.aspx">
<INPUT id="Text1" style="Z-INDEX: 101; LEFT: 210px; WIDTH: 150px; POSITION: absolute; TOP: 152px; HEIGHT: 30px" type="text" size="19" name="Text1" runat="server">
<INPUT id="Submit1" style="Z-INDEX: 102; LEFT: 234px; WIDTH: 115px; POSITION: absolute; TOP: 215px; HEIGHT: 31px" type="submit" value="Submit" name="Submit1" runat="server">

this code is for action form
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">


CAn ANybody have solution...

Santhi January 6th, 2005 01:32 AM

You can't set the Target page for ASP.NET application.ASP.NET page post back to itself.Use some logic in Page_Load to redirect to the target page on page submit.

leion January 6th, 2005 06:02 AM

Traditional 'action' are not available in ASP.NET application. You have to use response.redirect("Your Next Page") or server.transfer("Your Next Page") to do the same funcion as 'action' can do

All times are GMT -4. The time now is 07:47 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.