web 2.0

ASP.NET(vb.net) & Upload file (HTMLInputFile - runat=”server”)

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

ShotDev Focus:
- ASP.NET(vb.net) & Upload file (HTMLInputFile - HTMLControl and runat=”server”)

Example

AspNetHTMLInputFileServer.aspx

<%@ Page Language="VB" %>
<script runat="server">
Sub btnUpload_OnClick(sender As Object, e As EventArgs)
If Not IsNothing(myFile1.PostedFile) Then
Dim strFileName = System.IO.Path.GetFileName(myFile1.Value)
Me.lblText1.Text = strFileName & " Uploaded."
myFile1.PostedFile.SaveAs(Server.MapPath("Myfiles/"&strFileName))
End If
End Sub

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

Screenshot

ASP.NET(vb.net) & Upload file (HTMLInputFile - HTMLControl and runat=server)

.
.
.
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.