FileUpload error message

Posted on 2009-04-19
Last Modified: 2012-06-21
I am using visual web developer 2008 express edition and I am trying to configure a file upload. I am also using the AJAX Control Toolkit.
I get this error message:

Compiler Error Message: BC30451: Name 'inputFileUpload' is not declared.
Source Error:
Line 16:             If inputFileUpload.HasFile Then
Line 17:                 fileName = inputFileUpload.FileName
Line 18:                 inputFileUpload.SaveAs(strPath + fileName)

Partial Class _Default

    Inherits System.Web.UI.Page


    Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click


        Dim strPath As String = Server.MapPath("uploads\")

        Dim fileName As String


            If inputFileUpload.HasFile Then

                fileName = inputFileUpload.FileName

                inputFileUpload.SaveAs(strPath + fileName)

                lblMsg.Text = "File uploaded!"

           File Name:" & fileName


                lblMsg.Text = "You did not upload anything!"

            End If

        Catch ex As Exception

            lblMsg.Text = ex.ToString

        End Try

    End Sub


    End Sub

End Class

Open in new window

Question by:pbtech
    LVL 13

    Accepted Solution

    refers to this
    if you are using fileupload  control  inside ajax update panel
    LVL 14

    Expert Comment

    Please post the Aspx declarations.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    This article discusses the ASP.NET AJAX ModalPopupExtender control. In this article we will show how to use the ModalPopupExtender control, how to display/show/call the ASP.NET AJAX ModalPopupExtender control from javascript, how to show/display/cal…
    In this Article, I will provide a few tips in problem and solution manner. Opening an ASPX page in Visual studio 2003 is very slow. To make it fast, please do follow below steps:   Open the Solution/Project. Right click the ASPX file to b…
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

    759 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    13 Experts available now in Live!

    Get 1:1 Help Now