web 2.0

ASP.NET(vb.net) & Upload file (HTMLInputFile)

ASP.NET(vb.net) & Upload file (HTMLInputFile) - The in this tutorial, you’ll learn and example scripts how to Upload file (HTMLInputFile) using by ASP.NET scripts.

ShotDev Focus:
- ASP.NET(vb.net) & Upload file (HTMLInputFile)

Example

AspNetHTMLInputFile.aspx

<%@ Page Language="VB" %>
<script runat="server">
Sub btnUpload_OnClick(sender As Object, e As EventArgs)
Dim myUpoad As HttpPostedFile = Request.Files("myFile1")
If myUpoad.FileName <> "" Then
Dim strFileName = System.IO.Path.GetFileName(myUpoad.FileName)
myUpoad.SaveAs(Server.MapPath("Myfiles/" & strFileName))
Me.lblText.Text = strFileName & " Uploaded.<br>"
End If
End Sub

</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form id="form1" runat="server" enctype="multipart/form-data">
<input name="myFile1" type="file">
<input id="btnUpload" type="button" OnServerClick="btnUpload_OnClick"  value="Upload" runat="server" />
<hr />
<asp:Label id="lblText" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & Upload file (HTMLInputFile)

.
.
.
Download this script.
Download

1 Star2 Stars3 Stars4 Stars5 Stars6 Stars7 Stars8 Stars9 Stars10 Stars (No Ratings Yet)
Loading ... Loading ...

Leave a Reply

You must be logged in to post a comment.