Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 10th, 2004, 08:05 PM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default Input type="file" PostedFile Prob Easy Ques

Hello
This is the first time using <input id="fupload" type="file" runat="server"> with ASP.NET in VB.Net

I have one browse button to pick the file to upload and another button to upload.

<asp:button id="btnUpload" runat="server" Text="Upload Image"></asp:button>

When I click browse, i can select a file that I want but when I click Upload button, fupload.PostedFile value is nothing.


 Private Sub btnUpload_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnUpload.Click

        If fupload.PostedFile Is Nothing Then
            lblError.Text = "No file received"
        Else
            lblTest.Text = fupload.PostedFile.FileName.ToString
        End If
End Sub

I get "No file received".

What is wrong. I can't figure it out.



 
Old September 11th, 2004, 03:41 AM
Friend of Wrox
 
Join Date: Jun 2004
Posts: 245
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Figured it out
Form should not be set to GET or POST






Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy hyperlink ques with iframe bekim Javascript How-To 4 September 21st, 2005 02:45 AM
Easy Ques -- Datetime validation for Access bekim Access 2 June 16th, 2005 01:52 PM
<input type="File"> - Specify File Type and Path gp_mk Classic ASP Basics 2 August 2nd, 2004 03:07 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.