Solved

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

Posted on 2013-06-19
3
486 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

Industry Leaders: 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

Today is the age of broadband.  More and more people are going this route determined to experience the web and it’s multitude of services as quickly and painlessly as possible. Coupled with the move to broadband, people are experiencing the web via …
ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

751 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