Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6
This is the forum to discuss the Wrox book ASP.NET 2.0 Instant Results by Imar Spaanjaars, Paul Wilton, Shawn Livermore; ISBN: 9780471749516
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 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
  #11 (permalink)  
Old February 15th, 2008, 04:27 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi hdpark,

Server.MapPath maps a virtual file or folder to a physical one. For example, if you have a folder called UserFiles at the root of your web site, and your web site is located at e:\web\myaccount\htdocs, then Server.MapPath should return e:\web\myaccount\htdocs\UserFiles
What do you get when you use Server.MapPath and output its return value on a label control? E.g.:

Label1.Text = Server.MapPath("UserFiles")

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
  #12 (permalink)  
Old February 19th, 2008, 11:40 AM
Authorized User
 
Join Date: Oct 2007
Location: , , .
Posts: 27
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Imar,
I needed \(back slash) after UserFiles like this.
FileUpload1.SaveAs(Server.MapPath("UserFiles\") & FileUpload1.FileName)

Thanks for your kind help.

I have another question about DropDownList.
I used it from your codes in Chapter 6 as this: lstBlogEntry.SelectedIndex = -1
When I enter this routine, "-1" brings 1st selection from data. I want to bring specific value (it is in Public pubVars.pubBlogID) and set this value to this DropDownList. I tried it like these two:
1. lstBlogEntry.SelectedIndex = Convert.ToInt32(pubVars.pubBlogID)
2. lstBlogEntry.SelectedValue = Convert.ToInt32(pubVars.pubBlogID)

But I do not have right result. Can you please advise me about this?
I really appreciate your kind help always.

Thanks,


  #13 (permalink)  
Old February 19th, 2008, 01:04 PM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Can you explain your problem in more detail? I have no idea what you're talking about.

Maybe you can open a new thread for it? If it's related to the Instant Result book, post it here, otherwise please select an appropriate other category here at p2p.wrox.com

Cheers,

Imar




Similar Threads
Thread Thread Starter Forum Replies Last Post
Upload image-create & save thumbnail-display image angshujit ASP.NET 2.0 Professional 6 July 11th, 2013 10:34 PM
Upload image phuc2583 Classic ASP Basics 1 January 17th, 2008 08:48 AM
Chapter 7 - Problem with filepath on Image Upload btaysisson BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 December 18th, 2007 05:54 AM
chapter 7 image upload on Mac OS X laolaonk BOOK: Beginning PHP5, Apache, and MySQL Web Development ISBN: 978-0-7645-7966-0 0 February 19th, 2006 10:20 PM
Image upload Pallav Javascript How-To 8 October 21st, 2004 12:14 AM





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