473,320 Members | 1,831 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

How to "double post" ???

Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to
happen:
1. the data has to be posted behind the scenes to the provider's URL (e.g.,
http://www.surveyprocessingprovider....eld2=response2)
2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)

Nov 18 '05 #1
12 1263
Why do you need to double post?

Clicking the button goes to the server, and the event for that button runs.
The event handler first updates the database with the users's data, then
does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to
happen:
1. the data has to be posted behind the scenes to the provider's URL (e.g., http://www.surveyprocessingprovider....eld2=response2) 2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)

Nov 18 '05 #2
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a
url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
Why do you need to double post?

Clicking the button goes to the server, and the event for that button runs. The event handler first updates the database with the users's data, then
does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to happen:
1. the data has to be posted behind the scenes to the provider's URL

(e.g.,

http://www.surveyprocessingprovider....eld2=response2)
2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)


Nov 18 '05 #3
Use a WebClient object you can post that way and wait for the response and
then redirect.

System.Net.Webclient is what your looking for.


"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a
url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
Why do you need to double post?

Clicking the button goes to the server, and the event for that button runs.
The event handler first updates the database with the users's data, then
does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to
happen:
1. the data has to be posted behind the scenes to the provider's URL

(e.g.,

http://www.surveyprocessingprovider....eld2=response2) 2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)



Nov 18 '05 #4
I see what you are saying.

There is a WebRequest class in .NET, look into it. Basically, it allows you
to do a POST using .NET classes and code, which you would be able to put in
your event handler.

Suggest to your provider that they write a web service, instead of having
you post to a web page.

"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a
url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
Why do you need to double post?

Clicking the button goes to the server, and the event for that button runs.
The event handler first updates the database with the users's data, then
does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to
happen:
1. the data has to be posted behind the scenes to the provider's URL

(e.g.,

http://www.surveyprocessingprovider....eld2=response2) 2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)



Nov 18 '05 #5
> I see what you are saying.

There is a WebRequest class in .NET, look into it. Basically, it allows you to do a POST using .NET classes and code, which you would be able to put in your event handler.

Suggest to your provider that they write a web service, instead of having
you post to a web page.
First, what do you think a web service essentially is? Yep, posting to a
web page...

Second, the entire world isn't .NET... Web services aren't always a viable
option.

"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a
url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
Why do you need to double post?

Clicking the button goes to the server, and the event for that button

runs.
The event handler first updates the database with the users's data, then does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> My client is using an online service provider that processes survey
> responses.
>
> After a user fills survey.aspx and presses the OK button, 2 things

need
to
> happen:
> 1. the data has to be posted behind the scenes to the provider's URL
(e.g.,
>

http://www.surveyprocessingprovider....eld2=response2)
> 2. the user has to be redirected to thankyou.aspx.
>
> Has anyone done anything like that? Any idea how to make that happen? >
> TIA.
>
> - Assaf
>
> (apologizing for double-post)
>
>
>



Nov 18 '05 #6
First of all, yes it is essentially the same - but not quite. There is no
standard - which is something that web services adhere to. There is a WSDL
file that conforms to standards, web services use SOAP, etc - all very
standardized.

What makes you think that only .NET has web services? Web services are not
exclusive to .NET - nor do I believe was it invented by .NET. A web service
can be written in Java or anything else - it is just about following a
particular standard - the implementation is up to the developer.

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
I see what you are saying.

There is a WebRequest class in .NET, look into it. Basically, it allows you
to do a POST using .NET classes and code, which you would be able to put

in
your event handler.

Suggest to your provider that they write a web service, instead of having
you post to a web page.


First, what do you think a web service essentially is? Yep, posting to a
web page...

Second, the entire world isn't .NET... Web services aren't always a viable
option.

"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
> Why do you need to double post?
>
> Clicking the button goes to the server, and the event for that
button runs.
> The event handler first updates the database with the users's data,

then > does a Response.Redirect to the 'thank you' page.
>
> "Assaf" <at@isp.com> wrote in message
> news:ut**************@TK2MSFTNGP11.phx.gbl...
> > Hi all,
> >
> > My client is using an online service provider that processes survey > > responses.
> >
> > After a user fills survey.aspx and presses the OK button, 2 things

need
to
> > happen:
> > 1. the data has to be posted behind the scenes to the provider's URL > (e.g.,
> >
>

http://www.surveyprocessingprovider....eld2=response2)
> > 2. the user has to be redirected to thankyou.aspx.
> >
> > Has anyone done anything like that? Any idea how to make that happen? > >
> > TIA.
> >
> > - Assaf
> >
> > (apologizing for double-post)
> >
> >
> >
>
>



Nov 18 '05 #7
> First of all, yes it is essentially the same - but not quite. There is no
standard - which is something that web services adhere to. There is a WSDL
file that conforms to standards, web services use SOAP, etc - all very
standardized.
Wow...

No standard? Are you serious? So your saying all web requests I make right
now are "hit or miss" with some web servers? Hmmm.. I don't know what those
bast**rds ath W3C were talking about with the whole HTTP standard... I guess
XML is the only standard in existance now...

It amazes me how we ever got along before it...

I reiterate.. its not just essentially the same, it is the same. It is an
HTTP Post made to a server, in which case, in the header it references which
file it wants, in this case for a web service one with an asmx extenion on
it, which cues the web server to find the ISAPI filter for that and parse
it...

It's on port 80, its using http, it just passes XML instead of a different
formatted packet.

As for WDSL and such? if you want me to write up some documentation of how
you can post to my legacy asp 3.0 web page, i, like most others, will be
happy to do so...

Not conforming to standards though... thats just plain old wrong...

What makes you think that only .NET has web services? Web services are not
exclusive to .NET - nor do I believe was it invented by .NET. A web service can be written in Java or anything else -
I never said .NET was the only one, this is a .net forum is it not? Kind of
silly for me to talk about java. Sure they can be, but they can't be easily
consumed by each other. I haven't programmed java for about a year and
half, but if memory serves me, I couldn't consume a .net web service in it.
As most times you can't consume java web services in .net. At least not the
"standard" way. So making a comparison like that is kind of silly right
now.

it is just about following a particular standard - the implementation is up to the developer.

Thank you for the lesson in abstraction...
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
I see what you are saying.

There is a WebRequest class in .NET, look into it. Basically, it allows
you
to do a POST using .NET classes and code, which you would be able to
put
in
your event handler.

Suggest to your provider that they write a web service, instead of having you post to a web page.
First, what do you think a web service essentially is? Yep, posting to a web page...

Second, the entire world isn't .NET... Web services aren't always a viable option.

"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
> Marina,
>
> The wrinkle is that the DB is owned by a provider somewhere out on
the > internet. The only interaction I have with the database is by posting to
a
> url, can't use any DB access (ADO.NET, ODBC...).
>
> Any suggestions?
>
> - Assaf
>
> "Marina" <so*****@nospam.com> wrote in message
> news:eN****************@tk2msftngp13.phx.gbl...
> > Why do you need to double post?
> >
> > Clicking the button goes to the server, and the event for that

button > runs.
> > The event handler first updates the database with the users's
data, then
> > does a Response.Redirect to the 'thank you' page.
> >
> > "Assaf" <at@isp.com> wrote in message
> > news:ut**************@TK2MSFTNGP11.phx.gbl...
> > > Hi all,
> > >
> > > My client is using an online service provider that processes

survey > > > responses.
> > >
> > > After a user fills survey.aspx and presses the OK button, 2
things need
> to
> > > happen:
> > > 1. the data has to be posted behind the scenes to the provider's

URL > > (e.g.,
> > >
> >
>

http://www.surveyprocessingprovider....eld2=response2)
> > > 2. the user has to be redirected to thankyou.aspx.
> > >
> > > Has anyone done anything like that? Any idea how to make that

happen?
> > >
> > > TIA.
> > >
> > > - Assaf
> > >
> > > (apologizing for double-post)
> > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #8
I said there was no standard, referring to simply writing ASP pages that
take data. You have no idea how the page expects it's data, or what
arguments it needs. How could you possibly know that there are 3 arguments
called A, B and C - unless the person who wrote the page explicitly tells
you so?

Certainly there is no standard! There is no way you can have a program that
can read your documentation that you wrote up, and understand how to use
your asp page to do what it needs to. As opposed to a WSDL file, which is
standardized, so it can be read and processed. You can write something to
give a list of all methods available, what parameters are used and what
types they are.

Additionally, how do you know what format the response will be sent in? Will
they put it in some sort of proprietary XML format? Will they just simply
return a string "SUCCESS", or "<response>SUCCESS</response>"? Should you
expect a response at all?

You certainly can't do any of that with an ASP page, or someone's
documentation which they wrote up in Word or their own format they thought
of.

..NET makes consuming web services written in .NET easier. But it's not all
that difficult to make a SOAP request to a web services from any language -
to a web service written in any other language. And to dismiss that people
are writing web services in other languages is ridiculous - perhaps the 3rd
party provider in question here doesn't want to use .NET, but they can use
something else to write a web service.

My point is not that web services is some sort of new technology or miracle.
I'm not disagreeing that at it's core it's just an HTTP Post. But because of
the standards created for it, it becomes a ubiquitous tool, that is not tied
to any particular technology

I think you are missing the entire point behind what a web service is, when
it's useful and what it's there for, and that's just too bad.

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
First of all, yes it is essentially the same - but not quite. There is no
standard - which is something that web services adhere to. There is a WSDL file that conforms to standards, web services use SOAP, etc - all very
standardized.
Wow...

No standard? Are you serious? So your saying all web requests I make

right now are "hit or miss" with some web servers? Hmmm.. I don't know what those bast**rds ath W3C were talking about with the whole HTTP standard... I guess XML is the only standard in existance now...

It amazes me how we ever got along before it...

I reiterate.. its not just essentially the same, it is the same. It is an
HTTP Post made to a server, in which case, in the header it references which file it wants, in this case for a web service one with an asmx extenion on
it, which cues the web server to find the ISAPI filter for that and parse
it...

It's on port 80, its using http, it just passes XML instead of a different
formatted packet.

As for WDSL and such? if you want me to write up some documentation of how you can post to my legacy asp 3.0 web page, i, like most others, will be
happy to do so...

Not conforming to standards though... thats just plain old wrong...

What makes you think that only .NET has web services? Web services are not exclusive to .NET - nor do I believe was it invented by .NET. A web service
can be written in Java or anything else -


I never said .NET was the only one, this is a .net forum is it not? Kind

of silly for me to talk about java. Sure they can be, but they can't be easily consumed by each other. I haven't programmed java for about a year and
half, but if memory serves me, I couldn't consume a .net web service in it. As most times you can't consume java web services in .net. At least not the "standard" way. So making a comparison like that is kind of silly right
now.

it is just about following a
particular standard - the implementation is up to the developer.

Thank you for the lesson in abstraction...
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
> I see what you are saying.
>
> There is a WebRequest class in .NET, look into it. Basically, it allows you
> to do a POST using .NET classes and code, which you would be able to put in
> your event handler.
>
> Suggest to your provider that they write a web service, instead of

having
> you post to a web page.

First, what do you think a web service essentially is? Yep, posting to a
web page...

Second, the entire world isn't .NET... Web services aren't always a viable option.

>
> "Assaf" <at@isp.com> wrote in message
> news:%2****************@TK2MSFTNGP11.phx.gbl...
> > Marina,
> >
> > The wrinkle is that the DB is owned by a provider somewhere out on the > > internet. The only interaction I have with the database is by posting
to
a
> > url, can't use any DB access (ADO.NET, ODBC...).
> >
> > Any suggestions?
> >
> > - Assaf
> >
> > "Marina" <so*****@nospam.com> wrote in message
> > news:eN****************@tk2msftngp13.phx.gbl...
> > > Why do you need to double post?
> > >
> > > Clicking the button goes to the server, and the event for that

button
> > runs.
> > > The event handler first updates the database with the users's

data, then
> > > does a Response.Redirect to the 'thank you' page.
> > >
> > > "Assaf" <at@isp.com> wrote in message
> > > news:ut**************@TK2MSFTNGP11.phx.gbl...
> > > > Hi all,
> > > >
> > > > My client is using an online service provider that processes

survey
> > > > responses.
> > > >
> > > > After a user fills survey.aspx and presses the OK button, 2 things > need
> > to
> > > > happen:
> > > > 1. the data has to be posted behind the scenes to the

provider's URL
> > > (e.g.,
> > > >
> > >
> >
>

http://www.surveyprocessingprovider....eld2=response2) > > > > 2. the user has to be redirected to thankyou.aspx.
> > > >
> > > > Has anyone done anything like that? Any idea how to make that
happen?
> > > >
> > > > TIA.
> > > >
> > > > - Assaf
> > > >
> > > > (apologizing for double-post)
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #9
Webclient works perfectly!

Thanks.

- Assaf

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
Use a WebClient object you can post that way and wait for the response and
then redirect.

System.Net.Webclient is what your looking for.


"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to a
url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
Why do you need to double post?

Clicking the button goes to the server, and the event for that button

runs.
The event handler first updates the database with the users's data, then does a Response.Redirect to the 'thank you' page.

"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
> Hi all,
>
> My client is using an online service provider that processes survey
> responses.
>
> After a user fills survey.aspx and presses the OK button, 2 things

need
to
> happen:
> 1. the data has to be posted behind the scenes to the provider's URL
(e.g.,
>

http://www.surveyprocessingprovider....eld2=response2)
> 2. the user has to be redirected to thankyou.aspx.
>
> Has anyone done anything like that? Any idea how to make that happen? >
> TIA.
>
> - Assaf
>
> (apologizing for double-post)
>
>
>



Nov 18 '05 #10
> I said there was no standard, referring to simply writing ASP pages that
take data. You have no idea how the page expects it's data, or what
arguments it needs. How could you possibly know that there are 3 arguments called A, B and C - unless the person who wrote the page explicitly tells
you so?
Certainly there is no standard! There is no way you can have a program that can read your documentation that you wrote up, and understand how to use
your asp page to do what it needs to. As opposed to a WSDL file, which is
standardized, so it can be read and processed. You can write something to
give a list of all methods available, what parameters are used and what
types they are.

Wow... again you have derailed...

So what if you don't have a tool that generates a wsdl for you, does a web
service simply not work? Your entire argument is based on generated
documentation... and not really even documentation, simply an interface
map... I can still get documentation anywhere, and according to even you,
generate my own soap envelope, I don't need WSDL to do that...
Additionally, how do you know what format the response will be sent in? Will they put it in some sort of proprietary XML format? Will they just simply
return a string "SUCCESS", or "<response>SUCCESS</response>"? Should you
expect a response at all?

Proprietary xml? isn't that an oxymoron? This is a WDSL argument, not a
web service argument.

WSDL != Web Service.
You certainly can't do any of that with an ASP page, or someone's
documentation which they wrote up in Word or their own format they thought
of.

The communication is the exact same though, post a response to port 80 [or
whatever is chosen..] on a server. It's no different. I think you have
documentation confused with a communications interface...

That and tool mixed up with the word standard...
.NET makes consuming web services written in .NET easier. But it's not all that difficult to make a SOAP request to a web services from any language - to a web service written in any other language. And to dismiss that people
are writing web services in other languages is ridiculous - perhaps the 3rd party provider in question here doesn't want to use .NET, but they can use
something else to write a web service.

Who said they weren't? This is where most programmers mess up, there is no
point in re-engineering a solution that already works to bring it "up to
speed" with current technology. Thats jsut a bad business decision, and one
that the programmer has no authority on.
My point is not that web services is some sort of new technology or miracle.

You didn't make that great of a point...
I'm not disagreeing that at it's core it's just an HTTP Post. But because of the standards created for it, it becomes a ubiquitous tool, that is not tied to any particular technology

Yet you seem to think that no standards existed before it. Again relying on
your WSDL argument.
I think you are missing the entire point behind what a web service is, when it's useful and what it's there for, and that's just too bad.

When was that a question of what a web service is? Your understanding of
communication within a web service was misguided, I tried to correct that.
This isn't an understanding of web services, simply how they communicate...
Bytes are Bytes dude...
-CJ
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:em**************@tk2msftngp13.phx.gbl...
First of all, yes it is essentially the same - but not quite. There is no standard - which is something that web services adhere to. There is a WSDL file that conforms to standards, web services use SOAP, etc - all very
standardized.
Wow...

No standard? Are you serious? So your saying all web requests I make

right
now are "hit or miss" with some web servers? Hmmm.. I don't know what

those
bast**rds ath W3C were talking about with the whole HTTP standard... I

guess
XML is the only standard in existance now...

It amazes me how we ever got along before it...

I reiterate.. its not just essentially the same, it is the same. It is an
HTTP Post made to a server, in which case, in the header it references

which
file it wants, in this case for a web service one with an asmx extenion on it, which cues the web server to find the ISAPI filter for that and parse it...

It's on port 80, its using http, it just passes XML instead of a different formatted packet.

As for WDSL and such? if you want me to write up some documentation of

how
you can post to my legacy asp 3.0 web page, i, like most others, will be
happy to do so...

Not conforming to standards though... thats just plain old wrong...

What makes you think that only .NET has web services? Web services are not exclusive to .NET - nor do I believe was it invented by .NET. A web

service
can be written in Java or anything else -


I never said .NET was the only one, this is a .net forum is it not? Kind of
silly for me to talk about java. Sure they can be, but they can't be

easily
consumed by each other. I haven't programmed java for about a year and
half, but if memory serves me, I couldn't consume a .net web service in

it.
As most times you can't consume java web services in .net. At least not

the
"standard" way. So making a comparison like that is kind of silly right
now.

it is just about following a
particular standard - the implementation is up to the developer.


Thank you for the lesson in abstraction...
"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:Op**************@TK2MSFTNGP10.phx.gbl...
> > I see what you are saying.
> >
> > There is a WebRequest class in .NET, look into it. Basically, it

allows
> you
> > to do a POST using .NET classes and code, which you would be able to put
> in
> > your event handler.
> >
> > Suggest to your provider that they write a web service, instead of
having
> > you post to a web page.
>
> First, what do you think a web service essentially is? Yep, posting to
a
> web page...
>
> Second, the entire world isn't .NET... Web services aren't always a

viable
> option.
>
> >
> > "Assaf" <at@isp.com> wrote in message
> > news:%2****************@TK2MSFTNGP11.phx.gbl...
> > > Marina,
> > >
> > > The wrinkle is that the DB is owned by a provider somewhere out

on the
> > > internet. The only interaction I have with the database is by

posting
to
> a
> > > url, can't use any DB access (ADO.NET, ODBC...).
> > >
> > > Any suggestions?
> > >
> > > - Assaf
> > >
> > > "Marina" <so*****@nospam.com> wrote in message
> > > news:eN****************@tk2msftngp13.phx.gbl...
> > > > Why do you need to double post?
> > > >
> > > > Clicking the button goes to the server, and the event for that
button
> > > runs.
> > > > The event handler first updates the database with the users's

data,
> then
> > > > does a Response.Redirect to the 'thank you' page.
> > > >
> > > > "Assaf" <at@isp.com> wrote in message
> > > > news:ut**************@TK2MSFTNGP11.phx.gbl...
> > > > > Hi all,
> > > > >
> > > > > My client is using an online service provider that processes
survey
> > > > > responses.
> > > > >
> > > > > After a user fills survey.aspx and presses the OK button, 2

things
> > need
> > > to
> > > > > happen:
> > > > > 1. the data has to be posted behind the scenes to the

provider's URL
> > > > (e.g.,
> > > > >
> > > >
> > >
> >
>

http://www.surveyprocessingprovider....eld2=response2) > > > > > 2. the user has to be redirected to thankyou.aspx.
> > > > >
> > > > > Has anyone done anything like that? Any idea how to make that > happen?
> > > > >
> > > > > TIA.
> > > > >
> > > > > - Assaf
> > > > >
> > > > > (apologizing for double-post)
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Nov 18 '05 #11
glad to help.

"Assaf" <at@isp.com> wrote in message
news:e3*************@tk2msftngp13.phx.gbl...
Webclient works perfectly!

Thanks.

- Assaf

"CJ Taylor" <[cege] at [tavayn] dit commmmm> wrote in message
news:eZ**************@TK2MSFTNGP11.phx.gbl...
Use a WebClient object you can post that way and wait for the response and
then redirect.

System.Net.Webclient is what your looking for.


"Assaf" <at@isp.com> wrote in message
news:%2****************@TK2MSFTNGP11.phx.gbl...
Marina,

The wrinkle is that the DB is owned by a provider somewhere out on the
internet. The only interaction I have with the database is by posting to
a url, can't use any DB access (ADO.NET, ODBC...).

Any suggestions?

- Assaf

"Marina" <so*****@nospam.com> wrote in message
news:eN****************@tk2msftngp13.phx.gbl...
> Why do you need to double post?
>
> Clicking the button goes to the server, and the event for that
button runs.
> The event handler first updates the database with the users's data,

then > does a Response.Redirect to the 'thank you' page.
>
> "Assaf" <at@isp.com> wrote in message
> news:ut**************@TK2MSFTNGP11.phx.gbl...
> > Hi all,
> >
> > My client is using an online service provider that processes survey > > responses.
> >
> > After a user fills survey.aspx and presses the OK button, 2 things

need
to
> > happen:
> > 1. the data has to be posted behind the scenes to the provider's URL > (e.g.,
> >
>

http://www.surveyprocessingprovider....eld2=response2)
> > 2. the user has to be redirected to thankyou.aspx.
> >
> > Has anyone done anything like that? Any idea how to make that happen? > >
> > TIA.
> >
> > - Assaf
> >
> > (apologizing for double-post)
> >
> >
> >
>
>



Nov 18 '05 #12
Here's some code I use to post a credit card transaction, which returns to
the caller. You can then redirect to thankyou:
Private Function viaKlixPostTransaction(ByVal trans As
viaKlixTransaction) As String
modErr.EnterFunction("OrderForm.aspx.vb.viaKlixPos tTransaction")
Dim sbldr As New StringBuilder
Dim params As NameValueCollection = trans.GetValues
Dim iEnum As IEnumerator = params.Keys.GetEnumerator

' Build the request string from the parameters
Do While iEnum.MoveNext
Dim sKey As String = iEnum.Current
If Not params.Item(sKey) Is Nothing AndAlso
params.Item(sKey).ToString <> "" Then
sbldr.Append(sKey)
sbldr.Append("=")
sbldr.Append(Server.UrlEncode(params.Item(sKey)))
sbldr.Append("&")
End If
Loop
sbldr.Remove(sbldr.Length - 1, 1) 'Remove trailing "&"

'Post the request
Dim dataResponse As String
Dim dataBody As String = sbldr.ToString
Dim webResponse As HttpWebResponse
Dim webRequestStream As System.IO.Stream
Dim webRequest As HttpWebRequest
Dim responseStream As Stream

' Create the RequestStream
Try
webRequest =
webRequest.Create("https://www2.viaklix.com/process.asp")

' Note - "KeepAlive = False" seems to be needed to avoid errors,
apparently caused by the client
' (this application) thinking the connection is being
maintained while the server or
' firewall may disconnect it. Apparently, if the client
doesn't maintain it, it will know
' enough to re-establish it when it needs it.
webRequest.KeepAlive = False

webRequest.Method = "POST"
webRequest.ContentType = "application/x-www-form-urlencoded"

' Create request body
webRequest.ContentLength = dataBody.Length
webRequestStream = webRequest.GetRequestStream()
Catch ex As Exception
modErr.WriteLog("Creating RequestStream: " & ex.ToString, 0)
End Try

' Write the WebRequest
Try
Dim writer As New StreamWriter(webRequestStream)
writer.Write(dataBody)
'TODO - writer.close can probably go into a Finally block...
Try 'Getting an exception on this shouldn't stop us...
writer.Close() 'Closes the StreamWriter and the underlying
stream
Catch ex As Exception
modErr.WriteLog("Writer.Close: " & ex.ToString, 0)
End Try

Catch ex As Exception ' Catches error on writer.write
modErr.WriteLog(ex.ToString, 0)
modErr.WriteLog(dataBody, 1) 'Looking for data dependency
modErr.ExitFunction()
Return Nothing

End Try

' Get the response from viaKlix
Try
webResponse = webRequest.GetResponse()
responseStream = webResponse.GetResponseStream()

Dim readStream As New System.IO.StreamReader(responseStream)
dataResponse = readStream.ReadToEnd

readStream.Close() 'Closes the StreamReader and the underlying
stream

modErr.ExitFunction()
Return dataResponse

Catch ex As Exception
modErr.WriteLog("Reading Response: " & ex.ToString, 0)
modErr.ExitFunction()
Return Nothing
End Try

End Function
"Assaf" <at@isp.com> wrote in message
news:ut**************@TK2MSFTNGP11.phx.gbl...
Hi all,

My client is using an online service provider that processes survey
responses.

After a user fills survey.aspx and presses the OK button, 2 things need to
happen:
1. the data has to be posted behind the scenes to the provider's URL (e.g., http://www.surveyprocessingprovider....eld2=response2) 2. the user has to be redirected to thankyou.aspx.

Has anyone done anything like that? Any idea how to make that happen?

TIA.

- Assaf

(apologizing for double-post)

Nov 18 '05 #13

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

Similar topics

22
by: bq | last post by:
Hello, Two questions related to floating point support: What C compilers for the wintel (MS Windows + x86) platform are C99 compliant as far as <math.h> and <tgmath.h> are concerned? What...
12
by: Assaf | last post by:
Hi all, My client is using an online service provider that processes survey responses. After a user fills survey.aspx and presses the OK button, 2 things need to happen: 1. the data has to...
7
by: theyas | last post by:
How can I get my code to NOT display two "Open/Save/Cancel/More Info" dialog boxes when using the "Response.WriteFile" method to download a file to IE I've asked about this before and didn't get a...
12
by: Zero | last post by:
Hi everybody, i want to write a small program, which shows me the biggest and smallest number in dependance of the data type. For int the command could be: ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.