p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: ASP.NET 2.0 Instant Results ISBN: 978-0-471-74951-6 (http://p2p.wrox.com/forumdisplay.php?f=252)
-   -   Chapter 6 FCKeditor image upload (http://p2p.wrox.com/showthread.php?t=64184)

Imar February 15th, 2008 04:27 AM

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.

hdpark February 19th, 2008 11:40 AM

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,



Imar February 19th, 2008 01:04 PM

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


All times are GMT -4. The time now is 12:24 PM.

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