By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,211 Members | 2,227 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,211 IT Pros & Developers. It's quick & easy.

Post to another url

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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*************@TK2MSFTNGP11.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

P: n/a
> 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.net> wrote in message
news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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

P: n/a
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***************@tk2msftngp13.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.net> wrote in message
news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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

P: n/a
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*************@tk2msftngp13.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***************@tk2msftngp13.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.net> wrote in message
news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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

P: n/a
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="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>");
Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form 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**************@TK2MSFTNGP11.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*************@tk2msftngp13.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***************@tk2msftngp13.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.net> wrote in message
news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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

P: n/a
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*************@TK2MSFTNGP09.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="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>"); Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form 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**************@TK2MSFTNGP11.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*************@tk2msftngp13.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***************@tk2msftngp13.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.net> wrote in message
> news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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

P: n/a
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****************@TK2MSFTNGP10.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*************@TK2MSFTNGP09.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="SortByCategory" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<html><head>
<%
Response.Write("<script for=window event=onload language='JavaScript'>");
Response.Write("form.submit();");
Response.Write("</script>");
%>
</head><body><form 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**************@TK2MSFTNGP11.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*************@tk2msftngp13.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***************@tk2msftngp13.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.net> wrote in message
> > news:OE**************@TK2MSFTNGP11.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*************@TK2MSFTNGP11.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 discussion thread is closed

Replies have been disabled for this discussion.