Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Nov 24, 2012 02:04 AM by jangraanurag
Jun 05, 2012 08:42 AM|LINK
Dear Guys, i'm puzzled by my situation. I want to upload a file or files using AjaxFileUpload and i want to filter them by file types (e.g. bmp, jpg, doc, xls). after i filter them, i want to store those files to "~/Savedfiles" and the filenames will be
saved to "Files" table. in AjaxFileUpload, there's a built in Upload button and i want to hide it, instead, i wanna use a custom button so i have the full control in saving it. The reason why i want a custom button because i want to perform another saving
tasks aside from saving external files. I'm using VS 2010 C#. if you guys have some sample code in c# on how to extract multiple file names (in case for multiple uploads), i would really appreciate it. thanks.
Jun 06, 2012 03:22 AM|LINK
Please refer this
Jun 06, 2012 07:31 AM|LINK
Please refer to the code as follow:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ajaxfileupload.aspx.cs" Inherits="ajaxfileupload" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<form id="form1" runat="server">
<asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
<asp:Label runat="server" ID="myThrobber" Style="display: none;"><img align="absmiddle" alt="" src="images/uploading.gif"/></asp:Label>
<asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server"
onuploadcomplete="AjaxFileUpload1_UploadComplete" ThrobberID="myThrobber" MaximumNumberOfFiles="10" AllowedFileTypes="jpg,jpeg"/>
public partial class ajaxfileupload : System.Web.UI.Page
protected void Page_Load(object sender, EventArgs e)
protected void AjaxFileUpload1_UploadComplete(object sender, AjaxControlToolkit.AjaxFileUploadEventArgs e)
string filePath = "~/upload/" + e.FileName;
Jun 07, 2012 05:44 AM|LINK
thanks a lot guys for your generous ideas. i really appreciate em all and it's a great help. it worked.
Nov 24, 2012 02:04 AM|LINK
I have to upload multiple files using ajax file uploader can any one plz tell me the code i have to write.............