Click here to Skip to main content
15,918,742 members
Home / Discussions / ASP.NET
   

ASP.NET

 
QuestionReactJS.Net - Server side rendering works in development, but not on my production server Pin
jkirkerx14-Jun-18 11:36
professionaljkirkerx14-Jun-18 11:36 
Answer[solved] Pin
jkirkerx18-Jun-18 9:52
professionaljkirkerx18-Jun-18 9:52 
QuestionBlurry Pdf Output while uisng Html2pdf.bundle.js Pin
Member 1370125113-Jun-18 19:35
Member 1370125113-Jun-18 19:35 
AnswerRe: Blurry Pdf Output while uisng Html2pdf.bundle.js Pin
Nathan Minier14-Jun-18 16:46
professionalNathan Minier14-Jun-18 16:46 
QuestionConversion of HTML to PDF Using JsPdf Pin
Member 1370125111-Jun-18 20:08
Member 1370125111-Jun-18 20:08 
QuestionRe: Conversion of HTML to PDF Using JsPdf Pin
Richard MacCutchan11-Jun-18 21:38
mveRichard MacCutchan11-Jun-18 21:38 
AnswerRe: Conversion of HTML to PDF Using JsPdf Pin
Member 1370125111-Jun-18 23:53
Member 1370125111-Jun-18 23:53 
QuestionImg Collection Pin
sunsher9-Jun-18 1:44
sunsher9-Jun-18 1:44 
AnswerRe: Img Collection Pin
Vincent Maverick Durano12-Jun-18 20:47
professionalVincent Maverick Durano12-Jun-18 20:47 
AnswerRe: Img Collection Pin
User 418025414-Jun-18 7:05
User 418025414-Jun-18 7:05 
QuestionHow do I control the specflow execution sequence Pin
Ger Hayden4-Jun-18 23:18
Ger Hayden4-Jun-18 23:18 
QuestionInsuring that an application does not maintain a valid state on initialization or shutdown failure. Pin
Stephen Holdorf4-Jun-18 8:45
Stephen Holdorf4-Jun-18 8:45 
AnswerRe: Insuring that an application does not maintain a valid state on initialization or shutdown failure. Pin
Stephen Holdorf5-Jun-18 0:52
Stephen Holdorf5-Jun-18 0:52 
AnswerRe: Insuring that an application does not maintain a valid state on initialization or shutdown failure. Pin
Nathan Minier5-Jun-18 1:43
professionalNathan Minier5-Jun-18 1:43 
QuestionCreate a text file in client machine using asp.net Pin
raj.sibin3-Jun-18 19:02
raj.sibin3-Jun-18 19:02 
AnswerRe: Create a text file in client machine using asp.net Pin
Richard Deeming4-Jun-18 1:28
mveRichard Deeming4-Jun-18 1:28 
Your code-behind runs on the server. It has no access to the client's file system.

The only way you can "create" a file on the client's computer is to write it to the response with the appropriate headers. The user will then be able to save the file wherever they want. They will also be able to choose not to save the file.

And to pre-empt your next question: no, you can't force them to save the file, and you can't influence where the file is saved. You can provide a default file name, but it's only a suggestion, and the user is free to change it.
C#
Response.ContentType = "text/plain";
Response.AppendHeader("Content-Disposition", "attachment;filename=TheSuggestedFileName.txt");

string sourcePath = Server.MapPath("~/path/to/the/file.txt");
Response.TransmitFile(sourcePath);
Response.End();




"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

QuestionCode saved to a TFS workspace getting removed on next get latest workspace. Pin
Stephen Holdorf27-May-18 15:13
Stephen Holdorf27-May-18 15:13 
QuestionMiniblog and some of the technology he wrote question Pin
jkirkerx27-May-18 9:23
professionaljkirkerx27-May-18 9:23 
QuestionGrouping Items of this same Category Pin
Otekpo Emmanuel25-May-18 23:11
Otekpo Emmanuel25-May-18 23:11 
AnswerRe: Grouping Items of this same Category Pin
Richard MacCutchan26-May-18 2:43
mveRichard MacCutchan26-May-18 2:43 
GeneralRe: Grouping Items of this same Category Pin
Hariharan Baskaran26-May-18 3:50
Hariharan Baskaran26-May-18 3:50 
GeneralRe: Grouping Items of this same Category Pin
Richard MacCutchan26-May-18 4:39
mveRichard MacCutchan26-May-18 4:39 
QuestionASP MVC Solution projects and 3rd party dll's missing from TFS new branch download. Pin
Stephen Holdorf24-May-18 14:38
Stephen Holdorf24-May-18 14:38 
AnswerRe: ASP MVC Solution projects and 3rd party dll's missing from TFS new branch download. Pin
F-ES Sitecore25-May-18 3:58
professionalF-ES Sitecore25-May-18 3:58 
GeneralRe: ASP MVC Solution projects and 3rd party dll's missing from TFS new branch download. Pin
Stephen Holdorf25-May-18 13:57
Stephen Holdorf25-May-18 13:57 

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.