472,954 Members | 1,594 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,954 software developers and data experts.

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

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
8 5017
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Steve | last post by:
Does anyone know what is wrong with this code or why I might be experiencing this behavior? I have a Java application that submits HTTP POST requests to a servlet (with content in the body of...
0
by: tim payne | last post by:
I have a quick question! Using the code behind model in VS.Net, is it possible to change the action of a form server side, or is that something we'd have to do client side? The example I'm...
1
by: bhavik | last post by:
hi I have problem with attachment showing form server side. when our application run on localhost we add any attachment to mail server. if suppose we want to show that attachment we can see...
1
by: Mr Bojangles | last post by:
Hi, I want a do the following: From a (client side) web form, post to server side script (I'm using Javascript but anything will do), which in turn--and this is the important bit that I...
1
by: ChrisA | last post by:
I have a small (feedback) page in asp.net 1.1. Is it possible to cause a page to be opened in another window in respose to a post from another aspx page? Is there something I can do in the page...
0
by: Vinay Nagrik | last post by:
Hello Group members, I have access to server side php script which takes parameters from a form and processes the buffer and saves the file. However, I, as an implementor, do not have the...
0
by: robert | last post by:
I need to post a form from an asp.net page to another web application (asp), I know I can do this with javascript and change the action url but I wondered if it is possible to post the form server...
6
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
1
by: BarryX | last post by:
Hi, How do I simulate this from the server side: <form name="SearchForm" method="POST" id="SearchForm" action="http://SOMEURL/Search.ASP?Parm1=1&Parm2=2"> I have generally been posting data...
2
by: DJRhino | last post by:
Was curious if anyone else was having this same issue or not.... I was just Up/Down graded to windows 11 and now my access combo boxes are not acting right. With win 10 I could start typing...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
4
NeoPa
by: NeoPa | last post by:
Hello everyone. I find myself stuck trying to find the VBA way to get Access to create a PDF of the currently-selected (and open) object (Form or Report). I know it can be done by selecting :...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
1
by: Teri B | last post by:
Hi, I have created a sub-form Roles. In my course form the user selects the roles assigned to the course. 0ne-to-many. One course many roles. Then I created a report based on the Course form and...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
1
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.