View Single Post
  #5 (permalink)  
Old July 5th, 2009, 07:01 AM
tomche tomche is offline
Authorized User
Points: 221, Level: 4
Points: 221, Level: 4 Points: 221, Level: 4 Points: 221, Level: 4
Activity: 2%
Activity: 2% Activity: 2% Activity: 2%
 
Join Date: Apr 2009
Posts: 50
Thanks: 0
Thanked 0 Times in 0 Posts
Default object reference not set to instance of an object

Imar,
I did everything that you suggested including copying and pasting the code and I still get the same problem.

The only thing that I saw that in the database explorer the picture table as you correctly identified was "id" not "Id".

So I changed it to Id after I copied and pasted the source code.

When I first wrote to you I included a small piece of code which is as follows
PhotoAlbum myPhotoAlbum = (PhotoAlbum)e.Result;
Line 17: Response.Redirect(string.Format("ManagePhotoAlbum. aspx?PhotoAlbumId=(0)",
Line 18: myPhotoAlbum.id.ToString()));


The name of the file ManagephotoAlbum is spelt correctly so I am wondering
what the significance of the PhotoAlbumId=(0)",

code is? I cannot see a PhotoAlbumId variable in the database. What does =(0) mean?

I hope this is of help

Thanks

Thomas

Line 19: }
Reply With Quote