[Last Call] Learn how to a build a cloud-first strategyRegister Now


FileUpload error message

Posted on 2009-04-19
Medium Priority
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

sm394 earned 2000 total points
ID: 24180850
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
LVL 14

Expert Comment

ID: 24182781
Please post the Aspx declarations.

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In .NET 2.0, Microsoft introduced the Web Site.  This was the default way to create a web Project in Visual Studio 2005.  In Visual Studio 2008, the Web Application has been restored as the default web Project in Visual Studio/.NET 3.x The Web Si…
WHY MVC is the future technology... As many of you know, MVC is Model,View,Controller pattern. Model View Controller pattern was invented in a Smalltalk context at Xerox in late 1970s. Why is this buzz about MVC: --------------------------- …
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

830 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