PC Review


Reply
Thread Tools Rating: Thread Rating: 1 votes, 5.00 average.

Sending information from an ASPX page to ASP page using form and post method

 
 
Ricardo Magalhaes
Guest
Posts: n/a
 
      3rd Jun 2005
Hi,

I have an ASPX page and I need to call an ASP page sending parameters like
Name, Adress, ie. using POST method. This next ASP page show payment
informations..

If was from an ASP to another ASP page I'll write the code:

<form action=boleto.asp method=post>
<input type=text name="adress" value="adress abc">
<input type=submit name="Send">
</form>

In ASP.NET 1.1 we can't call another page using post method. I saw
the URL http://www.netomatix.com/HttpPostData.aspx that explain how to do it

Then in my webcontrol button ASPX, I wrote the code:

Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Dim myReq As HttpWebRequest =
WebRequest.Create("http://localhost/boleto.asp")
Dim postData As String = "endereco=" + lblEndereco.Text
Dim encoding As New ASCIIEncoding
Dim byte1 As Byte() = encoding.GetBytes(postData)

' Set the content type of the data being posted.
myReq.ContentType = "application/x-www-form-urlencoded"
myReq.Method = "POST"

' Set the content length of the string being posted.
myReq.ContentLength = postData.Length

Dim newStream As Stream = myReq.GetRequestStream()
newStream.Write(byte1, 0, byte1.Length)
newStream.Close()
End Sub

But the next page, was not displayed. How can I do it.. ? The user to need
print the payment informations.

Regards,

Ricardo



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
POST data from aspx page to asp page =?Utf-8?B?TU9VU1RBRkEgQVJBRkE=?= Microsoft ASP .NET 2 6th Oct 2006 12:43 PM
adding main.aspx.vb & main.aspx.resx under aspx John M Microsoft ASP .NET 1 29th May 2005 10:27 PM
Post data via the Post method in asp.net? (URGENT) Vishal Microsoft ASP .NET 1 21st Dec 2004 07:14 AM
Post Data ASP web page from ASPX Page Srinivasa Raghavan Sethuraman Microsoft ASP .NET 1 20th Jul 2004 08:20 PM
How do I post data from aspx page to another aspx page. Sriram Mallajyosula Microsoft ASP .NET 1 5th Nov 2003 05:48 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:05 PM.