If you are trying to convert it to an image - and I can't think of anything else you'd want to convert it to - then try this:
MemoryStream ms = new MemoryStream(imagebytes);
Image returnImage = Image.FromStream(ms);
But...you need to move your definitions about anyway: imagesbytes is out of scope where you are trying to use it.
Try this:
Image userImage = null;
if (fpPhoto.HasFile)
{
if (fpPhoto.PostedFile.ContentType == "image/jpg" ||
fpPhoto.PostedFile.ContentType == "image/jpeg" ||
fpPhoto.PostedFile.ContentType == "image/png")
{
userImage = Image.FromStream(fpPhoto.PostedFile.InputStream);
}
}
User objUser = new User();
objUser.UserName_Pk = txtUserName.Text;
objUser.Password = txtPassword.Text;
objUser.MobileNo = txtMobileNo.Text;
objUser.Email = txtEmail.Text;
objUser.SecurityAnswer = txtAnswer.Text;
objUser.Photo = userImage;
objUserBll.InsertUpdate(objUser);