Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. POST to outside legacy form?

POST to outside legacy form?

Scheduled Pinned Locked Moved ASP.NET
csharpasp-nethelpquestion
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    Scott Phelps
    wrote on last edited by
    #1

    I need my asp.net app to POST some data to an outside form, I have no problem doing this "inside" the context of the page, and reading back the result, but I actually want to redirect the user completely to the outside form (which by the way is https).

    N P 2 Replies Last reply
    0
    • S Scott Phelps

      I need my asp.net app to POST some data to an outside form, I have no problem doing this "inside" the context of the page, and reading back the result, but I actually want to redirect the user completely to the outside form (which by the way is https).

      N Offline
      N Offline
      Natty Gur
      wrote on last edited by
      #2

      Scott Hi, 1)Add new Form without runat=server and set its Action attribute to new address. 2) catch the button event on the server and use Response.Redirect()

      1 Reply Last reply
      0
      • S Scott Phelps

        I need my asp.net app to POST some data to an outside form, I have no problem doing this "inside" the context of the page, and reading back the result, but I actually want to redirect the user completely to the outside form (which by the way is https).

        P Offline
        P Offline
        Paul Watson
        wrote on last edited by
        #3

        Scott Phelps wrote: POST to outside legacy form? I think it is a bad idea that ASP.NET does not allow you to specify the target of FORM element anymore, I can see their point but then for when you need advanced stuff like you do it just limits us. What you can do is in the BODY ONLOAD event of your page you use JavaScript to change the ACTION attribute of the form to the legacy page you want. e.g. onload="document.frmTest.action = 'mylegacypage.asp';" Or you could let ASP.NET handle the FORM and then redirect to the other page carrying along the POST data (not that I know how to do that, I just know it can be done.)

        Paul Watson
        Bluegrass
        Cape Town, South Africa

        brianwelsch wrote: I find my day goes by more smoothly if I never question other peoples fantasies. My own disturb me enough.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups