PreviousPage, posting forms

Discussion in 'ASP .Net' started by jeroen.bolle@gmail.com, May 3, 2007.

  1. Guest

    I'm trying to pass variables between pages using the post method. I
    have access to the the page where I've posted my form, but all the
    objects are empty...

    An extract of the code:

    If Not (Page.PreviousPage Is Nothing) Then
    Label1.Text = "Form sent"
    If Not (Page.IsCrossPagePostBack) Then
    If IsNothing(PreviousPage.FindControl("txtVertrek"))
    Then
    Label1.Text &= ". Object = null"
    End If
    End If
    Else
    Label1.Text = "Form not sent"
    End If

    I'm not sure what I'm doing wrong, some googling just confirmed my
    code.
    , May 3, 2007
    #1
    1. Advertising

  2. KJ Guest

    I think there is the previouspagetype attribute that you have to add
    to your @ Page directive

    On May 3, 3:21 pm, "" <>
    wrote:
    > I'm trying to pass variables between pages using the post method. I
    > have access to the the page where I've posted my form, but all the
    > objects are empty...
    >
    > An extract of the code:
    >
    > If Not (Page.PreviousPage Is Nothing) Then
    > Label1.Text = "Form sent"
    > If Not (Page.IsCrossPagePostBack) Then
    > If IsNothing(PreviousPage.FindControl("txtVertrek"))
    > Then
    > Label1.Text &= ". Object = null"
    > End If
    > End If
    > Else
    > Label1.Text = "Form not sent"
    > End If
    >
    > I'm not sure what I'm doing wrong, some googling just confirmed my
    > code.
    KJ, May 3, 2007
    #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. Alan Silver

    How to get info from PreviousPage

    Alan Silver, Feb 27, 2006, in forum: ASP .Net
    Replies:
    4
    Views:
    2,198
    Alan Silver
    Feb 28, 2006
  2. Kel Good

    PreviousPage property and web farms

    Kel Good, Feb 28, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    717
    Steven Cheng[MSFT]
    Mar 1, 2006
  3. Replies:
    1
    Views:
    2,998
  4. PeterKellner
    Replies:
    2
    Views:
    601
    PeterKellner
    May 15, 2006
  5. Jim McGivney

    PreviousPage

    Jim McGivney, Jun 4, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    734
    Jim McGivney
    Jun 4, 2006
Loading...

Share This Page