Hello everybody,

I want to transfer gridview cells values from one page to another. Here I used query string but to shock its working for some fields and for other fields(gridview cell values) its not working.

The page which has gridview I used this syntax:

Public ReadOnly Property email() As String
Get
Return GridView1.SelectedRow.Cells(3).Text
End Get
End Property

The page where i want to use those values I used this syntax

lblemail.Text = Request.QueryString("email").ToString

Error: Object reference not set to an instance of an object

Thanks for your help..

mani-hellboy commented: post your response +0

Recommended Answers

All 3 Replies

hi..

this error can be caused when u attempt to hold some data and insert into table or to next page .. when u catch that exception debug it in run time and find which control is empty or null and work for that particular cell or column control ..

hope this would help you..

hi..

this error can be caused when u attempt to hold some data and insert into table or to next page .. when u catch that exception debug it in run time and find which control is empty or null and work for that particular cell or column control ..

hope this would help you..

yeah its from null or empty value, but my gridview cells has values. Why i'm gettin this error.

thanks ...

hi..

can you explain more about your task..are you selecting a full row from gridview ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.