Author: shehz81 | Posted on: 7/10/2008 11:36:13 AM | Views : 862


I want to load an image in formview with ID fetched from the Membership Class. I"m using ObDataSource to fetch the image and created a tableAdpater that selects the ImageFile name.  but I keep on getting this error. any help would greatly be appreciated. Thank You!





Object reference not set to an instance of an object.

Me.ObjGetImage.InsertParameters("UserID").DefaultValue = userid (error is highlighted on this line)

The query for the table Adapter=SELECT UserID, ImagePath FROM UserProfile WHERE (UserID = @userID) 


I"m also able to view the correct userid and I don't understand why it is still throwing an exception. Here is my compete code



1 <%@ Page Language="VB" Trace="true" AutoEventWireup=Go to the complete details ...