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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top