Wrox Programmer Forums
|
BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3
This is the forum to discuss the Wrox book Beginning ASP.NET 3.5: In C# and VB by Imar Spaanjaars; ISBN: 9780470187593
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 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 August 18th, 2010, 05:34 PM
Authorized User
 
Join Date: Jul 2010
Posts: 74
Thanks: 23
Thanked 0 Times in 0 Posts
Default Extention question about Page452 Try It Out

After doing this TIO, I want to store the pictures into other folder in my computer, not into the GigPics folder under the root. For example, for this TIO, all the pictures are stored "E:\BegASPNET\Site\GigPics", but I want to store the pictures into D:\MyDocuments\Pictures\BegASPNET", what should I do? And how to show the picture after I inserted the picture?

Thanks.
 
Old August 19th, 2010, 01:53 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Saving the file can be as easy as passing that path to the SaveAs method.

However, displaying is more difficult. Since the folder is not located as a sub folder of the site, the web server can't access the folder and display the files.

In IIS, you could use a Virtual Directory where you map something like /Images to a folder such as c:\Whatever\Images. This enables you to store the images outside the root of the web site. Search the IIS help for more help on setting this up.

Cheers,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old August 19th, 2010, 10:08 AM
Authorized User
 
Join Date: Jul 2010
Posts: 74
Thanks: 23
Thanked 0 Times in 0 Posts
Default

Thanks, Imar,

I have tried saving to different folders, and it works.

As you said, showing the picture from different folder are much difficult. I am still working on it. Hope I can handle this soon.

Talk to you later.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Chapter 13 LINQ Page452 Try It Out JohnKiller BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 5 August 29th, 2010 08:45 AM
Disappearing UserName & Question within Customized PasswordRecovery Question Template eddiemcham ASP.NET 3.5 Basics 13 June 13th, 2009 04:23 AM
Oracle Jdeveloper extention functions arjamit XSLT 1 May 9th, 2007 08:43 AM
Getting file extention tdaustin Classic ASP Basics 2 July 26th, 2004 01:45 AM
chart extention recommendations? ss2003 Beginning PHP 5 January 8th, 2004 05:42 PM





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