Click here to Skip to main content
11,924,825 members (55,668 online)
Rate this:
Please Sign up or sign in to vote.
See more: C#
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 18: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 | Mobile
Web01 | 2.8.151125.3 | Last Updated 2 Jan 2013
Copyright © CodeProject, 1999-2015
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