hi,
try to give following format.,
<code>if (FileUpload1.postedfile.contentlength>0)
{
string path = Server.Mappath(@"~/images/"+'"+FileUpload1.Filename+"')
FileUpload1.SaveAs(path);
//now save the path value to your database.
string query = "insert into Products(CategoryID,ProductName,ProductImage,UnitCost,Description)select CategoryID,'" + txtproname.Text + "','" + path + "'," + txtproprice.Text + ",'" + txtprodesc.Text + "' from Categories where CategoryName='" + DropDownList1.Text + "'";
}
else
{
messagebox("file content length is zero");
}</code>
i hope this is useful to you...
take care