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
        Try
            If inputFileUpload.HasFile Then
                fileName = inputFileUpload.FileName
                inputFileUpload.SaveAs(strPath + fileName)
                lblMsg.Text = "File uploaded!"
           File Name:" & fileName
            Else
                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

pbtechAsked:
Who is Participating?
 
sm394Connect With a Mentor Commented:
refers to this http://geekswithblogs.net/ranganh/archive/2008/04/01/file-upload-in-updatepanel-asp.net-ajax.aspx
if you are using asp.net fileupload  control  inside ajax update panel
0
 
GiftsonDJohnCommented:
Please post the Aspx declarations.
0
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.