if (Session["image"] != null)
{
ImageButton1.ImageUrl = "~/IMAGE/pic.jpg?" + DateTime.Now.Ticks.ToString();
}
The session key image is from another aspx page
{
string strPhoto = Request.Form["imageData"]; //Get the image from flash file
byte[] photo = Convert.FromBase64String(strPhoto);
FileStream fs = new FileStream(Server.MapPath("~/IMAGE/pic.jpg"), FileMode.OpenOrCreate, FileAccess.ReadWrite);
BinaryWriter br = new BinaryWriter(fs);
br.Write(photo);
br.Flush();
br.Close();
Session["image"] = fs;
fs.Close();
}
cmd = new SqlCommand("Insert_Customer", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@CustFirstName", TextBox1.Text);
cmd.Parameters.AddWithValue("@CustLastName", TextBox3.Text);
cmd.Parameters.AddWithValue("@CustMiddleName", TextBox2.Text);
cmd.Parameters.AddWithValue("@CustAddressline1", TextBox8.Text);
cmd.Parameters.AddWithValue("@CustAddressLine2", TextBox9.Text);
cmd.Parameters.AddWithValue("@Phone", TextBox23.Text);
cmd.Parameters.AddWithValue("@CityID", DropDownList2.SelectedIndex);
cmd.Parameters.AddWithValue("@Center_ID", Session["Center_Id"]);
cmd.Parameters.AddWithValue("@CutomerEmail", TextBox21.Text);
cmd.Parameters.AddWithValue("@gender", gender);
cmd.Parameters.AddWithValue("@Image", Server.MapPath("~/IMAGE/pic.jpg"));
con.Open();
cmd.ExecuteNonQuery();
The issue is
Operand type clash: nvarchar is incompatible with image.how to solve?
please help me out...i would be very grateful to this forum