Solved

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

Posted on 2013-06-19
3
469 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
  • 2
3 Comments
 
LVL 33

Expert Comment

by:paulmacd
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 33

Accepted Solution

by:
paulmacd 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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Summary: Persistence is the capability of an application to store the state of objects and recover it when necessary. This article compares the two common types of serialization in aspects of data access, readability, and runtime cost. A ready-to…
Introduction Hi all and welcome to my first article on Experts Exchange. A while ago, someone asked me if i could do some tutorials on object oriented programming. I decided to do them on C#. Now you may ask me, why's that? Well, one of the re…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

707 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

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now