Click here to Skip to main content
13,195,379 members (65,488 online)
Rate this:
Please Sign up or sign in to vote.
See more:
I am trying to do paging and following is the code for page 2:

if (this.PreviousPage != null)
TextBox TextBox1 = (TextBox)this.PreviousPage.FindControl("TextBox1");
Calendar Calendar1 = (Calendar)this.PreviousPage.FindControl("Calendar1");
Label1.Text = Convert.ToString("Hello {0}!!!! u have selected date as {1}" + TextBox1.Text.Trim() + Calendar1.SelectedDate);

it does not display the label text and also if i try remove the if() then it gives the error "Object reference not set to an instance of an object."
Please help
Posted 1-Jan-13 17:57pm

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

Cross paging is retarded. Don't use it. Make both pages controls hosted on the same page. As it stands, you're clearly not doing it right, based on code you did not show us.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web03 | 2.8.171019.1 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100