473,396 Members | 1,760 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

PreviousPage, posting forms

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 '07 #1
1 1322
KJ
I think there is the previouspagetype attribute that you have to add
to your @ Page directive

On May 3, 3:21 pm, "jeroen.bo...@gmail.com" <jeroen.bo...@gmail.com>
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.

May 3 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alan Silver | last post by:
Hello, I'm doing a cross page post, and want to pick up information from the previous page. The problem is that the previous page contains a user control that is loaded into a Placeholder at run...
3
by: Kel Good | last post by:
I'm wondering if the PreviousPage property is only populated when a page is cross posted on the same server, or will this work in a web farm situation. Thanks. Kel
1
by: michael.neel | last post by:
Here is the setup: I have an SQL driven sitemap provider - when the user clicks on a database generated link - /Site/DBPages/Article1.aspx - a handler does a Server.Transfer -...
2
by: PeterKellner | last post by:
Is there something extra I need to do to make intellisense work when referencing a page class? Here is my working Page_Load from a aspx page. sourcePage does not get it's members listed with...
0
by: Jim McGivney | last post by:
I am trying to use the PreviousPage feature in asp.net 2.0 On the source (previous page) I have: protected void Page_Load(object sender, EventArgs e) { ..... Code to populate ArrMH //ArrMH is...
1
by: Jim McGivney | last post by:
I have been trying to get the values from a previous page on my target page. I have followed the help article:...
4
by: Bryce | last post by:
I have a search page that submits to a search results page. I have set the search results page to be authenticated, so when the user first tries to search, it redirects them to a login screen. When...
2
by: David C | last post by:
Will the Page.PreviousPage be able to read controls from a non-aspx page, e.g. an html page? Is there a better way to get info. from textboxes/controls? Thanks. David
10
by: rjvrnjn | last post by:
I'm trying to pass a variable value from one page to another. Of all the ways that are available, I like the PreviousPage.FindControl() one as it lets me access the previous page controls and get the...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.