Post form with data to a external site (.net 1.1 vb.net)

Hi

I have now been googling for hours and I can not find a answer. :-(

I am programming a e-shop (.net 1.1) and what I want to achive is:

Customer fillout form, clicks on the Pay button then should the following thing happen:

1. Form date is saved to the database ( normal vb.net code )

2. The data that should be posted to the external form is create from the saved data   ( normal vb.net code )

2. A post is done to an external site with created data as "post" data and then user is redirected to this site.

Thanks

 

Christian

 

0
ccrccrdk
2/15/2006 10:31:03 AM
asp.net.web-forms 93655 articles. 5 followers. Follow

6 Replies
1368 Views

Similar Articles

[PageSpeed] 48

Use the System.Net.HttpWebRequest() object to post the data to the desired URL.

Then use Response.Redirect() to redirect them.


Regards

Dave
0
DMW
2/15/2006 10:45:08 AM

Hi There

 

This will not work since the user will not come to the site to where the post is done ??

I need to programmally be able to do a post with data to a external site and see the page to where the post is done.

Thanks anyway

 

0
ccrccrdk
2/15/2006 10:56:33 AM

Then use the HttpWebRequest object to post the data, and simply return the returned HTML in the Response stream from the page that made the request.

As far as the user is concerned, they will see the HTML as if they'd been redirected to the site.

Of course, you might need to parse and tweak the HTML a bit.


Regards

Dave
0
DMW
2/15/2006 11:06:58 AM
You can post & get data from an external site using Microsoft ..Net framework namespace System.Net
code snippet
HttpWebRequest objHttpWebRequest = (HttpWebRequest) WebRequest.Create(remoteURL);
                objHttpWebRequest.Method = "POST";
                //timeout parameter
                objHttpWebRequest.Timeout = (int)ConnectionTimeout;
                objHttpWebRequest.KeepAlive =true;
                //specify the content type here
                objHttpWebRequest.ContentType ="text/xml";

0
neel07
2/15/2006 11:22:04 AM

Hi There

Thanks to you all for the quick answers but;-)

Problem is that I need to do a "Clean post" like if the use would have pressed the submit buttom on a normal HTML page

I don't need the result in the ASP application, the external site will take over from there.

The syntax are

  1. ASP.net local application : form data is save in a local db
  2. ASP.net local application : A POST string is created ( I could create a FORM in real html but then the use has to press twice)
  3. The ASP.net application post the data to the new site and leaves the current application to the new site like a normal submit would have done.

What I would like top create is something like this

Class Submitform

 Public formname as string

   Public function post

' Code goes here to post the data and leave the current site

   End function

   Property Add(Key, Value)

   'Add the key and vlaues

   End property

Thanks

Christian

0
ccrccrdk
2/15/2006 11:41:30 AM

Then you'll need to do client-side Javascript.

If you're not prepared to make the request from your web server and then send the returned content to the client (which would, I hasten to add, be simple and straightforward with the HttpWebRequest object), you will have to force the client to make the request.

This will involve preparing the request data on the server so that it will populate a response page with some client-side script and the items to be submitted and setting the script up so that it will execute directly the page is loaded by the browser.

With that in place, you can then return that content in response to the request to your web server and lo and behold, the client will execute the form post to the other server. Obviously, in the midst of this, you will have stored the data that is used to make the form post to the other site in your database.


Regards

Dave
0
DMW
2/15/2006 2:11:40 PM
Reply:

Similar Artilces:

Post form with data to a external site (.net 1.1 vb.net) #2
Hi There I am programming a e-shop (.net 1.1) and what I want to achive is: Customer fill out form, clicks on the Pay button then should the following thing happen: Problem is that I need to do a "Clean post" like if the user would have pressed the submit buttom on a normal HTML page I don't need the result in the ASP application, the external site will take over from there. The syntax are ASP.net local application : form data is save in a local db ASP.net local application : A POST string is created ( I could create a FORM in real html but then the use has to press twice) The ...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! Have a look into this links http://en.wikipedia.org/wiki/.NET_Framework http://blogs.msdn.com/mohammadakif/archive/2006/12/03/net-3-0-different-versions-of-the-net-framework.aspx http://www.codeproject.com/aspnet/ComparisonASP1xASP20.aspAshok Rajawww.iGold.inDon't forget to click "Mark as Answer" on the post that helped you. This credits that m...

Problems while porting .Net framework 1.0 (VB.Net) application to .Net Framework 1.1
Hello,   I have a ASP.Net web application,written in VB.Net,developed on .Net Framework 1.0 .I am trying to port it on to .Net framework 1.1.   For achieving this,I follow the following steps-   1.Open the project using the .vbproj file. 2.I am prompted with the conversion message "Do you want to convert the solution and all projects to .Net framework  1.1....." 3.I click "Yes" 4.I assume that the project is now converted. 5.I build the project & try to run it. 6.I get the following error -     Server Error in '/Consert.Net' Application. ...

Differences between .net 1, .net 1.1, .net 2.0 and .net 3.0 #2
Hi, This seems to be a common question, but i havent got an answer yet:(Can, any one please explain me the differences between these versions.If you keep your feet firmly on the ground, you'll have trouble putting on your pants! There are too many differences for one email - - from 1.0 to 1.1 (not a whole lot of real change, other than fixes, at least compared to 1.1 to 2.0) With 2.0, there were many new declarative controls, with many new ideas added in With 3.0, it's a superset of 2.0 - instead of replacing the installation completely, it just 'added on' new functionality - I would...

HELP Running a web-site with .NET 2.0 and NET 1.1
Hi evreybody,  I have a HUGE problem. I running a website that I have just created with ASP .NET 2.0 technology, well within my web site there is an web application that needs to run under V1.1. I'm using IIS 6.0 and I was wondering to see if anybody can help me run my new site, and run that web app at the same time. Basically is two sites within one web directory, the way you acces both sites is by the same link, just one is ROOT/default aspx (V2.0) and the other is Root/webapp/default.aspx (v1.1) can anybody help me... :( THANK you you will have to define them as two separate w...

Can a .NET 1.1 page execute in a .NET 2.0 web site?
I've got a ASP.NET 1.1 web site to which I would like to add some ASP.NET 2.0 web pages. Could I just change the web site to point to the 2.0 .NET version and still have the .NET 1.1 web pages work so that both versions are in the same web site? Have you some of you approached this? Thanks. The official answer is maybe It's not officially supported, but most ASP.NET 1.1 pages will run fine under ASP.NET 2.0.  Officially you should run the upgrade wizard on your 1.1 pages. This is a  pretty good blog entry.      JamesMy Blog: http://www.wintersfamily.plus.c...

is .net framework 1.1 same as .net framework SDK 1.1
is .net framework 1.1 same as  .net framework SDK 1.1 Basically Framework 1.1 of .NET includes the Sofware Development Kit (SDK) 1.1 http://www.microsoft.com/downloads/details.aspx?FamilyID=9b3a2ca6-3647-4070-9f41-a333c6b9181d&displaylang=en Regards,Vinz"Code, Beer and Music" that's my way of being a programmer!How to get your Forum Question Answered | Blog | CodeASP.NET I think .net framework 1.1 is just the runtime library to view .net 1.1 programs.  the .net framework SDK 1.1 one is the actual development library used to create them.   Eri...

Multiple posts from a single form (.net 1.1)
Hi.Let me start by saying I am dealing with a rather inflexible 3rd party for one of my sites.  I need to iterate through a check box list and for each item selected, send a the value to post to an off site page via the querystring, e.g. FormActionNew.aspx?OptinFormID=341 How do I fire several of theses posts using a single aspx webform submit?Thanks!  Several hours later, and I am still stuck.  I think I need to use HttpWebRequest but not really sure how.  Any ideas? You're right.  You need to use an HttpWebRequest to do this.  Here is a function I wro...

.NET 1.1, RadioButtonLists, and assigning eventhandlers in VB.NET
I actually have to write this in VB.NET using the old 1.1 framework.  What I am doing is creating my radiobuttonlists in the codebehind while adding them to a panel's control collection at runtime.  I need to assign a method, ie. SelectionChanged(object as sender, e as eventargs), at runtime in the codebehind but am having a hell of a time doing it.  In C# I would just assign rbl.SelectedIndexChanged += new EventHandler(SelectionChanged) and be done with it but it doesn't seem that simple in VB.NET.  I haven't done VB is quite a while so any help would be MUCH...

autocomplete not working in IE7 after web app was migrated from .NET 1.0/1.1 to .NET 3.5
IE7 autocomplete not working after web app was migrated from .NET 1.0/1.1 to .NET 3.5. OS: Windows XP. Autocomplete worked fine on IE6 and IE7 before migration.  Is there anything thats needs to be configured on the server for IE7 autocomplete to work with the new migrated 3.5 application?  Appreciate the feedback         How are you impleneting Autocomplete? Can you show us problem causing code..My Blog"Don't be afraid to be wrong; otherwise you'll never be right." there is no autocomplete implementation. This is purely using...

Where is the ADO.NET Sybase driver for .NET 1.1 and .Net 2.0?
Hi All Does anyone know where I can get the Sybase drivers for ADO.NET for both versions, 1.1 and 2.0/3.0? Cheers Chris Burrell Hi Chris, There is no release of ASE ADO.NET Provider 2.0 (I assume you refer to ASE provider, not ASA - if ASA please port to sybase.public.sqlanywhere.general). For the 1.1 Provider: It is available in the ASE SDK for windows or the PC Client CDRom included with ASE product. On the SDK its available as 12.5.1 and 15.0 On ASE PC Client I think 12.5.1 is part of ASE 12.5.X and 15.0 is part of ASE 15.X 2.0 provider should release som...

which is shou i use? Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NET
Microsoft .NET Framework 1.1 Data Provider for Oracle and the Oracle Data Provider for .NETI am confused?Which is better or which one should I use?BTW, I am going to use .net 2.0 with oracle 9. Can anyone tell me what shou I use for working with oracle database?Thanks very much in advance!Justin Oracle's data provider has more functionality than Microsoft's.If your doing transaction processing you can have SAVEPOINTs, which Microsoft's data provider does not provide.Also, Oracle has PL/SQL Associative Arrays which are very powerful.Oracle also allows you to bind parameters by name and pos...

.NET 1.1 and .NET 2 Perceives DB data differently
I'm hoping someone can help me out - at least by pointing me to who I can ask, if not answering the question directly. I have some encrypted values in a SQL Server 2000 database that I unencrypt and use in a website that I just converted from .NET 1.1 to .NET 2. The data is pulled from the database using standard ADO with no changes between the .NET 1.1 version and the .NET 2 version - yet for some data entries, when the identical value is pulled by the .NET 2 code it is changed or shorted. For example:  1.1 code traces out a value pulled from the db as: ᒪ࢖淨琳d搈把���媑쬹࡝䜻ꖉ�...

Implementing .Net Form into an APS.net web form, can this be done
I am new here, but have been searching for a while, and may not have the correct lingo to find what I am looking for.  I am tasked with implementing a .exe application that was writen vb6 then converted to .net into a new website my team is developing. The idea is to put each of the 3 different forms in this .exe application of 3 different .aspx pages. I have attempted multiple things to get this into the page and even started to just rewrite it as an ASP.net web form, but even then I can't reuse any of the code since the System.Web.UI.Page doesn't inherit the sa...

Web resources about - Post form with data to a external site (.net 1.1 vb.net) - asp.net.web-forms

Externals - Wikipedia, the free encyclopedia
All of the Externals were originally portrayed as immortal and important, playing an extremely major role in the future and Apocalypse 's rise ...

Vatican orders external audit of assets - AdelaideNow Search Search
THE Vatican has ordered the first external audit of its assets as part of a drive by Pope Francis to bring transparency to its finances where ...

Vatican orders external audit of assets
The Vatican has ordered the first external audit of its assets as part of a drive by Pope Francis to bring transparency to its finances, where ...

Vatican orders external audit of assets
THE Vatican has ordered the first external audit of its assets as part of a drive by Pope Francis to bring transparency to its finances where ...

Sad decline of West Indies cricket can't be arrested without external help
The great West Indian cricket dynasty of the mid-1970s to the mid-1990s produced some of the finest cricketers of the 20th century.

Russian plane crash: 'External' factors to blame for downing of jet over Sinai, airline Kogalymavia says ...
Russian airline Kogalymavia says external factors are to blame in the downing of one of its aircraft over Egypt.

Apple doubles external TestFlight testers to 2,000 users, beta periods to 60 days
... betas and new Tech Talks today, Apple has more developer news to share today. Starting today, TestFlight will now support up to 2,000 external ...

Review: Mophie Juice Pack Reserve for iPhone 6/6s & Power Reserve 1X external battery
Battery maker Mophie's latest portable charging accessories are compact, convenient and durable, making them an easy recommendation for anyone ...

CleanMyDrive 2 for Mac makes cleaning external drives as easy as one click
... OS X 10.10 or later. It’s a free tool designed to help users monitor their hard drives and quickly clean unspecified junk files from external ...

Amazon Sale offers big savings on internal and external Samsung SSD drives
SSD drives are crucial not just for laptop performance, but also for external storage to ensure lightning-fast access to all of your files. And ...

Resources last updated: 12/21/2015 11:09:05 PM