Oct 07, 2016 01:21 PM|saurav gautam|LINK
There is a gridview on my aspx page. The gridview data are obtained from XMLDataSource.
The third column of my gridview will contain image path. I will be using the path to display image on image-button.
img = GridView1.SelectedRow.Cells.ToString();
ImageButton1.ImageUrl = img;
If I put the above codes on page-load event, I receive following error
Object reference not set to an instance of an object.
Which means the gridview data haven't been loaded. What event can I use so that the codes can be run immediately after the data are loaded on the gridview.?