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

Post a form (server side) and submit to external url

P: n/a
Hi,

I have a form (server side) because of the filling of variables through the
application. But now I need to post it to an url on submit.
My .HTML form looks like this, but how to translate it to asp.net vb code?

!--<FORM ACTION="/test/test.php" METHOD=POST>-->
<form action="https://multipay.net/transaction/mpmain.php" method="post">

....

<INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">

I saw messages about doing a client side javascript as action for onsubmit.
This is not clear to be and seems not the right way.

Thanks,

Gert
Nov 19 '05 #1
Share this Question
Share on Google+
8 Replies


P: n/a
Gert s this not php?
Are you in the right group?
"Gert" <gc****@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a form (server side) because of the filling of variables through the application. But now I need to post it to an url on submit.
My .HTML form looks like this, but how to translate it to asp.net vb code?

!--<FORM ACTION="/test/test.php" METHOD=POST>-->
<form action="https://multipay.net/transaction/mpmain.php" method="post">

...

<INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">

I saw messages about doing a client side javascript as action for onsubmit. This is not clear to be and seems not the right way.

Thanks,

Gert

Nov 19 '05 #2

P: n/a
You cant simply post a form to an ASP.NET webserver. You need to create a
webform and GET the webform, flll in the fields and then postback the form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a form (server side) because of the filling of variables through
the application. But now I need to post it to an url on submit.
My .HTML form looks like this, but how to translate it to asp.net vb code?

!--<FORM ACTION="/test/test.php" METHOD=POST>-->
<form action="https://multipay.net/transaction/mpmain.php" method="post">

...

<INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">

I saw messages about doing a client side javascript as action for
onsubmit. This is not clear to be and seems not the right way.

Thanks,

Gert

Nov 19 '05 #3

P: n/a
He is asking how to translate his form to ASP.NET Webform I think.

--
Best Regards

The Inimitable Mr Newbie
"Patrick.O.Ige" <pa********@optusnet.com.au> wrote in message
news:ur**************@TK2MSFTNGP10.phx.gbl...
Gert s this not php?
Are you in the right group?
"Gert" <gc****@hotmail.com> wrote in message
news:eZ**************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a form (server side) because of the filling of variables through

the
application. But now I need to post it to an url on submit.
My .HTML form looks like this, but how to translate it to asp.net vb
code?

!--<FORM ACTION="/test/test.php" METHOD=POST>-->
<form action="https://multipay.net/transaction/mpmain.php" method="post">

...

<INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">

I saw messages about doing a client side javascript as action for

onsubmit.
This is not clear to be and seems not the right way.

Thanks,

Gert


Nov 19 '05 #4

P: n/a
Good you understood that Mr Newbie.
I was confused.
Patrick

"Mr Newbie" <he**@now.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You cant simply post a form to an ASP.NET webserver. You need to create a
webform and GET the webform, flll in the fields and then postback the form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
Hi,

I have a form (server side) because of the filling of variables through
the application. But now I need to post it to an url on submit.
My .HTML form looks like this, but how to translate it to asp.net vb code?
!--<FORM ACTION="/test/test.php" METHOD=POST>-->
<form action="https://multipay.net/transaction/mpmain.php" method="post">
...

<INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">

I saw messages about doing a client side javascript as action for
onsubmit. This is not clear to be and seems not the right way.

Thanks,

Gert


Nov 19 '05 #5

P: n/a
Thats only because I have been watching Star Trek Voyager for so long, I
think I have developed the biological equivelent of a 'Universal
Translator', and this helps be extrapolate from garbage and bring order to
chaos . . . . ( Sometimes ! )

Live Long And Prosper - \\//

;-D

--
Best Regards

The Inimitable Mr Newbie

"Patrick.O.Ige" <pa********@optusnet.com.au> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Good you understood that Mr Newbie.
I was confused.
Patrick

"Mr Newbie" <he**@now.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You cant simply post a form to an ASP.NET webserver. You need to create a
webform and GET the webform, flll in the fields and then postback the
form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a form (server side) because of the filling of variables through
> the application. But now I need to post it to an url on submit.
> My .HTML form looks like this, but how to translate it to asp.net vb code? >
> !--<FORM ACTION="/test/test.php" METHOD=POST>-->
> <form action="https://multipay.net/transaction/mpmain.php" method="post"> >
> ...
>
> <INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">
>
> I saw messages about doing a client side javascript as action for
> onsubmit. This is not clear to be and seems not the right way.
>
>
>
> Thanks,
>
> Gert
>
>



Nov 19 '05 #6

P: n/a
Actually, you *can* simply post a form from a server-side app to a web URL.
I have built a set of classes for doing just this.

The trick is to create an HTTP POST Request with the form data Url-encoded
into it as it would be if it were coming from a browser (remember that HTTP
is stateless - requesting a form from a web server in no way tells the web
server to expect a form post coming from the client).

The set of classes I've created have been working quite well from within a
service we have on our system which checks data on several public weather
information web sites, to see how long it takes for weather data we provide
to the NWS takes to get to these web sites.

In fact, these classes also include the ability to fetch an HTML form from a
given URL, and parse it into a class (called "HtmlFormData"). The class can
then be used to programmatically "fill out" the form, by changing the
various value properties of the different class members (which represent
HTML form fields), and then post it to the URL of its "action" property. The
HtmlFormData class can be used to add, remove, or modify the contents of an
HTML form, or to build one from scratch, if desired. The ToString() method
of the class returns the HtmlFormData class as HTML (in the form of an HTML
form).

It is used in conjunction with several networking classes, most notably the
HttpClient class that we created, and is part of the same assembly, and a
set of HTML form-parsing Regular Expressions that are in another class in
the same assembly.

I am in the process of creating a commercially-available component class
library that includes this, as well as over 60 classes, structs, interfaces,
enumerations, and delegates, which are useful in a variety of situations as
well. If you'd like to help with the beta testing, email me and I'll send
you a copy. Just promise to give me your feedback on it.

Oh yes. One other thing. It's all .Net 2.0.

--
HTH,

Kevin Spencer
Microsoft MVP
..Net Developer
A watched clock never boils.

"Mr Newbie" <he**@now.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Thats only because I have been watching Star Trek Voyager for so long, I
think I have developed the biological equivelent of a 'Universal
Translator', and this helps be extrapolate from garbage and bring order to
chaos . . . . ( Sometimes ! )

Live Long And Prosper - \\//

;-D

--
Best Regards

The Inimitable Mr Newbie

"Patrick.O.Ige" <pa********@optusnet.com.au> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Good you understood that Mr Newbie.
I was confused.
Patrick

"Mr Newbie" <he**@now.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You cant simply post a form to an ASP.NET webserver. You need to create
a
webform and GET the webform, flll in the fields and then postback the
form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a form (server side) because of the filling of variables
> through
> the application. But now I need to post it to an url on submit.
> My .HTML form looks like this, but how to translate it to asp.net vb

code?
>
> !--<FORM ACTION="/test/test.php" METHOD=POST>-->
> <form action="https://multipay.net/transaction/mpmain.php"

method="post">
>
> ...
>
> <INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">
>
> I saw messages about doing a client side javascript as action for
> onsubmit. This is not clear to be and seems not the right way.
>
>
>
> Thanks,
>
> Gert
>
>



Nov 19 '05 #7

P: n/a
Good to hear that you might be making some money for your efforts, thats
allways a bonus!

I take your point regarding the Url-encoded POST, but the OP was trying to
do this with a browser I think ?!? What do you do about Viewstate ? or is
this just left empty ?

As far as BETA testing your classes, I would be happy to help, but Im snowed
under at the moment and I dont think I could do your testing justice . But I
wish you well with it, and if things slow down a little, I may take you up
on the offer as it sounds really interesting.

--
Best Regards

The Inimitable Mr Newbie

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ua*************@tk2msftngp13.phx.gbl...
Actually, you *can* simply post a form from a server-side app to a web
URL. I have built a set of classes for doing just this.

The trick is to create an HTTP POST Request with the form data Url-encoded
into it as it would be if it were coming from a browser (remember that
HTTP is stateless - requesting a form from a web server in no way tells
the web server to expect a form post coming from the client).

The set of classes I've created have been working quite well from within a
service we have on our system which checks data on several public weather
information web sites, to see how long it takes for weather data we
provide to the NWS takes to get to these web sites.

In fact, these classes also include the ability to fetch an HTML form from
a given URL, and parse it into a class (called "HtmlFormData"). The class
can then be used to programmatically "fill out" the form, by changing the
various value properties of the different class members (which represent
HTML form fields), and then post it to the URL of its "action" property.
The HtmlFormData class can be used to add, remove, or modify the contents
of an HTML form, or to build one from scratch, if desired. The ToString()
method of the class returns the HtmlFormData class as HTML (in the form of
an HTML form).

It is used in conjunction with several networking classes, most notably
the HttpClient class that we created, and is part of the same assembly,
and a set of HTML form-parsing Regular Expressions that are in another
class in the same assembly.

I am in the process of creating a commercially-available component class
library that includes this, as well as over 60 classes, structs,
interfaces, enumerations, and delegates, which are useful in a variety of
situations as well. If you'd like to help with the beta testing, email me
and I'll send you a copy. Just promise to give me your feedback on it.

Oh yes. One other thing. It's all .Net 2.0.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.

"Mr Newbie" <he**@now.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Thats only because I have been watching Star Trek Voyager for so long, I
think I have developed the biological equivelent of a 'Universal
Translator', and this helps be extrapolate from garbage and bring order
to chaos . . . . ( Sometimes ! )

Live Long And Prosper - \\//

;-D

--
Best Regards

The Inimitable Mr Newbie

"Patrick.O.Ige" <pa********@optusnet.com.au> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Good you understood that Mr Newbie.
I was confused.
Patrick

"Mr Newbie" <he**@now.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You cant simply post a form to an ASP.NET webserver. You need to create
a
webform and GET the webform, flll in the fields and then postback the
form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a form (server side) because of the filling of variables
> through
> the application. But now I need to post it to an url on submit.
> My .HTML form looks like this, but how to translate it to asp.net vb
code?
>
> !--<FORM ACTION="/test/test.php" METHOD=POST>-->
> <form action="https://multipay.net/transaction/mpmain.php"
method="post">
>
> ...
>
> <INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">
>
> I saw messages about doing a client side javascript as action for
> onsubmit. This is not clear to be and seems not the right way.
>
>
>
> Thanks,
>
> Gert
>
>



Nov 19 '05 #8

P: n/a
Great idea Kevin.
Will be intouch
Patrick

"Kevin Spencer" <ke***@DIESPAMMERSDIEtakempis.com> wrote in message
news:ua*************@tk2msftngp13.phx.gbl...
Actually, you *can* simply post a form from a server-side app to a web URL. I have built a set of classes for doing just this.

The trick is to create an HTTP POST Request with the form data Url-encoded
into it as it would be if it were coming from a browser (remember that HTTP is stateless - requesting a form from a web server in no way tells the web
server to expect a form post coming from the client).

The set of classes I've created have been working quite well from within a
service we have on our system which checks data on several public weather
information web sites, to see how long it takes for weather data we provide to the NWS takes to get to these web sites.

In fact, these classes also include the ability to fetch an HTML form from a given URL, and parse it into a class (called "HtmlFormData"). The class can then be used to programmatically "fill out" the form, by changing the
various value properties of the different class members (which represent
HTML form fields), and then post it to the URL of its "action" property. The HtmlFormData class can be used to add, remove, or modify the contents of an HTML form, or to build one from scratch, if desired. The ToString() method
of the class returns the HtmlFormData class as HTML (in the form of an HTML form).

It is used in conjunction with several networking classes, most notably the HttpClient class that we created, and is part of the same assembly, and a
set of HTML form-parsing Regular Expressions that are in another class in
the same assembly.

I am in the process of creating a commercially-available component class
library that includes this, as well as over 60 classes, structs, interfaces, enumerations, and delegates, which are useful in a variety of situations as well. If you'd like to help with the beta testing, email me and I'll send
you a copy. Just promise to give me your feedback on it.

Oh yes. One other thing. It's all .Net 2.0.

--
HTH,

Kevin Spencer
Microsoft MVP
.Net Developer
A watched clock never boils.

"Mr Newbie" <he**@now.com> wrote in message
news:OT**************@TK2MSFTNGP12.phx.gbl...
Thats only because I have been watching Star Trek Voyager for so long, I
think I have developed the biological equivelent of a 'Universal
Translator', and this helps be extrapolate from garbage and bring order to chaos . . . . ( Sometimes ! )

Live Long And Prosper - \\//

;-D

--
Best Regards

The Inimitable Mr Newbie

"Patrick.O.Ige" <pa********@optusnet.com.au> wrote in message
news:u3**************@tk2msftngp13.phx.gbl...
Good you understood that Mr Newbie.
I was confused.
Patrick

"Mr Newbie" <he**@now.com> wrote in message
news:e4**************@TK2MSFTNGP10.phx.gbl...
You cant simply post a form to an ASP.NET webserver. You need to create a
webform and GET the webform, flll in the fields and then postback the
form
to the server.

--
Best Regards

The Inimitable Mr Newbie
"Gert" <gc****@hotmail.com> wrote in message
news:eZ******************@TK2MSFTNGP12.phx.gbl...
> Hi,
>
> I have a form (server side) because of the filling of variables
> through
> the application. But now I need to post it to an url on submit.
> My .HTML form looks like this, but how to translate it to asp.net vb
code?
>
> !--<FORM ACTION="/test/test.php" METHOD=POST>-->
> <form action="https://multipay.net/transaction/mpmain.php"
method="post">
>
> ...
>
> <INPUT TYPE=SUBMIT VALUE="SUBMIT ORDER">
>
> I saw messages about doing a client side javascript as action for
> onsubmit. This is not clear to be and seems not the right way.
>
>
>
> Thanks,
>
> Gert
>
>



Nov 19 '05 #9

This discussion thread is closed

Replies have been disabled for this discussion.