Go Back   CodingForums.com > :: Server side development > ASP.NET

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-05-2013, 07:13 PM   PM User | #1
BlackReef
Regular Coder

 
Join Date: Apr 2010
Posts: 188
Thanks: 96
Thanked 1 Time in 1 Post
BlackReef is an unknown quantity at this point
Upload files in contact form.

I have a basic .aspx form that sends an email to us once submitted (no database).

How difficult would it be to give the user a upload image ability on this form, and then have the image sent in the email as an attachment?

Thanks!
J
BlackReef is offline   Reply With Quote
Old 03-06-2013, 06:16 PM   PM User | #2
DanInMa
Senior Coder

 
DanInMa's Avatar
 
Join Date: Nov 2010
Location: Salem,Ma
Posts: 1,307
Thanks: 12
Thanked 204 Times in 204 Posts
DanInMa is on a distinguished road
Ohh right, you wanted to just do it as an attachment. Sorry I thought you wanted to embed the image into the email itself. OK, so you will defintely need to add a fileuploadcontrol and process it in your code behind to handle the file.

Ok, I found a much better tutorial that applies,

http://www.codeproject.com/Articles/...-NET-using-SMT
__________________
- Firebug is a web developers best friend! - Learn it, Love it, use it!
- Validate your code! - JQ/JS troubleshooting
- Using jQuery with Other Libraries - Jslint for Jquery/other JS library users
DanInMa is offline   Reply With Quote
Old 03-10-2013, 05:30 AM   PM User | #3
mscit
New to the CF scene

 
Join Date: Mar 2013
Location: India
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
mscit is an unknown quantity at this point
i have no idea about this topic so please explain any one have an idea
mscit is offline   Reply With Quote
Old 04-04-2013, 02:29 PM   PM User | #4
annaharris
New Coder

 
Join Date: May 2012
Location: USA
Posts: 90
Thanks: 0
Thanked 6 Times in 6 Posts
annaharris is an unknown quantity at this point
Regarding Uploading Files

Below I have mentioned a link that will help you in embedding an image in mail body and send it to the recipient. http://code.msdn.microsoft.com/CSSMTPSendEmail-c241f55d
annaharris is online now   Reply With Quote
Old 04-06-2013, 10:04 AM   PM User | #5
livetecshosting
New Coder

 
Join Date: Jul 2012
Location: Bug Tracking, Isssue Tracking
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
livetecshosting is an unknown quantity at this point
I would recommend this tutorial for using ASP.net file upload control
http://www.tutorialspoint.com/asp.ne..._uploading.htm
livetecshosting is offline   Reply With Quote
Old 05-03-2013, 02:02 PM   PM User | #6
annaharris
New Coder

 
Join Date: May 2012
Location: USA
Posts: 90
Thanks: 0
Thanked 6 Times in 6 Posts
annaharris is an unknown quantity at this point
I checked your code and it looks fine, but is it possible to upload more than one file using this code ?
annaharris is online now   Reply With Quote
Old 05-04-2013, 01:29 PM   PM User | #7
annaharris
New Coder

 
Join Date: May 2012
Location: USA
Posts: 90
Thanks: 0
Thanked 6 Times in 6 Posts
annaharris is an unknown quantity at this point
The link that I shared earlier provides the solution to upload more than one image in your email message.
annaharris is online now   Reply With Quote
Old 05-06-2013, 01:55 PM   PM User | #8
annaharris
New Coder

 
Join Date: May 2012
Location: USA
Posts: 90
Thanks: 0
Thanked 6 Times in 6 Posts
annaharris is an unknown quantity at this point
The link that I shared earlier provides the solution to upload more than one image in your email message.
annaharris is online now   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 01:55 PM.


Advertisement
Log in to turn off these ads.