Re: Post to offsite page from the middle of a server-side form: impossible?

Discussion in 'ASP .Net' started by Rick Spiewak, Jul 16, 2003.

  1. Rick Spiewak

    Rick Spiewak Guest

    Instead of a form, use server controls, including a button, and construct
    the request yourself in the click event.

    "Mike Bridge" <> wrote in message
    news:...
    > I've seen hundreds of posts here about posting without using postback,
    > but no solutions to this problem:
    >
    > Each page of a site I'm creating has a FORM RUNAT="SERVER" at the top,
    > and a closing FORM tag at the end, and asp.net controls occur anywhere
    > within that page.
    >
    > Right smack in the middle of the page, I need to place a small form
    > which posts some information to an offsite server. As far as I can
    > tell, this is impossible with asp.net. Nested forms are illegal, and
    > using the client side form tags still don't override the server-side
    > form. I thought of doing a "Server.Transfer()", but that only works
    > with local URLs. I need to have asp.net controls on both sides of the
    > nested form, so I can't end the server-side form tag before the nested
    > form tag starts.
    >
    > Is there a technique to work around this?
    >
    > Thanks,
    >
    > -Mike
    Rick Spiewak, Jul 16, 2003
    #1
    1. Advertising

  2. Rick Spiewak

    Rick Spiewak Guest

    Or, write the form out with an HTMLWriter. I'm doing this, putting the code
    in the Render routine (which passes the HTMLWriter in). Still trying to
    figure out how to get the output into the <body> section, though! It seems
    to render OK, but depending on whether I put it before or after
    mybase.render, I get my form either before or after the <html> document.

    "Rick Spiewak" <> wrote in message
    news:...
    > Instead of a form, use server controls, including a button, and construct
    > the request yourself in the click event.
    >
    > "Mike Bridge" <> wrote in message
    > news:...
    > > I've seen hundreds of posts here about posting without using postback,
    > > but no solutions to this problem:
    > >
    > > Each page of a site I'm creating has a FORM RUNAT="SERVER" at the top,
    > > and a closing FORM tag at the end, and asp.net controls occur anywhere
    > > within that page.
    > >
    > > Right smack in the middle of the page, I need to place a small form
    > > which posts some information to an offsite server. As far as I can
    > > tell, this is impossible with asp.net. Nested forms are illegal, and
    > > using the client side form tags still don't override the server-side
    > > form. I thought of doing a "Server.Transfer()", but that only works
    > > with local URLs. I need to have asp.net controls on both sides of the
    > > nested form, so I can't end the server-side form tag before the nested
    > > form tag starts.
    > >
    > > Is there a technique to work around this?
    > >
    > > Thanks,
    > >
    > > -Mike

    >
    >
    Rick Spiewak, Jul 22, 2003
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jenny
    Replies:
    2
    Views:
    652
  2. Guest
    Replies:
    2
    Views:
    329
    Guest
    Dec 26, 2006
  3. Replies:
    0
    Views:
    111
  4. Marcel Brekelmans
    Replies:
    4
    Views:
    137
    Joe Fawcett
    Jan 26, 2004
  5. Replies:
    5
    Views:
    248
    Michele Dondi
    Jun 30, 2006
Loading...

Share This Page