Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
Password Reminder
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old June 23rd, 2011, 06:27 AM
Registered User
Join Date: May 2006
Location: Lichfield, , United Kingdom.
Posts: 4
Thanks: 1
Thanked 0 Times in 0 Posts
Default Adding Text to Image Uploaded to Folder

I am uploading images to a folder using asp FileUpload which works fine. But I need to add associated text with the file. So when downloaded say in a DataList it relates to the image. Ideally, I would like to upload more than a single entry. I have searched the obvious sites but can’t resolve the problem. Is it possible?

My upload VB code below.

Sub upAdd_Click(ByVal sender As Object, ByVal e As EventArgs) 
If (FileUpload1.HasFile) Then 
If (CheckFileType(FoleUpload1.FileName)) Then 
Dim filePath As String = "~/images/" & FileUpload1.FileName 

End If 
End If 

End Sub 

Function CheckFileType(ByVal fileName As String) As Boolean 
Dim ext As String = Path.GetExtension(fileName) 
Select Case ext.ToLower() 
Case ".gif" 
Return True 
Case ".png" 
Return True 
Case ".jpg" 
Return True 
Case ".jpeg" 
Return True 
Case ".pdf" 
Return True 
Case ".doc" 
Return True 
Case ".xls" 
Return True 
Case Else 
lblError.Text = "Invalid File Extension" 
Return False 
End Select 

End Function

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete image from Folder phuc2583 ASP.NET 3.5 Professionals 2 May 31st, 2010 10:20 PM
Convert Text(Sql Server Text Field) to Image(JPG) srinivas72 ADO.NET 2 February 13th, 2009 06:31 PM
How to save an image in a folder using c#.net2005 aneesh_sunu@yahoo.co.in C# 2005 1 October 31st, 2006 10:42 AM
Viewing uploaded .txt/.doc/image file ramesh055 ASP.NET 1.0 and 1.1 Professional 1 October 12th, 2006 02:07 PM

All times are GMT -4. The time now is 08:27 AM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.