ASpx to ASPx server control posting

Discussion in 'ASP .Net' started by =?Utf-8?B?Um9iIFNob3JuZXk=?=, Sep 29, 2004.

  1. Hi,

    How do I post the data from webform1.asp to webform2.aspx

    In classic asp you can use the request.form but when I do this in webform2 I
    get nothing.

    --
    Regards

    Rob
     
    =?Utf-8?B?Um9iIFNob3JuZXk=?=, Sep 29, 2004
    #1
    1. Advertising

  2. hi rob ,

    maybe you can try not posting but putting your objects into the session and
    call them from the other page.
    for a better alternative you can try inheriting your web pages from the same
    base class which has a protected method that reads/write into your variables
    into the session.



    "Rob Shorney" <> wrote in message
    news:...
    > Hi,
    >
    > How do I post the data from webform1.asp to webform2.aspx
    >
    > In classic asp you can use the request.form but when I do this in webform2

    I
    > get nothing.
    >
    > --
    > Regards
    >
    > Rob
     
    Ersin Gençtürk, Sep 29, 2004
    #2
    1. Advertising

  3. Hi Rob,

    Forget about classic ASP. Except for the environment, everything is
    different in ASP.Net. A WebForm is a form that posts back to itself. This is
    the ASP.Net paradigm. There are other ways to pass data from one WebForm to
    another, almost all of them on the Server Side. You can use Server.Transfer,
    and pass the entire HttpContext and present Page class to another WebForm.
    You can generate an HTTP POST WebRequest. You can put a second form on a
    Page, and use that to POST to the second WebForm. And several other
    techniques, all of which are useful depending upon the situation.

    If you treat ASP.Net like ASP (you CAN, but you SHOULD not), you will derive
    no benefits from it. Learn the new paradigm, and leave the old behind. Once
    you get used to it, you'll never want to look back again.

    --
    HTH,
    Kevin Spencer
    ..Net Developer
    Microsoft MVP
    I get paid good money to
    solve puzzles for a living

    "Rob Shorney" <> wrote in message
    news:...
    > Hi,
    >
    > How do I post the data from webform1.asp to webform2.aspx
    >
    > In classic asp you can use the request.form but when I do this in webform2

    I
    > get nothing.
    >
    > --
    > Regards
    >
    > Rob
     
    Kevin Spencer, Sep 29, 2004
    #3
  4. =?Utf-8?B?Um9iIFNob3JuZXk=?=

    Shiva Guest

    Hi,

    Assuming I understood the question correctly, in ASP.NET 1.x, you cannot
    post back to a different page, but to the same one (resursive posting). Even
    if you explictly specify a different form in the <form> tag, it will be
    ignored.

    HTH.

    "Rob Shorney" <> wrote in message
    news:...
    Hi,

    How do I post the data from webform1.asp to webform2.aspx

    In classic asp you can use the request.form but when I do this in webform2 I
    get nothing.

    --
    Regards

    Rob
     
    Shiva, Sep 29, 2004
    #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. Magnus

    posting to another aspx page

    Magnus, Jul 3, 2003, in forum: ASP .Net
    Replies:
    5
    Views:
    512
    Natty Gur
    Jul 3, 2003
  2. Matthew Louden
    Replies:
    1
    Views:
    7,114
    Scott M.
    Oct 11, 2003
  3. alanb
    Replies:
    2
    Views:
    577
    alanb
    Apr 23, 2004
  4. =?Utf-8?B?RGFubnk=?=
    Replies:
    1
    Views:
    1,156
    Joerg Jooss
    Dec 3, 2005
  5. AmitKu
    Replies:
    7
    Views:
    586
    John Timney \(MVP\)
    Jan 8, 2007
Loading...

Share This Page