Visual Studio .NET - Folder browser control in asp.net C#

Asked By Shreya Trivedi on 01-Aug-08 03:11 AM
I want to save a file in the client's computer on the location specified by the user. For that, I want to use a control similar to SaveFileDialog control in Windows Application which displays all the folders on client machine. Is there any control resembling SaveFileDialog control in Asp.Net? How can I implement this functionality in Asp.Net C#?

use input type control

Web Star replied to Shreya Trivedi on 01-Aug-08 03:22 AM

<FORM NAME="oForm"
   ACTION="repost.asp"
   ENCTYPE="multipart/form-data"
   METHOD="post">
<INPUT TYPE="file" NAME="oFile1"/>
<INPUT TYPE="submit" VALUE="Upload File">
</FORM>

see this link for details

http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx

Use this...

Atul Shinde replied to Shreya Trivedi on 01-Aug-08 03:36 AM

<FORM NAME="oForm"
   ACTION="repost.asp"
   ENCTYPE="multipart/form-data"
   METHOD="post">
<INPUT TYPE="file" NAME="oFile1"/>
<INPUT TYPE="submit" VALUE="Upload File">
</FORM>

see this link for details

http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx

See this detail

Sagar P replied to Shreya Trivedi on 01-Aug-08 04:21 AM

Try somethig  like this;

string applicationPath = System.Web.HttpContext.Current.Request.ApplicationPath;
applicationPath = System.Web.HttpContext.Current.Server.MapPath(applicationPath);
applicationPath += @"\";

string loadFile = applicationPath + "Word-filename-here.doc";

this.Response.ClearContent();
this.Response.ClearHeaders();
this.Response.ContentType = "application/msword";
this.Response.WriteFile(loadFile);
this.Response.Flush();
this.Response.Close();

GO thr these links also;

http://forums.asp.net/p/978886/1247167.aspx

http://msdn.microsoft.com/en-us/library/ms535263(VS.85).aspx

http://www.vbforums.com/showthread.php?t=527848

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2638756&SiteID=1

http://www.velocityreviews.com/forums/t121503-save-file-dialog.html

Best Luck!!!!!!!!!!!!!!!!!!!!!
Sujit.

Folder Browse Dialog TO Save the file
Sunil Supale replied to Shreya Trivedi on 01-Aug-08 10:07 AM
Write the javascript function as i shown below.
and call that on button click.
 
<script language="javascript" type="text/javascript">
function showDialog()
{
document.execCommand("SaveAs", true, null);
}
</script>

to call on button.
<input type="button" onClick="showDialog()">

When u click on the button it will show u that save Dialog Box. and then u can select the location where u want to save the file.
save file
ajay choudhary replied to Shreya Trivedi on 02-Aug-08 03:24 AM
  <form id="form1" runat="server">
    <div>
        <asp:FileUpload ID="FileUpload1" runat="server" Style="position: static" /></div>
    </form>