image upload in file system on server in asp.net3 using c#
<p>i am trying to upload image and store it in file system in asp.net using c#.
i am using this code </p>

<pre><code> if (FileUpload1.HasFile)
    {
        if ((FileUpload1.PostedFile.ContentType == "image/jpeg") ||
           (FileUpload1.PostedFile.ContentType == "image/png") ||
           (FileUpload1.PostedFile.ContentType == "image/tmp") ||
           (FileUpload1.PostedFile.ContentType == "image/gif"))
        {
            if (Convert.ToInt64(FileUpload1.PostedFile.ContentLength) &lt; 10000000)
            {
                string filename = Label1.Text;
                FileUpload1.SaveAs(Server.MapPath("productImage\\" + ddlproductId.Text + "\\" + filename + ".jpg"));

            }
        }
    }
</code></pre>

<p>it actually work fine in my computer but while i am uploading it on server it get some error. please help me. thanking you.</p>
