0

I am taking the the GridView row count in session and then displaying the session value to a label.

I am displaying it in the master page but it is not executing its throwing this error

Object reference not set to an instance of an object.

Can anyone help me?

My Code:

Session["Count"] = GridView1.Rows.Count.ToString();
Label1.Text = Session["Count"].ToString();
Aria
  • 3,313
  • 1
  • 16
  • 46

0 Answers0