how to upload a file to aspx page using fileupload Control?
<pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.Master"
    CodeBehind="Mortgageclient.aspx.cs" Inherits="MortgageSaver._Default" %&gt;

protected void btnfupload_Click(object sender, EventArgs e)
        {


            try
            {
                if (FileUpload1.HasFile)
                {
                    if (!Directory.Exists(Server.MapPath("Documents")))
                    {
                        Directory.CreateDirectory(MapPath("Documents"));

                    }
                    string docment = FileUpload1.PostedFile.FileName;
                    string path = System.IO.Path.GetFileName(docment);
                    FileUpload1.PostedFile.SaveAs(Server.MapPath("Documents/") + path);
                    lblstatus.ForeColor = System.Drawing.Color.Red;
                    lblstatus.Text = "Selected File has been Uploaded...";
                }
            }
            catch
            {
                lblstatus.ForeColor = System.Drawing.Color.Red;
                lblstatus.Text = "Selected File has not been Uploaded...";
            }
    }
</code></pre>

<p>This is my code to upload a file,but it selecting a file from dialogue box but when i click the UploadFile button it displaying "Selected File has not been Uploaded."and if i could run this page individually i is working,but i'm using it in tabpanel as above,so in this case it is not working.</p>
