FileUpload error message

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

Who is Participating?
sm394Connect With a Mentor Commented:
refers to this
if you are using fileupload  control  inside ajax update panel
Please post the Aspx declarations.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.