473,785 Members | 2,466 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

is it possibe to post html from vb.net

Hi
I have a requirement to submit form data to a url after collecting the
data from the database.
For example I need to send firstname and lastname through a post method

I can call on the fly.
This is the traditional route below , I want to emulate this submit
action from a vb.class using request.method= "post"
<FORM action="http://somesite.com/prog/adduser" method="post">
First name: <INPUT type="text" name="firstname "><BR>
Last name: <INPUT type="text" name="lastname" ><BR>
email: <INPUT type="text" name="email"><B R>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
clear as mud?
Anyone have any tips ?

Nov 21 '05 #1
2 4137
"andy" <an**@northwave s.com> schrieb:
I have a requirement to submit form data to a url after collecting the
data from the database.
For example I need to send firstname and lastname through a post method


You can find a sample for creating a 'POST' HTTP request here:

<URL:http://dotnet.mvps.org/dotnet/code/net/#CookieRequest>

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://classicvb.org/petition/>
Nov 21 '05 #2
THis would be something similar to what you are looking for..if anyone sees
any mistakes feel free to chime in.

Public Sub SubmitForAndy
Dim formData As String
Dim uri As Uri

uri = New Uri(txtAddress. Text)
Dim httpReq As HttpWebRequest = DirectCast(WebR equest.Create(u ri),
HttpWebRequest)

formData = "username=" & txtUsername.Tex t & "&password= " &
txtPassword.Tex t
httpReq.AllowAu toRedirect = True
httpReq.Method = "POST"
httpReq.Content Type = "applicatio n/x-www-form-urlencoded()"
httpReq.Content Length = formData.Length

Dim sw As New StreamWriter(ht tpReq.GetReques tStream)
sw.Write(formDa ta)
sw.Close()
End Sub

Gary Townsend.

"andy" <an**@northwave s.com> wrote in message
news:11******** **************@ g43g2000cwa.goo glegroups.com.. .
Hi
I have a requirement to submit form data to a url after collecting the
data from the database.
For example I need to send firstname and lastname through a post method

I can call on the fly.
This is the traditional route below , I want to emulate this submit
action from a vb.class using request.method= "post"
<FORM action="http://somesite.com/prog/adduser" method="post">
First name: <INPUT type="text" name="firstname "><BR>
Last name: <INPUT type="text" name="lastname" ><BR>
email: <INPUT type="text" name="email"><B R>
<INPUT type="submit" value="Send"> <INPUT type="reset">
</FORM>
clear as mud?
Anyone have any tips ?

Nov 21 '05 #3

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

Similar topics

3
3543
by: sammmista | last post by:
hello experts, Plz dont treat this as another newbie query , i did my homework but still getting nowhere :( :( :( Trying to learn PHP on Fedora core 1 (PHP 4.3,MySQL,HTTPD).Unable to post data from html form to php file(connecting to mysql database and inserting into a table) . This seemingly simple problem is making me go mad !!! I googled extensively and already tried the following
5
3973
by: Michael Foord | last post by:
I'm receiving POST data to a CGI, which I'd like to forward to another CGI using urllib2. I have two options - 1) Parse the data using cgi.FieldStorage() and then rebuild the POST request into a dictionary - including any files (? uploading files by urllib2 untested and undocumented - examples seem to be for httplib). 2) Read the whole POST data in using sys.stdin.read(), rebuild the
2
14056
by: Erik Johnson | last post by:
I am trying to work with a program that is trying make an HTTP POST of text data without any named form parameter. (I don't know - is that a normal thing to do?) I need to write a CGI program that accepts and processes that data. I'm not seeing how to get at data that's not a named form parameter. I wrote a simple CGI program to echo a string representation of the cgi.FieldStorage class that's recevied, and one to make an HTTP POST to it...
7
20932
by: Rui Pestana | last post by:
Hello all, I want to use the POST method to submit the form and then grab the parameters in the asp file with request.form("parm"). The problem is that I am using the _search target to open the asp page. When I use _blank target there is no problem, either I use GET or POST method. But when I use _search target, only GET method works.
12
3825
by: Jan Roland Eriksson | last post by:
I have worked some more on this suggested new mFAQ version trying to get all user input to blend into the text. Another review by the NG would be welcome. ===== Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: July 22, 2004
5
3146
by: Jan Roland Eriksson | last post by:
Some more fine tuning and inclusion of last suggested text from regulars has been done to this test post #4 of the mFAQ. As usual, rip it up anywhere you feel that it's appropriate to do so. ===== Archive-name: www/stylesheets/newsgroup-faq Posting-Frequency: once a week Last-modified: 2004-07-26
0
3886
by: WIWA | last post by:
Hi, I want to login to a password protected website and fetch the content of the page behind. I have based my code on http://weblogs.asp.net/jdennany/archive/2005/04/23/403971.aspx. When I use tools like ieHTTPHeaders v1.6, and I perform a normal login (using the normal website), I see that the viewstate is __VIEWSTATE=dDwxMzU4OTE3NTA2Ozs%2BTK88jS63JXN181X3N8zKivua8co%3D&txt_username=xxx&txt_password=xxxxxx&btn_login=Login. When I...
24
2884
by: moriman | last post by:
Hi, The script below *used* to work. I have only just set up a server, PHP etc again on my Win98 system and now it doesn't? On first loading this page, you would have $p = and the button image below it.
1
4789
by: pmasclark | last post by:
Hello, I created a web site, site A, that redirects to another web site, site B, where a simple web service is hosted. The code to call the web service is simple. oWS.AllowAutoRedirect = True oWS.Credentials = New System.Net.NetworkCredential("user","pass") str = oWS.HelloWorld("World")
0
10161
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...
1
10098
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8986
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7506
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
6743
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
5523
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4058
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
3662
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2890
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.