Solved

Display logfile on the web server to my client (mvc 3 C# web application)

Posted on 2013-06-19
3
491 Views
Last Modified: 2013-06-21
I have a web application written with C# and mvc application. This app will load an excel file to the database and log the result in a text file. How can I display the log file to my user/client at the end of the load. The log file will just indicate the total number of records loaded.

some code samples will be appreciated.
0
Comment
Question by:Sirdots
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 34

Expert Comment

by:Paul MacDonald
ID: 39260375
If you know the name of, and the path to, the log file, just store the name and display the list of log files on a page, making each name a link to the log file itself.  If it's just a text file, it should open in any browser.
0
 

Author Comment

by:Sirdots
ID: 39260405
Thanks Paulmacd. Is this possible to be done without the page refreshing. Assuming my user clicks on submit and the upload completes. I will like to show the link to the file at the bottom of my page. Which container do I use to store this link? Literal? Am using mvc.
0
 
LVL 34

Accepted Solution

by:
Paul MacDonald earned 500 total points
ID: 39260458
Without using javascript of some sort, I don't know how to do it without a refresh.  Here's some ideas:
http://stackoverflow.com/questions/9035329/update-panel-in-asp-net-mvc-3
http://www.asp.net/mvc/tutorials/mvc-music-store/mvc-music-store-part-8
http://www.vnx.nl/?p=144


As to what container - I don't think it matters.  Anything you can tap for its InnerHTML property should work.  Just put an <a> tag to wherever the log file is located.
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

User art_snob (http://www.experts-exchange.com/M_6114203.html) encountered strange behavior of Android Web browser on his Mobile Web site. It took a while to find the true cause. It happens so, that the Android Web browser (at least up to OS ver. 2.…
Performance in games development is paramount: every microsecond counts to be able to do everything in less than 33ms (aiming at 16ms). C# foreach statement is one of the worst performance killers, and here I explain why.
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…
Suggested Courses

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question