Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.0 and 1.1 Professional
|
ASP.NET 1.0 and 1.1 Professional For advanced ASP.NET 1.x coders. Beginning-level questions will be redirected to other forums. NOT for "classic" ASP 3 or the newer ASP.NET 2.0 and 3.5
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.0 and 1.1 Professional section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old March 26th, 2007, 08:17 AM
Authorized User
 
Join Date: Mar 2007
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default how to browse a file from computer for attachment?

hello friends!!!

how can we browse a file for attachment with mail from the local machine??
is there any special command or control for that??
i can attach the file with mail by giving the path of that file, but i want to browse it as like yahoo or another mail service provider.

What can be the code for that browse commandbutton??

hopping positively....
bye bye..:)

 
Old March 26th, 2007, 08:22 AM
Wrox Author
 
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

When using System.Web.Mail you can only attach files that reside on the local server. If you have an interface similar to Gmail, Yahoo, etc when the user clicks the "Attach" button this should be a FileUpload control where they can select files from their local machine.

When the user presses 'Send' the file should be uploaded to the server, attached to the email, the email should be sent, and the file that was uploaded should be deleted.

hth.

================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Technical Editor for: Professional Search Engine Optimization with ASP.NET
http://www.wiley.com/WileyCDA/WileyT...470131470.html
================================================== =========
Why can't Programmers, program??
http://www.codinghorror.com/blog/archives/000781.html
================================================== =========
 
Old March 26th, 2007, 08:47 AM
Friend of Wrox
 
Join Date: Aug 2004
Posts: 550
Thanks: 0
Thanked 1 Time in 1 Post
Default

I would like to add that the control to browse files from local machine can be used from HTML as below:

<input type="file" runat="server" id="flUpload">

Regards
Mike

Fortune favours the brave, so don't regret on missed oppurtunities.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Using a file browse dialog box gaurisharya Beginning VB 6 4 April 30th, 2008 12:43 AM
To browse a file from client system Indraja ASP.NET 2.0 Basics 2 May 3rd, 2007 07:56 AM
Browse File mgnishan PHP How-To 2 March 23rd, 2007 01:54 PM
Browse to File Control? Aaron Edwards Access 3 September 13th, 2005 01:05 AM
Browse Computer Directory redasp ASP.NET 1.0 and 1.1 Professional 3 April 6th, 2005 08:03 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.