Click here to Skip to main content
Rate this: bad
good
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 17:57pm

1 solution

Rate this: bad
good
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.
  Permalink  

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

  Print Answers RSS
0 CHill60 360
1 OriginalGriff 203
2 Sarvesh Kumar Gupta 168
3 RyanDev 145
4 Peter Leow 145


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