Print Page | Close Window

Uploading Images Using ASP.Net/VB.Net

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: ASP.NET Discussion
Forum Description: Discussion and chat on ASP.NET related topics.
URL: https://forums.webwiz.net/forum_posts.asp?TID=16612
Printed Date: 28 March 2026 at 5:59pm
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Uploading Images Using ASP.Net/VB.Net
Posted By: Misty
Subject: Uploading Images Using ASP.Net/VB.Net
Date Posted: 19 September 2005 at 2:47pm
I would like to know how you can upload images to a web site using ASP.Net. I'd like to add the file name of the image to the SQL Server DB. I'd like to learn about different options in ASP.Net using VB.Net. I've seen some tutorials on uploading images, but I am not interested in using a binary datatype. AdvertiserImage is just a varchar datatype. I'd like for it to stay that way. I also don't want to use Codebehind. Can someone please help me with the code for ASP.Net?

I'd like for the ASP.Net page to only allow .jpg or .gif files to be uploaded. I also would like to limit the size of the file to 50 KB.

I used ASP SmartUpload for an ASP Classic web application. Is it possible to use SmartUpload in ASP.Net or not?

Here's some parts of my code for the Classic ASP page:
 
I used ASP SmartUpload for an ASP Classic web application.

Here's some parts of my code for the Classic ASP page:

Here's some parts of my code for the Classic ASP page:

 

Code:

 

'  Variables

 

'  *********

 

   Dim mySmartUpload

 

   Dim file

 

 

 

 

 

 

     dim rs, connectionString, databaseName, path

 

     dim strSQL, IDNumber

 

     dim NextPage, intCount

 

     dim fic, FileName

 

     

 

              

 

       

 

'  Object creation

 

'  ***************

 

   Set mySmartUpload = Server.CreateObject("aspSmartUpload.SmartUpload")

 

 

 

   intCount=0 'initialize the counter

 

 

 

   'component creation

 

   Set mySmartUpload= Server.CreateObject("aspSmartUpload.SmartUpload")

 




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net