change image path for upload control dynamically
<p>I am working in ASP.NET and C#.</p>

<p>I have an <code>Fileupload</code> control in my application. I want to change the storage path (on the hard disk) of the image during the upload. How do I go about it.</p>

<p>C# code:</p>

<pre><code>     string filename = Path.GetFileName(fileuploadimages.PostedFile.FileName);
    //Save images into Images folder
    fileuploadimages.SaveAs(Server.MapPath("**~/database/**" + filename));
    //Getting dbconnection from web.config connectionstring
    SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["constr"].ToString());
    //Open the database connection
    con.Open();
    //Query to insert images path and name into database
    SqlCommand cmd = new SqlCommand("Insert into tblImageupload1(Imagename,Imagepath) values(@ImageName,@ImagePath)", con);
    //Passing parameters to query
    cmd.Parameters.AddWithValue("@Imagename", filename);
    cmd.Parameters.AddWithValue("@Imagepath", "../Database/" + filename);
    //cmd.Parameters.Add("@price");
    cmd.ExecuteNonQuery();
    //Close dbconnection
    con.Close();
</code></pre>

<p><strong>Note</strong>: I want to change the path <code>~/database/</code> dynamically during upload.</p>
