|
-
Dec 18th, 2002, 04:59 PM
#1
Thread Starter
New Member
File Upload applet in Karl Moore's VB.net Tutorial
I am trying to get the file upload application described on pages 284-285 in Karl Moore's Visual Basic.Net The Tutorials to work.
At first I was getting the error message: The base class included the filed Form1 but its type (System.WebUI.HtmlControl.HtmlInputFile is not compatible with the type of control (System.Web.UI.HtmlControls.Htmlform.
I finally fixed that and now I'm getting:
Object variable or With block variable not set.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.NullReferenceException: Object variable or With block variable not set.
Source Error:
Line 21: 'Put user code to initialize the page here
Line 22: Dim NameOfFieldFieldElement
Line 23: NameOfFieldFieldElement.Posted.SaveAs(MyFile.PostedFIle.FileName)
Line 24: End Sub
The HTML in webform.aspx is:
<form id="Form1" method="post" encTYpe="multipart/form-data" runat="server">
<INPUT id="filename1" style="Z-INDEX: 101; LEFT: 8px; POSITION: absolute; TOP: 8px" type="file" name="filename1" runat="server">
</form>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|