Upload with .net

  • Thread starter Thread starter SOS
  • Start date Start date
S

SOS

Hi guys ,
i use of this code to upload files using ASP.Net :

aspx code :
<INPUT id="File1" type="File" runat="server">

code behind :
File1.PostedFile.SaveAs(Server.MapPath("File.ext"))


but i get this error :
object refrence not set to instance of an object.

what can i do ?
Thanx
 
Back
Top