user1963870
user1963870

Reputation: 23

How to stream C# console output to an ASP webpage textbox

I'm currently developing a webpage that calls a C# console application executable on the server. This is great, however, I'd really like to be able to stream the console application output in real time to a textbox on the application that called the application. I have managed to redirect the output of the console to a text file after the console application has completed, but what would be great would be to find out how to stream in real time from the application as it runs to a text box on the webpage.

Upvotes: 2

Views: 2411

Answers (2)

techno
techno

Reputation: 6500

This is not a simple scenario that you can accomplish with C# alone.You have to use AJAX(Jquery)

Here is a link to an example that discuss regarding the creation of realtime log.

http://forums.asp.net/t/1602013.aspx

You will need to use UpdatePanel

Upvotes: 1

Alexander
Alexander

Reputation: 2477

Have your web page, serverside, read the txt file and put the read text into any control you like. Then have your web page refresh itself / that control every 10 seconds.

Upvotes: 0

Related Questions