How to Update Database Table after AjaxFileUpload ASP.NET
<p>The file is uploading to the corresponding path but table (fileinfo) is not updating..
How to achieve the table updation after a file is being uploaded to the server</p>

<pre><code>     protected void UploadComplete(Object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)

    {

    string str = RadioButton1.Text;
    string path = Server.MapPath("~/" + str +"/") + e.FileName;

    AjaxFileUpload1.SaveAs(path);
    SqlConnection con = new SqlConnection("Data Source=localhost\\sqlexpress; Initial Catalog=example;user ID=sa;password=*******;");
    con.Open();        
    string command1 = "insert into fileinfo(fileid,filename,date1) values(@fileid,@filename,@date1)";
    SqlCommand command = new SqlCommand(command1, con);
    command.Parameters.AddWithValue("@fileid", "101");
    command.Parameters.AddWithValue("@filename", e.FileName);
    command.Parameters.AddWithValue("@date1", DateTime.Now);
    command.ExecuteNonQuery();
    }
</code></pre>
