none
How to display or download a text file from my server

    Question

  • I have some text files that I have created in my application. I would like my client to view these and I have not figured out how to do so. I would settle for downloading these files to the client's pc environment allowing him to open and peruse with many available options.  I have not yet figured out how to do the download.  A hyperlink to a file would require conversion to html format but that sounds too complicated. Can someone help me or at least tell me what to read?

    Thank you.


    eps123

    Thursday, October 27, 2016 4:29 PM

Answers

  • I am going to answer myself now that I have figured it out.  I was close in my previous question.   I CAN simply run any file as a webpage!

    I mistakenly believed that the file must be well formed html, but plain old text that I have written displays beautifully and is perfectly adequate for my purpose.


    eps123

    • Marked as answer by eps123 Friday, November 11, 2016 5:30 PM
    Friday, November 11, 2016 5:29 PM

All replies

  • Hi eps123,

    Thanks for your post.

    >>How to display or download a text file from my server

    Did you mean you want to view the text file on another machine?

    If so, you could use team foundation server to check in the project into the server. And on another machine, you can checkout the project and view the text file.

    If I misunderstood your requirement, please feel free to let me know.

    Best Regards,

    Lake Xiao

    Friday, October 28, 2016 2:35 AM
    Moderator
  • My application runs on a server.  Files (reports) are created in the application and I want to discover how to allow a

    user of the application to view these reports.  Of course I could write a routine to display these reports while on line,

    but I feel that would be re-inventing the wheel and there must be an easier way to do this.

    Thank you


    eps123

    Friday, October 28, 2016 11:05 AM
  • Hi  eps123,

    Thanks for your response.

    Could you please tell me what's the type of your application?

    According to your description, I found you were searching for a easy to get the reports which created in the application.

    I think you may need to achieve it programming. Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools. If you could tell me the development language. I will move your thread to the corresponding forum for better support.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    Monday, October 31, 2016 5:33 AM
    Moderator
  • I code in VB on VS2013. Basically, I am looking for the technique for doing this. Is there a tool for creating the files as html and then I could display them as web pages?

    eps123

    Wednesday, November 02, 2016 5:06 PM
  • Hi eps123,

    >>Is there a tool for creating the files as html and then I could display them as web pages?

    There is Web template in Visual Studio, when you create a web project in VS. You can add the html files into the project. And in VS, you can view the designer of the html files. It will display them as the web pages.

    Best Regards,

    Lake Xiao

    Thursday, November 03, 2016 1:16 AM
    Moderator
  • I don't think I am making myself understood. In my project lets say I have created a report that reads as follows: ____________________________

    The answer is 123

    ____________________________

    I would like my client to be able to either download the above report to his/her computer so that he can view it there or to be able to view this report on the web.

    The report I am currently creating is plain text format (for example, text1,10,13, text2,10,13text3,10,13, text4,10,13,text5,10,13, .......textn,10,13)

    Does this make sense?


    eps123

    Thursday, November 03, 2016 11:29 AM
  • Hi eps123,

    Since Our forum is discussing about VS general question like how to set/configure Visual Studio and Visual Studio tools.

    For your requirement, I think we need to write some code to achieve it.  I suggest you'd better post it to our VB forum for better support.

    Thanks for your understanding.

    Best Regards,

    Lake Xiao

    Friday, November 04, 2016 3:13 AM
    Moderator
  • I am going to answer myself now that I have figured it out.  I was close in my previous question.   I CAN simply run any file as a webpage!

    I mistakenly believed that the file must be well formed html, but plain old text that I have written displays beautifully and is perfectly adequate for my purpose.


    eps123

    • Marked as answer by eps123 Friday, November 11, 2016 5:30 PM
    Friday, November 11, 2016 5:29 PM