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...
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
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?
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