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
>
>