Logo
  
asp.net hosting | DotNet Hosting | eCommerce Hosting | SQL Server Hosting | ADO DotNet | ASP DotNet | DotNet Tutorials 
  
         
 

Your domain available ?
www.

BUY NOW
ASPNET 4New
ASPNET 3.5
ASPNET 2.0
SQL SERVER 2008 HOSTING
SQL SERVER 2005 HOSTING
GET LISTED IN GOOGLE
30 DAY MONEY BACK
OUR PARTNERS
ASP NET TUTORIALS
WEB DESIGN TEMPLATES
TERMS
PRESS ROOM
CONTACT US




 

 

ASP.NET 2.0 FileUpload

« ASP.NET 2.0 Tutorials Index

You can use the FileUpload control to upload files to your hosting server. Please ensure the folder where you are uploading the file to has write permissions.

Code:

<html>
<head>

<script language="VB" runat="server">

Sub Button1_Click(sender As Object, e As EventArgs)

if FileUpLoad1.HasFile
'Uncomment this line to Save the uploaded file
'FileUpLoad1.SaveAs("C:\SomePhysicalPath" & FileUpLoad1.Filename)
Label1.Text = "Received " & FileUpLoad1.FileName & " Content Type " & FileUpLoad1.PostedFile.ContentType & " Length " & FileUpLoad1.PostedFile.ContentLength
else
Label1.Text = "No uploaded file"
end if

end sub

</script>

</head>
<body>

<h3><font face="Verdana">File Upload</font></h3>

<form runat=server>

<asp:FileUpLoad id="FileUpLoad1" AlternateText="You cannot upload files" runat="server" />
<asp:Button id="Button1" Text="Upload" OnClick="Button1_Click" runat="server" />
<asp:Label id="Label1" runat="server" />
</form>

</body>
</html>

Author: Roger Bert
Outsource-Solutions.co.uk

 

 

 

 

 

  asp.net 2.0 sql server 2005


Terms   Privacy

Copyright ©2002-2011 DotNet We Hosting UK, All rights reserved