Posting html form to another domain from page

Posted on 2005-04-08
Last Modified: 2012-05-05
I'm trying to have a login page on 1 new site (an site) that sends the username, password and a hidden field to another website that will carry out a login procedure.
I have made an html form outside of the rest of the normal form area (see below).  When the submit button is pressed the browser moves to the correct page but doesn't take the variables with it.

The receiving page is on an NT server, not running .net and it is a pure asp environment.
To look for the variables on the receiving page I have stripped everthying out apart from the following code:

For Each ServerVariable In Request.ServerVariables
Response.Write "<BR>" & "" & ServerVariable & ": " & Request.ServerVariables(ServerVariable) & ""
response.write "P=" & request("txtPassword")
response.write "<BR>U=" & request("txtName")

I'm a bit concerned that either  I've missed something incredibly dumb or this will never work because of something to do with .net .
I currently do a similiar login process from 1 doamin to another where the sending page is pure asp.

Hope someone can help....
Andrew form section
<div id="logIn">
<form id="frm_logon" name="frm_logon" action="" method="post" >
      <asp:label id="lblLoginTitle" runat="server">Professional users log in here:</asp:label><br>
      <asp:label id="lblUsername" runat="server">Username</asp:label>&nbsp;<INPUT class="textfieldSmall" id="txtName" type="text" size="5">
      <asp:label id="lblPassword" runat="server">Password</asp:label>&nbsp;<INPUT class="textfieldSmall" id="txtPassword" type="password" size="5">
      <input type="hidden" name="dom_country" value="uk">
      <INPUT class="textfieldSmall" id="btnLogin" type="submit" value="Login">

<form id="Form1" method="post" runat="server">

rest of asp page...
Question by:andrewh123
    LVL 7

    Expert Comment




    which will transfer all form variabels to next page.

    whre you can retrive it like


    hope this helps.

    LVL 1

    Author Comment

    Hi ayha- thanks for this but (and I'm sorry if this wasn't clear in the question), the page I'm posting to is on another domain.  If I use server.transfer:


     to the other domain I get the following error:

    Invalid path for child request ''. A virtual path is expected

    LVL 20

    Accepted Solution

    Like the hidden input control you also need to give name to each text input control, like this

    <INPUT class="textfieldSmall" id="txtName" name="txtName" type="text" size="5">
    <INPUT class="textfieldSmall" id="txtPassword" name="txtPassword" type="password" size="5">
    LVL 1

    Author Comment

    I knew it would be soemthing dumb - d'oh.

    Thanks a lot for spotting this - it was driving me mad, everything works fine now.


    Featured Post

    Find Ransomware Secrets With All-Source Analysis

    Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

    Join & Write a Comment

    I recently went through the process of creating a Calendar Control of events with the basis of using a database to keep track of the dates that are selectable, one requirement was to have the selected date pop-up in a simple lightbox.  At first this…
    IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    745 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now