Click here to Skip to main content
15,888,968 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I have a .asp page contains an AjaxFileUpload control and a text box as follows:
ASP.NET
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Test_AjaxUpload.aspx.cs" Inherits="Test_AjaxUpload" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">

        <div>
            <asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                <ContentTemplate>
                    <asp:AjaxFileUpload ID="AjaxFileUpload1" runat="server" AllowedFileTypes="jpg,jpeg"
                        MaximumNumberOfFiles="10" OnUploadComplete="AjaxFileUpload1_UploadComplete" />
                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                </ContentTemplate>
            </asp:UpdatePanel>
        </div>
    </form>
</body>
</html>


and this is my code behind:
C#
protected void Page_Load(object sender, EventArgs e)
    {
       
    }
    protected void AjaxFileUpload1_UploadComplete(object sender, AjaxFileUploadEventArgs e)
    {
        TextBox1.Text = e.FileName;
    }


I have exception after Page_Load event:
AjaxFileUpload.cs not found .. I don't know the meaning of this exception and how to find this file.cs ? I've googled this question but i couldn't find any clear answer or even an article .. Thanks in advance
Posted

1 solution

How did you reference the AJAX DLL? Look at this post and follow the instructions in the second answer. That should help (if done correctly):

http://forums.asp.net/t/1826027.aspx/1[^]
 
Share this answer
 
Comments
Hend Riad 4-Aug-13 8:42am    
Thanks for your reply, but I found this page before and i followed the mentioned steps but it's not working

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900