Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6211127
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T06:16:59+00:00 2026-05-24T06:16:59+00:00

<%@ Page Language=C# AutoEventWireup=true MasterPageFile=~/MasterPage.Master CodeBehind=Mortgageclient.aspx.cs Inherits=MortgageSaver._Default %> protected void btnfupload_Click(object sender, EventArgs e)

  • 0
<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/MasterPage.Master"
    CodeBehind="Mortgageclient.aspx.cs" Inherits="MortgageSaver._Default" %>

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...";
            }
    }

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.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T06:17:01+00:00Added an answer on May 24, 2026 at 6:17 am

    FileUpload control cannot be used with asynchronous postbacks. see this page, scroll all the way down to “Using Web Parts Controls Inside UpdatePanel Controls” section. Alternative solution is “AsyncFileUpload” from Ajax tool kit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the next aspx page: <%@ Page Title= Language=C# MasterPageFile=~/MasterPage.Master AutoEventWireup=true CodeBehind=newsEditor.aspx.cs Inherits=ExpertSiteV2.newsEditor
Trying to create a simple form: <%@ Page Language=C# AutoEventWireup=true CodeBehind=register.aspx.cs Inherits=AlphaPack._Default MasterPageFile=MasterPages/Main.master title=Hi
<%@ Page Title= Language=C# MasterPageFile=~/Masterpages/main.Master AutoEventWireup=true Inherits=KPIGen.admin.Data_Parameter_List Codebehind=Data_Paramater_List.aspx.cs %> <%@ MasterType VirtualPath=~/Masterpages/main.Master %> <%@
I have the following dropdownlist: <%@ Page Title= Language=C# MasterPageFile=~/myMasterPage.master AutoEventWireup=true CodeFile=testdropdown.aspx.cs Inherits=testdropdown %>
master1.master HTML <asp:Image ID=First runat=server /> tow.aspx <%@ Page Language=C# MasterPageFile=~/master1.master AutoEventWireup=true CodeFile=two.aspx.cs Inherits=ControlPanelPP
On the base.master: <%@ Master Language=C# AutoEventWireup=true CodeBehind=Base.master.cs Inherits=WebApplicationControlTest.Base %> <!DOCTYPE html PUBLIC -//W3C//DTD
I have the following Hierarchy: MainMasterPage: <%@ Master Language=C# AutoEventWireup=true CodeBehind=MainAdmin.master.cs Inherits=MyWebsite.Admin.MainAdmin %> <form
I have a simple asp.net-Page with a button. <%@ Page Language=C# AutoEventWireup=true CodeFile=Default2.aspx.cs Inherits=Default2
i have a master page, then i create a GridViewWithTextBoxes.aspx with selection of masterpage
I have the list box control (ASP.NET Control On aspx page, language C# ).

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.