473,978 Members | 4,011 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cannot submit to another form

I am converting my ASP code to ASP.NET but have run into a hard stop. On
several of my pages I must post data to a different page as a result of a
submit. With ASP.NET, however, it seems that the 'action' clause on a form
is ignored and it always posts to itself.

Now how, guys, do you manage to set up a form to post to PayPal, for
example?

What am I missing here?
Dec 4 '07 #1
5 1518
You can't change the "Action" attribute of the form, but you can set the
"PostBackUr l" property on the submit button.
"James R. Davis" <ji*@msgroup.or gwrote in message
news:Ok******** ******@TK2MSFTN GP03.phx.gbl...
>I am converting my ASP code to ASP.NET but have run into a hard stop. On
several of my pages I must post data to a different page as a result of a
submit. With ASP.NET, however, it seems that the 'action' clause on a
form
is ignored and it always posts to itself.

Now how, guys, do you manage to set up a form to post to PayPal, for
example?

What am I missing here?

Dec 4 '07 #2
..NET insists on setting its own action attribute for the form if you're using runat="server". To break away from the submit structure, you might try using postbackurl=" (your web page's name)" in the submit button.

EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com
Dec 10 '07 #3
Thanks.

Yes, I have been able to make this work - that is, using a button with a
postbackurl field. However, there is no postbackurl capability when I want
to use an image instead of a button to initiate a submit.
Dec 11 '07 #4
Yes, I have been able to make this work - that is, using a button with a
postbackurl field. However, there is no postbackurl capability when I
want
to use an image instead of a button to initiate a submit.
How about ImageButton?

Dec 11 '07 #5
One step closer to what I want, but not quite there yet.

With your help I found out how to post to an out of application url. That
works perfectly. What it does, however, is take my users away from my site
and to the other site. What I really want to do is cause the other site to
be seen in a new window so that I do not lose my users should they go 'take
a look' at the other site.

Is there an ASP.NET function that can accomplish this for me in association
with the submit button?
<C Whitewrote in message news:20******** *************** @yahoo.com...
.NET insists on setting its own action attribute for the form if you're
using runat="server". To break away from the submit structure, you might
try using postbackurl=" (your web page's name)" in the submit button.
>


EggHeadCafe - .NET Developer Portal of Choice
http://www.eggheadcafe.com

Dec 12 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3366
by: Matt | last post by:
My problem is when the user click the submit button, it will launch another new window for the request page. I want to confirm we cannot use JavaScript open window functions to open a request page? The following page2.asp won't output the value entered in page1.asp. However, if we do <form action="page2.asp" method="get" target="_blank">, then it will open a new window for the request page, instead of using the same window as page1.asp....
8
3063
by: Matt | last post by:
I want to submit the form to the server without opening another page. When we do the following, it will submit the form data in myform to the IIS, and open page2.asp. <form name="myform" action="page2.asp" method="post"> But I don't want to open another page, I just want to submit the form data. Should I do the following?? myform.submit();
7
1907
by: NetCoder | last post by:
Hi to all, I have made a script that uses both JavaScript and PHP. The script has a form and when it is submitted, a JavaScript confirmation box appears, asking the user to confirm their action. If they click No, the action is cancelled and if they click Yes, the form is submitted. If only it were that simple... The problem is that when the form is submitted using form.submit() within a JavaScript function, no form variables are being...
8
1897
by: wASP | last post by:
Hi, I'm having a problem referencing the elements within an object after a method of that object (a member function) has been activated with an onsubmit handler: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <script language="javascript" type="text/javascript"> function js_onsubmit_hndl_fn () {
4
5961
by: three-eight-hotel | last post by:
I'm somewhat of a newbie to PHP coding, but have developed a site using the technology, and have been pleasantly surprised by the capabilities offered. I am more comfortable in the ASP world, however and am really struggling with managing sessions in PHP, based on my experiences with managing sessions in ASP. 99.9% of the feedback I have seen when dealing with the errors has referred to having whitespace before the <?php or after the...
1
2481
by: teenagelcruise | last post by:
hi, i have a problem with my code which is i cannot update and addnew data into the database but i can delete the data.plz give me an idea.this is my code that i wrote. <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Order Record</title> <meta name="Microsoft Border" content="tlb, default"> </head>
4
4366
by: MichaelK | last post by:
Hello. I have all data already collected on the current page? I want to open another window with the form, fill the fields and submit that form. So basically the question is how can I fill all fields and submit the form on another window. Regards, Michael
12
2509
by: GuangXiN | last post by:
I want the file upload element disappear, instead of it, I place a text box and a button with my own css defination. but it doesn't work on IE7. What should I do now? <form action="upload.php" method="POST" enctype="multipart/form-data"> <p> <span>Select photo:</span> <input type="file" name="photo" style="display:none;"> <input type="text" name="photoUrl" class="s1" /> <input type="button" class="s2"...
4
5521
by: j1dopeman | last post by:
Hi, I'd like to use a button to save and then submit a form. I can set the onlick of the button to mahButton_click or submit, but I can't figure out how to do both. It looks like c# can't call a form's submit. I've found how to post programatically, but I need to use the form's target attribute so that the response goes into another frame, and I can't figure out how to do that programatically.
3
2333
by: pinko1204 | last post by:
My Update function cannot successful update to sql table even don't have any error. Please help to check .....thx PHP1 <?php require_once 'header.php'; ?> <style type="text/css"> <!--
0
10364
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
11837
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
11600
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10923
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6428
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6574
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
5164
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
4750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3776
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.