TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Chris Buchan
NA
1
0
Using a dropdown list as a save location
Jul 17 2009 6:44 AM
Hey, First off i am pretty new to c# so i am sorry if this is a simple question. I am running VWD2008 to make a web page and i have a page based on c#. I am trying to upload files to our sever but i would like a way to choose different folders to save the files. At the momment my code looks like this: using System; using System.Web.UI.WebControls; public partial class Management_FileUpload : System.Web.UI.Page { protected void Button1_Click(object sender, EventArgs e) { ////saving file in the physical folder; FileUpload FileUpload1 = file_Image; DropDownList Droplist2 = DropList1; string virtualFolder = "~/" + Droplist2 + "/"; string physicalFolder = Server.MapPath(virtualFolder); FileUpload1.SaveAs(physicalFolder + FileUpload1.FileName); lbl_Result.Text = "Your file " + FileUpload1.FileName + " has been uploaded."; In my webpage, my dropdownlist is called dropList1 I would like to be able to save my selected file to "~/(what ever folder i select from my list) /File name Hope this makes sence :)
Reply
Answers (
0
)
How to show string in Textbox that have TextMode="Password"
Parent-child forms