How To create Open File Browser in asp.Net ..?
When i click a button it open File Browser pop-up in my asp.net Web Form application ?
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Ravi PatelRank #439 · 5.7K reputationPosted Nov 9, 2015, 2:36 AM EST
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class upload : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void UploadButton_Click(object sender, EventArgs e)
{
if (FileUploader.HasFile)
try
{
FileUploader.SaveAs(Server.MapPath(DefaultFileName) +
FileUploader.FileName );
Label1.Text = "File name: " +
FileUploader.PostedFile.FileName + "
" +
FileUploader.PostedFile.ContentLength + " kb
" +
"Content type: " +
FileUploader.PostedFile.ContentType + "
Uploaded Successfully";
}
catch (Exception ex)
{
Label1.Text = "ERROR: " + ex.Message.ToString();
}
else
{
Label1.Text = "You have not specified a file.";
}
}
}
keerthi sai50 reputationPosted Nov 9, 2015, 3:11 AM EST