Solved

How to display console output in an ASP.NET textbox?

Posted on 2007-12-05
4
1,750 Views
Last Modified: 2010-04-21
I have an ASP.NET (C#) webform that collects some data and passes it to a windows console program.  I'd like to be able to keep the console window from popping up and display it's output in a window on my webform.  Is this possible?  At the very least, I'd like to get the output to display in the web page.  Thank you!
0
Comment
Question by:jvalescu
[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
4 Comments
 
LVL 7

Expert Comment

by:Abu Hamdan
ID: 20412413
Since your application is web, you cant call EXE on the client pc. its prevented fot security reasons. But there is a way by using hta files: http://msdn2.microsoft.com/en-us/library/ms536496.aspx

Its web based but when browsed by client you can do all things that is done by desktop app. like registry modifying, call exe ..etc
0
 

Author Comment

by:jvalescu
ID: 20412771
The console app is on the webserver, not the client pc.  I've tested with a simple console app that displays "Hello World!" and using  Response.Write(p.StandardOutput.ReadToEnd());, pops the console window for a second then displays "Hello World!" in the top left corner of my browser window.  I'd like that to go to a text box on my page.  Another acceptable solution would be to open another browser window for the output.  Any ideas?
0
 
LVL 11

Accepted Solution

by:
cmhunty earned 500 total points
ID: 20412937
I assume p is a process?

So if p.StandardOutput.ReadToEnd()  returns the string, why can't you just set the textbox value to this?
textbox1.Text = p.StandardOutput.ReadToEnd();

Would it not be worth pulling out the required functions from the console app into a separate library which can be called from both the console app and the website app?
0
 

Author Closing Comment

by:jvalescu
ID: 31412877
I've been looking at this too hard.  Didn't even think about setting the textbox to the output.  Duh!
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video we outline the Physical Segments view of NetCrunch network monitor. By following this brief how-to video, you will be able to learn how NetCrunch visualizes your network, how granular is the information collected, as well as where to f…
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

726 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