Results 1 to 4 of 4

Thread: Adding Attachments Through Coding A Button

  1. #1

    Thread Starter
    Member
    Join Date
    Dec 2004
    Posts
    49

    Question Adding Attachments Through Coding A Button

    Hi,

    May I know if I'm able to code a button to allow user to open a dialog to browse/locate a file on the user's machine and send it as an attachment, if so, can anyone be kind enough to share the code?

    What I'm trying to achieve is like the file control. For file control, i'll have to type
    <input type = file blah blah>

    Is there a way to code for this function? I don't wish to use the control is because i can't change the color of the button and textfield to the one my web is adopting. Thanks alot...
    ______________________________________

    Warmest Regards,

    Lex
    ______________________________________



    :|: Don't Mess With The Predator :|:

  2. #2
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Adding Attachments Through Coding A Button

    What you are talking about is file uploading. This is very easy with ASP.NET see http://www.4guysfromrolla.com/webtech/091201-1.shtml.

    HTH

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

  3. #3

    Thread Starter
    Member
    Join Date
    Dec 2004
    Posts
    49

    Re: Adding Attachments Through Coding A Button

    Hi,

    Yea, that's what i intend to do, but I wish to code the button myself because i'm able to change the color of the Browse button. Is there any way to do that?
    ______________________________________

    Warmest Regards,

    Lex
    ______________________________________



    :|: Don't Mess With The Predator :|:

  4. #4
    Frenzied Member dj4uk's Avatar
    Join Date
    Aug 2002
    Location
    Birmingham, UK Lobotomies: 3
    Posts
    1,131

    Re: Adding Attachments Through Coding A Button

    No you have to use the HTML file input control - all ASP.NET does is generate HTML code so you are limited by the HTML standards.

    The colour of the browse button can be changed using CSS but from memory I think this only works with Internet Explorer.

    DJ

    If I have been helpful please rate my post. If I haven't tell me!

Posting Permissions

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



Click Here to Expand Forum to Full Width