Click here to Skip to main content
15,885,309 members
Home / Discussions / C#
   

C#

 
GeneralRe: Another textbox question Pin
OriginalGriff25-Aug-12 23:30
mveOriginalGriff25-Aug-12 23:30 
GeneralRe: Another textbox question Pin
Diego Carrion26-Aug-12 7:43
Diego Carrion26-Aug-12 7:43 
QuestionConverting textbox into textarea. Pin
Diego Carrion25-Aug-12 16:16
Diego Carrion25-Aug-12 16:16 
AnswerRe: Converting textbox into textarea. Pin
OriginalGriff25-Aug-12 22:26
mveOriginalGriff25-Aug-12 22:26 
GeneralRe: Converting textbox into textarea. Pin
Diego Carrion25-Aug-12 22:36
Diego Carrion25-Aug-12 22:36 
GeneralRe: Converting textbox into textarea. Pin
BillWoodruff26-Aug-12 15:36
professionalBillWoodruff26-Aug-12 15:36 
GeneralRe: Converting textbox into textarea. Pin
Diego Carrion27-Aug-12 16:31
Diego Carrion27-Aug-12 16:31 
QuestionStoring File Path on Database Pin
ASPnoob25-Aug-12 14:34
ASPnoob25-Aug-12 14:34 
Hi all, it seems what I wanted to do is pretty straight forward but I can't get it to work. What I wanted to do is upload a file called Test.doc to a folder called MyFiles in the Root directory of my Web Server. Then retrieve the file using the following code
HTML
<a href="/MyFolders/test.doc">Click here</a>


That's essentially what I wanted to do. However,I want to save the name and extension of Test.doc in a database. Then I want to replace the name Test.doc with a GUID before uploading it to the folder on the server to avoid duplication. I have tried the following to store the file path of Test.doc without success:

C#
string myFileName = Path.GetFileName(FileUpload1.FileName);
 string myFilePath = Server.MapPath("~/Documents/");


What code do I use to get the path of Test.doc? Thanks in advance for your help.

modified 25-Aug-12 21:08pm.

AnswerRe: Storing File Path on Database Pin
AmitGajjar25-Aug-12 22:20
professionalAmitGajjar25-Aug-12 22:20 
AnswerRe: Storing File Path on Database Pin
OriginalGriff25-Aug-12 22:34
mveOriginalGriff25-Aug-12 22:34 
QuestionRe: Storing File Path on Database Pin
Eddy Vluggen25-Aug-12 23:34
professionalEddy Vluggen25-Aug-12 23:34 
AnswerRe: Storing File Path on Database Pin
ASPnoob26-Aug-12 0:27
ASPnoob26-Aug-12 0:27 
GeneralRe: Storing File Path on Database Pin
Eddy Vluggen26-Aug-12 0:40
professionalEddy Vluggen26-Aug-12 0:40 
QuestionChange Combobox Look in WPF Pin
a.fatemeh25-Aug-12 9:24
a.fatemeh25-Aug-12 9:24 
AnswerRe: Change Combobox Look in WPF Pin
Abhinav S25-Aug-12 18:31
Abhinav S25-Aug-12 18:31 
QuestionIndexers Pin
ripples24-Aug-12 23:59
ripples24-Aug-12 23:59 
AnswerRe: Indexers Pin
Wes Aday25-Aug-12 0:12
professionalWes Aday25-Aug-12 0:12 
AnswerRe: Indexers Pin
DaveyM6925-Aug-12 0:37
professionalDaveyM6925-Aug-12 0:37 
AnswerRe: Indexers Pin
PIEBALDconsult25-Aug-12 4:40
mvePIEBALDconsult25-Aug-12 4:40 
AnswerRe: Indexers Pin
Richard MacCutchan25-Aug-12 7:07
mveRichard MacCutchan25-Aug-12 7:07 
GeneralRe: Indexers Pin
ripples25-Aug-12 8:52
ripples25-Aug-12 8:52 
Questioncan this be done without using 'dynamic: build a list of KeyValuePairs, where each item's Type varies ? Pin
BillWoodruff24-Aug-12 20:31
professionalBillWoodruff24-Aug-12 20:31 
AnswerRe: can this be done without using 'dynamic: build a list of KeyValuePairs, where each item's Type varies ? Pin
DaveyM6925-Aug-12 0:13
professionalDaveyM6925-Aug-12 0:13 
GeneralRe: can this be done without using 'dynamic: build a list of KeyValuePairs, where each item's Type varies ? Pin
BillWoodruff25-Aug-12 11:25
professionalBillWoodruff25-Aug-12 11:25 
AnswerRe: could this be done without dynamic Pin
Martijn Kok25-Aug-12 0:59
Martijn Kok25-Aug-12 0:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.