473,769 Members | 8,283 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Post to another url

Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also redirect to
this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt
Nov 18 '05 #1
7 2003
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3******** *****@TK2MSFTNG P11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also redirect to this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt

Nov 18 '05 #2
> 2) use client side script to change your ASP.NET form action attribute
Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the runat= 'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3******** *****@TK2MSFTNG P11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also
redirect to
this url :-). I dont' want to change the webpage interface, so how can I
POST partial form info? by using a tmp url???
TIA
-matt


Nov 18 '05 #3
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
2) use client side script to change your ASP.NET form action attribute

Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the

runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3******** *****@TK2MSFTNG P11.phx.gbl...
Hi all,

Not very sure about this. I have one button (not a submit button) will
"post" partial page(form) info to another url(the user will also

redirect
to
this url :-). I dont' want to change the webpage interface, so how can I POST partial form info? by using a tmp url???
TIA
-matt



Nov 18 '05 #4
You can have as many submit buttons as you want, but no matter which of them
is clicked, it will do the same as the others (submit the data according to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()) .
"Matt" <m@m.net> wrote in message
news:ea******** *****@tk2msftng p13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
2) use client side script to change your ASP.NET form action attribute Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.phx.gbl...
Here's some ideas for you.
1) Output an old fashioned non-server form to the client (without the

runat=
'server' attribute) Set the action attribute like you would have in
ASP.OLD, and use javascript to submit the form.
2) use client side script to change your ASP.NET form action attribute
3) use this webform control: http://www.wilsondotnet.com/Controls/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://Steve.Orr.net
Hire top-notch developers at http://www.able-consulting.com


"Matt" <m@m.net> wrote in message
news:O3******** *****@TK2MSFTNG P11.phx.gbl...
> Hi all,
>
> Not very sure about this. I have one button (not a submit button) will > "post" partial page(form) info to another url(the user will also

redirect
to
> this url :-). I dont' want to change the webpage interface, so how
can I > POST partial form info? by using a tmp url???
>
>
> TIA
>
>
> -matt
>
>



Nov 18 '05 #5
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="Sort ByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write( "<script for=window event=onload language='JavaS cript'>");
Response.Write( "form.submit(); ");
Response.Write( "</script>");
%>
</head><body><for m action=url method="post">< input type="hidden" name="cmd"
value="_xclick" >
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet .net> wrote in message
news:ua******** ******@TK2MSFTN GP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of them is clicked, it will do the same as the others (submit the data according to the ACTION of the form tag).

You can submit via JavaScript (form.submit()) .
"Matt" <m@m.net> wrote in message
news:ea******** *****@tk2msftng p13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url
and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
> 2) use client side script to change your ASP.NET form action attribute Can I have more insight on this or 1)

"Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
news:OE******** ******@TK2MSFTN GP11.phx.gbl...
> Here's some ideas for you.
> 1) Output an old fashioned non-server form to the client (without the runat=
> 'server' attribute) Set the action attribute like you would have in
> ASP.OLD, and use javascript to submit the form.
> 2) use client side script to change your ASP.NET form action attribute > 3) use this webform control: http://www.wilsondotnet.com/Controls/
>
> --
> I hope this helps,
> Steve C. Orr, MCSD, MVP
> http://Steve.Orr.net
> Hire top-notch developers at http://www.able-consulting.com
>
>
>
>
> "Matt" <m@m.net> wrote in message
> news:O3******** *****@TK2MSFTNG P11.phx.gbl...
> > Hi all,
> >
> > Not very sure about this. I have one button (not a submit button)

will > > "post" partial page(form) info to another url(the user will also
redirect
> to
> > this url :-). I dont' want to change the webpage interface, so how

can
I
> > POST partial form info? by using a tmp url???
> >
> >
> > TIA
> >
> >
> > -matt
> >
> >
>
>



Nov 18 '05 #6
What are you trying to do on this page? Where does the form's "url" get a
value? You need to give your form a name so that the script can call it,
rather than just generically "form". You should also put the script below
the form in the code. You also don't need the for=window event=onload if
you are not going to place the script in a function.
"Matt" <m@m.net> wrote in message
news:eE******** *****@TK2MSFTNG P09.phx.gbl...
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="Sort ByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write( "<script for=window event=onload language='JavaS cript'>"); Response.Write( "form.submit(); ");
Response.Write( "</script>");
%>
</head><body><for m action=url method="post">< input type="hidden" name="cmd" value="_xclick" >
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet .net> wrote in message
news:ua******** ******@TK2MSFTN GP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of

them
is clicked, it will do the same as the others (submit the data according

to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()) .
"Matt" <m@m.net> wrote in message
news:ea******** *****@tk2msftng p13.phx.gbl...
It likes that I have two buttons, one for submitting whole form to one url and another submiting partial form info to another url via "post". So
problem are these:
1) can I have two "submit" buttons in one form?
2) if no, can I simulate "submit"? If I can simulate, how about NN?

"Matt" <m@m.net> wrote in message
news:%2******** *******@tk2msft ngp13.phx.gbl.. .
> > 2) use client side script to change your ASP.NET form action attribute > Can I have more insight on this or 1)
>
>
>
> "Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
> news:OE******** ******@TK2MSFTN GP11.phx.gbl...
> > Here's some ideas for you.
> > 1) Output an old fashioned non-server form to the client (without the > runat=
> > 'server' attribute) Set the action attribute like you would have in > > ASP.OLD, and use javascript to submit the form.
> > 2) use client side script to change your ASP.NET form action attribute > > 3) use this webform control: http://www.wilsondotnet.com/Controls/
> >
> > --
> > I hope this helps,
> > Steve C. Orr, MCSD, MVP
> > http://Steve.Orr.net
> > Hire top-notch developers at http://www.able-consulting.com
> >
> >
> >
> >
> > "Matt" <m@m.net> wrote in message
> > news:O3******** *****@TK2MSFTNG P11.phx.gbl...
> > > Hi all,
> > >
> > > Not very sure about this. I have one button (not a submit
button) will
> > > "post" partial page(form) info to another url(the user will also
> redirect
> > to
> > > this url :-). I dont' want to change the webpage interface, so
how can
I
> > > POST partial form info? by using a tmp url???
> > >
> > >
> > > TIA
> > >
> > >
> > > -matt
> > >
> > >
> >
> >
>
>



Nov 18 '05 #7
I don't want to disable all other attributes rather than the info need to be
POSTed on same page(page1), so I redirect it (when button1 clicking) to
another page with a simplified form and automaticlly submit the form when
the window is loading. I'm suspecting this is not the best way though.

The button1 is actually a PayPal buynow button which just asks some
particular info it needs, a subset of my form's attrs(the page is a signup
page). I'm still looking a more elegant way :-).

Thanks for all tips. It works now.

"Scott M." <s-***@BADSPAMsnet .net> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
What are you trying to do on this page? Where does the form's "url" get a
value? You need to give your form a name so that the script can call it,
rather than just generically "form". You should also put the script below
the form in the code. You also don't need the for=window event=onload if
you are not going to place the script in a function.
"Matt" <m@m.net> wrote in message
news:eE******** *****@TK2MSFTNG P09.phx.gbl...
On page1 I have a button which will redirect the user to page2.aspx when
"onclick". here is page2.aspx, doesn't work

<%@ Page language="c#" Trace="false" TraceMode="Sort ByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write( "<script for=window event=onload language='JavaS cript'>");
Response.Write( "form.submit(); ");
Response.Write( "</script>");
%>
</head><body><for m action=url method="post">< input type="hidden"

name="cmd"
value="_xclick" >
<input type="image" src=source border="0"
name="submit"></form></body></html>
"Scott M." <s-***@BADSPAMsnet .net> wrote in message
news:ua******** ******@TK2MSFTN GP11.phx.gbl...
You can have as many submit buttons as you want, but no matter which of
them
is clicked, it will do the same as the others (submit the data
according
to
the ACTION of the form tag).

You can submit via JavaScript (form.submit()) .
"Matt" <m@m.net> wrote in message
news:ea******** *****@tk2msftng p13.phx.gbl...
> It likes that I have two buttons, one for submitting whole form to
one url
> and another submiting partial form info to another url via "post".
So > problem are these:
> 1) can I have two "submit" buttons in one form?
> 2) if no, can I simulate "submit"? If I can simulate, how about NN?
>
>
>
> "Matt" <m@m.net> wrote in message
> news:%2******** *******@tk2msft ngp13.phx.gbl.. .
> > > 2) use client side script to change your ASP.NET form action

attribute
> > Can I have more insight on this or 1)
> >
> >
> >
> > "Steve C. Orr [MVP, MCSD]" <St***@Orr.ne t> wrote in message
> > news:OE******** ******@TK2MSFTN GP11.phx.gbl...
> > > Here's some ideas for you.
> > > 1) Output an old fashioned non-server form to the client (without the
> > runat=
> > > 'server' attribute) Set the action attribute like you would

have in > > > ASP.OLD, and use javascript to submit the form.
> > > 2) use client side script to change your ASP.NET form action

attribute
> > > 3) use this webform control:
http://www.wilsondotnet.com/Controls/ > > >
> > > --
> > > I hope this helps,
> > > Steve C. Orr, MCSD, MVP
> > > http://Steve.Orr.net
> > > Hire top-notch developers at http://www.able-consulting.com
> > >
> > >
> > >
> > >
> > > "Matt" <m@m.net> wrote in message
> > > news:O3******** *****@TK2MSFTNG P11.phx.gbl...
> > > > Hi all,
> > > >
> > > > Not very sure about this. I have one button (not a submit

button) will
> > > > "post" partial page(form) info to another url(the user will also > > redirect
> > > to
> > > > this url :-). I dont' want to change the webpage interface, so how can
> I
> > > > POST partial form info? by using a tmp url???
> > > >
> > > >
> > > > TIA
> > > >
> > > >
> > > > -matt
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #8

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

Similar topics

2
5095
by: luu duong | last post by:
I know this is probably easy but here is the details. I have an asp page that is not inside a frameset. I want to post data to another asp page that is inside a frameset. So firstpage.asp has action="response.htm" target="results". response.htm... <HTML> <FRAMESET ROWS="50%,50%"> <FRAME SRC="header.asp" NAME="fTop"> <FRAME SRC="another.asp" NAME="results">
0
1130
by: nik | last post by:
I have a postback on an aspx-page. In this postback I perform a redirect. The page is quite heavy, so instead of performing a postback I perform a post to another empty page, which then can do the calculations necessary to perform the redirect. The post to another page is done by changing the action property of the form clientside. First of all: This doesn't seem like a nice solution. A bit of a hack. Is there a better way to perform a...
8
4891
by: Victor | last post by:
I need to redirect to another web page, but that redirect will include the submission of form data. So, unlike ServerXMLHTTP which stays on the originating web page, I need the script to redirect to the page that I'm submitting the POST data to (without pressing a submit button). Any suggestions? Thanks, Victor
6
2076
by: someone | last post by:
I am in a situation where I need to package some information from Page1, submit it via POST to another server which will process the information and then send the user to another page on my server (Page2). I have looked at HttpWebRequest on numerous coding websites but have not found a method that works. Does anyone have a solution for this or has seen an example that works for this situation? This is one very frustrating issue that I...
2
12562
by: Matt | last post by:
When we submit the form data to another page, we usually do the following: <form action="display.aspx" method="post"> will submit the form data and open display.asp in the current browser <form action="display.aspx" method="post" target="_blank"> will submit the form data and open display.asp in a new browser
10
3440
by: glenn | last post by:
I am use to programming in php and the way session and post vars are past from fields on one page through to the post page automatically where I can get to their values easily to write to a database or continue to process on to the next page. I am now trying to learn ASP to see if we can replace some of our applications that were written in php with an ASP alternative. However, after doing many searches on google and reading a couple...
3
5931
by: gustav | last post by:
Hey there, I have this problem: I´m migrating an ASP site to ASP.NET 1.1, and I find myself stuck because of this Form that has some inputs to access an Extranet... When the user submits, the values of the text inputs pass by POST method to a webform in another application (and another server) I find this problems: - ASP.NET pages allow one Form only, which submit just to itself by POST method - Server.Transfer() is useful just to...
3
1884
by: BVS | last post by:
Presently, my website which is written in c# uses this command to move around my site: Response.Redirect("products.aspx?pro="+thechosenproduct) Is there a way to switch this to a POST method so that the pro= doesn't appear in the address bar?
5
6665
by: =?Utf-8?B?QWxleCBNYWdoZW4=?= | last post by:
I am trying to create ASPX code which will allow me to redirect a user to another site with POST data. I figure that the best way to do this is with JavaScript to the client. Here's what I'm doing: I have a JavaScript function that looks like this: function DoPostRedir() { document.MainFrm.method = "POST"; document.MainFrm.action = "http://XXX.YYY.com/Help/";
0
9589
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
10049
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9865
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...
1
7413
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6675
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5448
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3967
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
3567
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2815
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.