Results 1 to 7 of 7
  1. #1
    JackSparrow is offline new member
    Join Date
    Aug 2009
    Posts
    7

    Smile 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

  2. #2
    eUK-Martin's Avatar
    eUK-Martin is offline Windows System Administrator
    Join Date
    Nov 2005
    Location
    Earth
    Posts
    629

    Default

    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.

  3. #3
    JackSparrow is offline new member
    Join Date
    Aug 2009
    Posts
    7

    Default

    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.

  4. #4
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by JackSparrow View Post
    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.
    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 100% UPTIME! || 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!

  5. #5
    JackSparrow is offline new member
    Join Date
    Aug 2009
    Posts
    7

    Default

    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.

  6. #6
    Rock's Avatar
    Rock is offline Technical Support (eUKhost.com)
    Join Date
    Oct 2006
    Location
    localhost
    Posts
    3,375

    Smile

    Quote Originally Posted by JackSparrow View Post
    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.
    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 100% UPTIME! || 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!

  7. #7
    JackSparrow is offline new member
    Join Date
    Aug 2009
    Posts
    7

    Default

    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)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •