Form Posting?

Discussion in 'ASP .Net' started by Adam Knight, Oct 5, 2005.

  1. Adam Knight

    Adam Knight Guest

    Hi all,

    I have a form that i want to benefit from aspx functionality (ie: viewstate,
    validation).
    However for the posting of the form, i want to simply transfer execution to
    another script.

    Server.Transfer("myScript.aspx")

    Because i am using .net i can't use the action attribute (it appears) in a
    form and simply post that form by
    clicking a submit. Instead .net appears to require issuing a post back.

    This said, it seems a little strange to have an onClick Server event issuing
    the Server.Transfer.
    It would add another page request wouldn't it. First the post back.. then
    the transfer?

    Am i missing something here?

    Adam
    Adam Knight, Oct 5, 2005
    #1
    1. Advertising

  2. Adam Knight

    Patirck Ige Guest

    Adam sorry i didn't reply to your post then..
    I reside in Melbourne and you.
    Patrick


    "Adam Knight" <> wrote in message
    news:...
    > Hi all,
    >
    > I have a form that i want to benefit from aspx functionality (ie:

    viewstate,
    > validation).
    > However for the posting of the form, i want to simply transfer execution

    to
    > another script.
    >
    > Server.Transfer("myScript.aspx")
    >
    > Because i am using .net i can't use the action attribute (it appears) in a
    > form and simply post that form by
    > clicking a submit. Instead .net appears to require issuing a post back.
    >
    > This said, it seems a little strange to have an onClick Server event

    issuing
    > the Server.Transfer.
    > It would add another page request wouldn't it. First the post back.. then
    > the transfer?
    >
    > Am i missing something here?
    >
    > Adam
    >
    >
    >
    Patirck Ige, Oct 5, 2005
    #2
    1. Advertising

  3. Adam Knight

    Scott Allen Guest

    No, a Response.Redirect would make another round trip to the client
    and back. A Server.Transfer stays on the server side. One drawback is
    that the client's browser won't know about the transfer and will still
    think the current web form is the URL it posted to.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/

    On Wed, 5 Oct 2005 12:11:28 +1000, "Adam Knight"
    <> wrote:

    >Hi all,
    >
    >I have a form that i want to benefit from aspx functionality (ie: viewstate,
    >validation).
    >However for the posting of the form, i want to simply transfer execution to
    >another script.
    >
    >Server.Transfer("myScript.aspx")
    >
    >Because i am using .net i can't use the action attribute (it appears) in a
    >form and simply post that form by
    >clicking a submit. Instead .net appears to require issuing a post back.
    >
    >This said, it seems a little strange to have an onClick Server event issuing
    >the Server.Transfer.
    >It would add another page request wouldn't it. First the post back.. then
    >the transfer?
    >
    >Am i missing something here?
    >
    >Adam
    >
    >
    Scott Allen, Oct 5, 2005
    #3
  4. Adam Knight

    Adam Knight Guest

    Sunshine Coast...QLD.

    "Patirck Ige" <> wrote in message
    news:...
    > Adam sorry i didn't reply to your post then..
    > I reside in Melbourne and you.
    > Patrick
    >
    >
    > "Adam Knight" <> wrote in message
    > news:...
    >> Hi all,
    >>
    >> I have a form that i want to benefit from aspx functionality (ie:

    > viewstate,
    >> validation).
    >> However for the posting of the form, i want to simply transfer execution

    > to
    >> another script.
    >>
    >> Server.Transfer("myScript.aspx")
    >>
    >> Because i am using .net i can't use the action attribute (it appears) in
    >> a
    >> form and simply post that form by
    >> clicking a submit. Instead .net appears to require issuing a post back.
    >>
    >> This said, it seems a little strange to have an onClick Server event

    > issuing
    >> the Server.Transfer.
    >> It would add another page request wouldn't it. First the post back.. then
    >> the transfer?
    >>
    >> Am i missing something here?
    >>
    >> Adam
    >>
    >>
    >>

    >
    >
    Adam Knight, Oct 5, 2005
    #4
    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. Jeff Baker

    WebClient form Posting with form name?

    Jeff Baker, Aug 28, 2003, in forum: ASP .Net
    Replies:
    2
    Views:
    736
    John Saunders
    Aug 29, 2003
  2. alanb
    Replies:
    2
    Views:
    517
    alanb
    Apr 23, 2004
  3. Rob Meade
    Replies:
    0
    Views:
    418
    Rob Meade
    Dec 1, 2004
  4. AmitKu
    Replies:
    7
    Views:
    482
    John Timney \(MVP\)
    Jan 8, 2007
  5. Replies:
    3
    Views:
    646
Loading...

Share This Page