Can any one help in solving this ?
I have a MVC web page, and a button in it. Now on the button click event i need to open file explorer window.
Thanks
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
Vinay SinghRank #604 · 4K reputationPosted Jun 22, 2016, 10:30 PM EDT
San34 reputationPosted Jun 23, 2016, 12:48 AM EDT
Karthik ElumalaiRank #544 · 4.5K reputationPosted Jun 23, 2016, 12:55 AM EDT
form id="form1" runat="server"> asp:FileUpload id="FileUploadControl" runat="server" /> asp:Button runat="server" id="UploadButton" text="Upload" onclick="UploadButton_Click" /> br />br /> asp:Label runat="server" id="StatusLabel" text="Upload status: " /> form>protected void UploadButton_Click(object sender, EventArgs e) { if(FileUploadControl.HasFile) { try { string filename = Path.GetFileName(FileUploadControl.FileName); FileUploadControl.SaveAs(Server.MapPath("~/") + filename); StatusLabel.Text = "Upload status: File uploaded!"; } catch(Exception ex) { StatusLabel.Text = "Upload status: The file could not be uploaded. The following error occured: " + ex.Message; } } }