Click here to Skip to main content
15,615,985 members
Home / Discussions / C#
   

C#

 
GeneralRe: User Control function C# Pin
Ismael_199929-Jul-20 10:04
Ismael_199929-Jul-20 10:04 
GeneralRe: User Control function C# Pin
Ralf Meier29-Jul-20 20:30
mveRalf Meier29-Jul-20 20:30 
GeneralRe: User Control function C# Pin
Ismael_199930-Jul-20 4:03
Ismael_199930-Jul-20 4:03 
GeneralRe: User Control function C# Pin
Ralf Meier30-Jul-20 6:15
mveRalf Meier30-Jul-20 6:15 
GeneralRe: User Control function C# Pin
Ismael_199931-Jul-20 6:47
Ismael_199931-Jul-20 6:47 
GeneralRe: User Control function C# Pin
Gerry Schmitz31-Jul-20 7:48
mveGerry Schmitz31-Jul-20 7:48 
GeneralRe: User Control function C# Pin
Ismael_199931-Jul-20 10:36
Ismael_199931-Jul-20 10:36 
GeneralRe: User Control function C# Pin
Ralf Meier31-Jul-20 8:22
mveRalf Meier31-Jul-20 8:22 
GeneralRe: User Control function C# Pin
Ismael_199931-Jul-20 10:39
Ismael_199931-Jul-20 10:39 
GeneralRe: User Control function C# Pin
Ralf Meier31-Jul-20 11:20
mveRalf Meier31-Jul-20 11:20 
GeneralRe: User Control function C# Pin
Ismael_19991-Aug-20 1:57
Ismael_19991-Aug-20 1:57 
GeneralRe: User Control function C# Pin
Ralf Meier1-Aug-20 22:49
mveRalf Meier1-Aug-20 22:49 
Questioncall a jquery function inside html returned by ajax Pin
Peq 227-Jul-20 21:36
Peq 227-Jul-20 21:36 
AnswerRe: call a jquery function inside html returned by ajax Pin
OriginalGriff27-Jul-20 22:02
mvaOriginalGriff27-Jul-20 22:02 
QuestionAdd a listview cell Pin
ago248627-Jul-20 1:34
ago248627-Jul-20 1:34 
AnswerRe: Add a listview cell Pin
OriginalGriff27-Jul-20 2:28
mvaOriginalGriff27-Jul-20 2:28 
GeneralRe: Add a listview cell Pin
ago248627-Jul-20 2:31
ago248627-Jul-20 2:31 
GeneralRe: Add a listview cell Pin
OriginalGriff27-Jul-20 2:59
mvaOriginalGriff27-Jul-20 2:59 
GeneralRe: Add a listview cell Pin
ago248627-Jul-20 3:18
ago248627-Jul-20 3:18 
GeneralRe: Add a listview cell Pin
OriginalGriff27-Jul-20 3:37
mvaOriginalGriff27-Jul-20 3:37 
GeneralRe: Add a listview cell Pin
ago248627-Jul-20 4:08
ago248627-Jul-20 4:08 
GeneralRe: Add a listview cell Pin
OriginalGriff27-Jul-20 4:38
mvaOriginalGriff27-Jul-20 4:38 
GeneralRe: Add a listview cell Pin
ago248627-Jul-20 4:45
ago248627-Jul-20 4:45 
GeneralRe: Add a listview cell Pin
ago248627-Jul-20 4:53
ago248627-Jul-20 4:53 
Questionsaving a Word Doc from address bar in .net/C# Pin
Pita3225-Jul-20 5:50
Pita3225-Jul-20 5:50 
I've got a situation in my .Net application where I have a popup modal where the user will select a Word document and my process will save it to a repository under a different standardized name.

To get the input file from the address bar:

HttpPostedFileBase fileContent = Request.Files[0];


Then the save:

fileContent.SaveAs(fullPath);


Unfortunately the SaveAs does not work, as when you get the Word Document from the Response object, it blanks it out when doing the SaveAs.

So what I need to do is get the Word Document that the user selected, and save the contents of that Word Document to a Word Document with a different, standardized name.

so what I have so far is

using (var documentReader = new StreamReader(fileContent.InputStream))
{
     var readDoc = documentReader.ReadToEnd();
}


I know my readDoc variable contains the selected Word document contents, and it appears to do the ReadToEnd correctly, the problem now is, I need to be able to save those contents stored in readDoc to a different Word Document with a different name.

Any ideas on how to go about this?

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.