Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2007-12-05
4
Medium Priority
?
1,770 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 2000 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

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

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 …
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses

636 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