473,395 Members | 1,692 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,395 software developers and data experts.

Automatic HTTP POST methods

Does anyone have any ideas on how to do an automatic html form post
using hidden fields without introducing client-side script nor using a
server-side WebRequest by passing the information back up to the
browser while the base href is still set to my site. The problem I was
having with the server-side WebRequest is that the relative links of
the site I am posting to break. I could work my way around it probably
by adding a base ref in the returned html or parsing relative links
and replacing with absolute. I have seen a number of sites do a fairly
nice jump to another site while passing information via POST and was
curious if there is a really good solution to it that I am missing.

To put this in context, I am establishing a single-sign-on connection
with another site. The users will login to my site and once logged in
there is a section for them to access a partner site. This partner
site accepts user registration and login automatically by a form POST.
I need a solid solution that a) does not rely on the browsers script
interpreting (vbscript, jscript, javascript, etc) b) is cross-browser
and if possible html 4.01 compliant, and c) resolves the problem of
relative links (including links to CSSs with relative links) if doing
server-side WebRequest and passing the returned content back up to the
browser.

Thanks for any guidance.
Jul 21 '05 #1
3 2492
Hi Tim,

Although you documented it very well, I think that I do not understand your
post.

I will try to say it in my words
A user logs on to your site
You do a requesting and responsing using HttpWebResponse/HttpWebRequest to
another site
You get the information and send your page back to the user, is that
something you mean?

Cor
Does anyone have any ideas on how to do an automatic html form post
using hidden fields without introducing client-side script nor using a
server-side WebRequest by passing the information back up to the
browser while the base href is still set to my site. The problem I was
having with the server-side WebRequest is that the relative links of
the site I am posting to break. I could work my way around it probably
by adding a base ref in the returned html or parsing relative links
and replacing with absolute. I have seen a number of sites do a fairly
nice jump to another site while passing information via POST and was
curious if there is a really good solution to it that I am missing.

To put this in context, I am establishing a single-sign-on connection
with another site. The users will login to my site and once logged in
there is a section for them to access a partner site. This partner
site accepts user registration and login automatically by a form POST.
I need a solid solution that a) does not rely on the browsers script
interpreting (vbscript, jscript, javascript, etc) b) is cross-browser
and if possible html 4.01 compliant, and c) resolves the problem of
relative links (including links to CSSs with relative links) if doing
server-side WebRequest and passing the returned content back up to the
browser.

Thanks for any guidance.

Jul 21 '05 #2

In this case I am not interested in retrieving any information back from
the POST. I am trying to transfer the user from my site to the partner
site much like a redirect would work.

In general, I am trying to pass information from my site to a partner
site. If the partner site accepted information as parameters in the URL,
I could simply do a server response.redirect along with the parameters.
However, in cases where the partner site only accepts data via form POST
(like using Request.Form instead of Request.QueryString), I need a
method of passing the information automatically just like I can do with
a response.redirect.

I mentioned two basic methods. One method was to do a client-side script
which basically submits a form with hidden fields automatically. This
would be an intermediate or "jump" page. The other method was to use a
HttpWebResponse/HttpWebRequest to do a server-side POST and to pass the
response back to the browser.

The difference that I can see between the two methods is that the
client-side script would indeed transfer the user from my site to the
partner site, but the HttpWebResponse/HttpWebRequest would still keep
the user (note the address bar) on my site and I would have simply told
my server to go browse this site, return the data in the background and
then respond back to the browser with the content.

The bottom line is, I am looking for a way to have the functionality of
a response.redirect, but instead of putting parameters in the URL, I
would send them in the POST via form hidden fields. This method should
not incorporate any kind of client-side script.

Hope that is more clear.

Thanks

*** Sent via Devdex http://www.devdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 21 '05 #3
Hi Timothy,

I do not have a answer really so on my lips.

However I have looked in the newsgroup

microsoft.public.dotnet.framework.aspnet

And saw you had not asked this question there.
I will have to search while maybe there is somebody who gives you the answer
direct.

Try it there, will you not find it there, than reply it is an itresting
challenge to do.

I hope this helps,

Cor
Jul 21 '05 #4

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

Similar topics

12
by: Terry | last post by:
I'm trying to automatically submit a form to another ASP page after some <input> fields values are filled by ASP. I know I can do it using javascript, but is there a way to automatically submit...
1
by: Federico | last post by:
I want to create an automatic log system that writes to a ofstream (the logfile) all the output sent to screen. I tried to make a class COutput with the operator << overloaded for the different...
15
by: Kannan Goundan | last post by:
Maintaining a C++ header file can be painful. I want a way to automatically generate header files from the implementation file. Does anybody know of a program that does this? If not, I'd like...
12
by: Stanley | last post by:
Hi, I'd like to write a HTML page which can help me directly log in my Yahoo!mail or Gmail account without typing user name and password. Basically, I want to set up a link, click it and pop up...
5
by: Shane | last post by:
I wonder if someone has any ideas about the following. I am currently producing some reports for a manufacturing company who work with metal. A finished part can contain multiple sub-parts to...
3
by: Tim Wade | last post by:
Does anyone have any ideas on how to do an automatic html form post using hidden fields without introducing client-side script nor using a server-side WebRequest by passing the information back up...
9
by: andrewfelch | last post by:
Hello all, I'm using the metaclass trick for automatic reloading of class member functions, found at: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/160164 My problem is that if I 1)...
10
by: Victor | last post by:
hi guys. In my project, now I am using a asp.net login control and a customized membership provider to do the form authentication. Now I want some function that user can skip the login form and be...
25
by: sidd | last post by:
In the following code: int i = 5; ---it goes to .data segment int j; ---it goes to bss segment int main() { int c; int i = 5; ---stack
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

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.