hi all,
Here i have one image control,one fileupload control and a save button and display button.
Here i am saving the image into data base using file upload control and below is my code to save
Stream ImageStream = file1.PostedFile.InputStream;
int len = file1.PostedFile.ContentLength;
byte[] ImageContent = new byte[len];
ImageStream.Read(ImageContent, 0, len);
objMembership.Memimage = ImageContent;
the above code works when user select an image using fileupload control.
now my problem is if user don't select any image using fileupload control then i need to save a default image into data base.
and i am displaying a default image in image control every time when form is loading.....
if user doesn't select any image from fileupload i need to save that default image into data base
or how can we set default path for fileupload control.
Please help me out how to do this...

ArshadRank #2,492 · 564 reputationPosted Apr 17, 2009, 10:24 PM EDT
if(file1.hasfile==false)
{
// here you just try to get the Default Image Path, you can keep this default Imgae in the
// Project Directory.
// I will suggest you that dont Insert this Default file in the Database. while Displaying
// that Imgae, just check weather User Selected the Image or not If not just map the
// Default Image path
}
satheesh babu86 reputationPosted Apr 17, 2009, 10:39 PM EDT
Hi,
I am also thinking to map the default path or saving the default image which contains image control
But i don't know how to code for this.
Please guide me.