web 2.0

ASP.NET(vb.net) & FileUpload - asp:FileUpload

ASP.NET(vb.net) & FileUpload - asp:FileUpload - asp:FileUpload : Creates input FileUpload server control that is offered through ASP.NET 2.0.

ShotDev Focus:
- ASP.NET(vb.net) & FileUpload - asp:FileUpload

ASP.NET(vb.net) & FileUpload - asp:FileUpload

Tag Control :

<asp:FileUpload id="FileUpload1"
AutoPostBack="True|False"
runat="server"/>

Example

FileUpload.aspx

<%@ Page Language="VB" %>
<script runat="server">

Sub btnSubmit_Click(sender As Object, e As EventArgs)
If Me.fiUpload.HasFile Then
Me.fiUpload.SaveAs(Server.MapPath("Myfiles/"&fiUpload.FileName))
Me.lblText1.Text = "File Name: " & fiUpload.PostedFile.FileName
Me.lblText2.Text = "File Size: " & fiUpload.PostedFile.ContentLength
Me.lblText3.Text = "File Type: " & fiUpload.PostedFile.ContentType
End IF
End Sub

</script>
<html>
<head>
<title>ShotDev.Com Tutorial</title>
</head>
<body>
<form runat="server">
<asp:FileUpload id="fiUpload" runat="server"></asp:FileUpload>
<asp:Button id="btnSubmit" onclick="btnSubmit_Click" runat="server" Text="Submit"></asp:Button>
<hr />
<asp:Label id="lblText1" runat="server"></asp:Label>
<br>
<asp:Label id="lblText2" runat="server"></asp:Label>
<br>
<asp:Label id="lblText3" runat="server"></asp:Label>
</form>
</body>
</html>

Screenshot

ASP.NET(vb.net) & FileUpload - asp:FileUpload
.
.
.
Download this script.
Download

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

One Response to “ASP.NET(vb.net) & FileUpload - asp:FileUpload”

  1. 3imperceptibly…

Leave a Reply

You must be logged in to post a comment.