-
22-08-2009, 16:51 #1
new member
- Join Date
- Aug 2009
- Posts
- 7
Stuck - trying to upload a file via my website!
Hi,
Was wondering if anyone could help me, i have recently made a website and wanted to put a section on it with a button that would allow users to click it and upload a file which would then get sent to an email address.
Most of the files will be word documents. If have built most of the site by cutting and pasting code from templates but i cant find any basic html code to use...would be great if someone could help, as you can probably tell im totally new to this!
J
-
23-08-2009, 04:06 #2
I am sure that there are many among us who would be able to get a code for you. You will not be able to upload a file in plain HTML though, you will need a script in back end that will have the upload function in it. Normally it would be either in PHP or CGI on Linux but if you have a Windows account then the option will extend to ASP and .NET as well.
Martin
Chief R & D Officer.
Windows 100% Uptime Hosting - Windows Dedicated Server - Web Hosting Tutorials
-
03-12-2009, 15:17 #3
new member
- Join Date
- Aug 2009
- Posts
- 7
Hello!
I took some time off from finishing my website and now i am back on it with a little more experience under my belt. I have managed to finish one website using pure HTML just to learn the basics and am now working on my next project using ASP.net and CSS.
My website is built using a masterpage and is coming together nicely design-wise. Being new to asp i am now stuck...my website is going to be used for recruitment so ideally i want to have the ability to put a button which allows candidate to click, browse and then upload a CV. If i am being really picky i would like this CV to be emailled to me directly instead of taking up space on my server.
I have found some code people have written but cant get my head around how i add it to my site. If anyone can help it would be much appreciated!
Cheers.
-
03-12-2009, 19:29 #4
Hi,
Here are few links on achieving this in ASP.Net:
http://www.4guysfromrolla.com/articles/072606-1.aspx
Download link : http://aspnet.4guysfromrolla.com/code/EmailDemos.zip
http://www.stardeveloper.com/articles/display.html?article=2002022802&page=1
Download link : http://www.stardeveloper.com/downloads/zip/0032.zip
http://www.aspheute.com/english/20000918.asp
Download link : http://www.aspheute.com/Code/20000918.zip
And here using PHP : http://www.html-form-guide.com/email-form/php-email-form-attachment.html
Download link : http://www.html-form-guide.com/email-form/php-email-form-attachment.zip
Please let us know if you need any further assistance
Rock _a.k.a._ Jack
Windows Hosting || Windows Reseller Hosting
Cloud Hosting || Powerful Dedicated Servers
Follow eUKhost on Twitter || Join eUKhost Community on Facebook
For complaints, grievances or suggestions kindly email our FeedBack Dept.
Proper action will be taken accordingly & instantaneously!
-
03-12-2009, 20:25 #5
new member
- Join Date
- Aug 2009
- Posts
- 7
Thank you so much for coming back to me so soon! I think i have over-estimated my skill here, so far i have managed to get by with copy/paste and falling back on taking ALOT of time to read through, change a little bit, work out what i destroyed, fix etc. Looking at the links you supplied (thanks again) i really think i may be in over my head.
My master page now includes some basic logic for the menus so that the 'active' tab is shown, previously i had a piece of code in each web form...managed to find someone elses code in a template and adapt it. However, with this particular function i am getting no where fast!
This website has pretty much the functionality i am trying to duplicate - amoriabond.com /register_cv.asp ..ideally with the CV being sent to an address of my choosing. (had to put spaces in, wont let me post a link until i have 5 posts)
Working some more on this tonight, any tips/help much appreciated!
Thanks for reading.
-
03-12-2009, 23:00 #6
You're welcome.. Jack Sparrow [I'm a fan of that name
]..
Have a look at this link : AspEmail.com - User Manual Chapter 3: Attachments
You need to understand the mechanism behind the working of the contact form, ie: the upload file part as an attachment & then send it on the mentioned email address & then display the next page [thank-you one].
Once you get to that, the other part remains is the designing one, colours, styles, templates.. etc can be done quite quickly
Good luck..
Rock _a.k.a._ Jack
Windows Hosting || Windows Reseller Hosting
Cloud Hosting || Powerful Dedicated Servers
Follow eUKhost on Twitter || Join eUKhost Community on Facebook
For complaints, grievances or suggestions kindly email our FeedBack Dept.
Proper action will be taken accordingly & instantaneously!
-
04-12-2009, 15:53 #7
new member
- Join Date
- Aug 2009
- Posts
- 7
With lots of help i have finally managed to get it to work!!
Im still no entirely sure how
but it works as follows:
Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)
If IsPostBack Then
email(New Net.Mail.MailAddress("xxxxxxxxxxx@xxxxxxxxx"), New Net.Mail.MailAddress("xxxxxx@xxxxxxxxx"), "New Attachment", "File from Website", FileUpload1.FileContent)
Response.Redirect(Request.Path)
End If
End Sub
Sub email(ByVal mailto As Net.Mail.MailAddress, ByVal mailfrom As Net.Mail.MailAddress, ByVal htmlbody As String, ByVal subject As String, ByVal filestream As IO.Stream)
Dim message As New Net.Mail.MailMessage(mailfrom, mailto)
message.IsBodyHtml = True
message.Subject = subject
message.Body = htmlbody
message.Attachments.Add(New Net.Mail.Attachment(filestream, "name"))
Dim client As New Net.Mail.SmtpClient()
client.Send(message)
End Sub
This works well, now i need to work out how to limit the sending to word files only!
I have a new problem now...my site has a list of jobs 'hot jobs' down the right hand side, with a short bit of info about each job and the option to 'read more'. When a user clicks a link i want the full job spec to come up with the CV upload box at the bottom if they wish to apply they can use it and im sure i will be able to work out how to get the email to contain the title of the job.
My problem is...do i need to make a new page for every job? I dont have database hosting...should i get it? The traffic coming through my site will be pretty low, and i will be posting roughly 10 new jobs a week. I would be happy if only the 20 most recent positions are online.
I would also like to make the jobs searchable...should i just give up doing that now or is that pretty easy to do?
Thanks again for all of your help, apologies if this is a little mundane for you!
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)


LinkBack URL
About LinkBacks



Reply With Quote



You here anything back about the banner on the right ? Tis driving me nuts having nothing but white...
Anyone else having issues on the...