Tutorials
Resources
Forum
Reviews
Communities
Interview
Jobs
Projects
Training
Your
Ad
Here
Silverlight Games
|
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Polls
|
Revenue Sharing
|
Lobby
|
Gift Shop
|
Prizes & Awards
My Profile
Sign In
Register
AdSense Revenue
Active Members
Today
Asheej T K
(191)
Alwyn
(165)
Avinash Mohan
(88)
Last 7 Days
Alwyn
(1087)
Asheej T K
(764)
Avinash Mohan
(551)
more...
Resources
»
Code Snippets
»
ASP.NET WebForms
»
Uploading Files in VB
Posted Date: 11 Oct 2009
Resource Type:
Code Snippets
Category:
ASP.NET WebForms
Author:
hemant
Member Level:
Bronze
Rating:
Points
: 5
<%@ Page Language="VB" %>
<%@ Import Namespace="System.IO" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
Sub UploadFile(ByVal s As Object, ByVal e As EventArgs)
If fileUpload.HasFile Then
Dim fileName As String = fileUpload.FileName
fileUpload.SaveAs(MapPath(fileName))
label.Text = "File " & fileName & " uploaded."
Else
label.Text = "No file uploaded!"
End If
End Sub
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>
File Upload
</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="fileUpload" runat="server" />
<asp:Button ID="uploadButton" runat="server" Text="Upload!"
OnClick="UploadFile" />
<br />
<asp:Label ID="label" runat="server"></asp:Label>
</div>
</form>
</body>
</html>
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
to add tags.
File upload
.
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Flying text
Previous Resource:
Simple Encrypt and Decrypt string using Securestring
Return to Discussion Resource Index
Post New Resource
Category:
ASP.NET WebForms
Post resources and
earn money
!
More Resources
Flying text
Copying Rows from One Datatable to Other
Getting Data From Excel to DataSet in Asp.Net C#
Sorting datatable - VBScript
Highlight Particular days in calendar using asp.net:
Create Controls at runtime
dotNet Slackers
About Us
Contact Us
Privacy Policy
Terms Of Use