Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Console.Write

Reply
Thread Tools

Console.Write

 
 
Jim Heavey
Guest
Posts: n/a
 
      12-03-2003
Realizing that I can use Debug.write to write a message to the "output"
window, the Console.Write is accepted when keyed in, but where does the
output go?
 
Reply With Quote
 
 
 
 
Munsifali Rashid
Guest
Posts: n/a
 
      12-03-2003
In a console application, Console.Write sends the output to the screen -
like a DOS application.

Mun




"Jim Heavey" <(E-Mail Removed)> wrote in message
news:Xns9446A84EA3F46JimHeaveyhotmailcom@207.46.24 8.16...
> Realizing that I can use Debug.write to write a message to the "output"
> window, the Console.Write is accepted when keyed in, but where does the
> output go?



 
Reply With Quote
 
 
 
 
Jim Heavey
Guest
Posts: n/a
 
      12-04-2003
Fine, but what does it do in an asp.net application?
 
Reply With Quote
 
Munsifali Rashid
Guest
Posts: n/a
 
      12-04-2003
I would presume it goes nowhere, as asp.net applications do not run in a
console window. Or maybe the ouput goes to the console, but because there's
no console window, it's not displayed. The compiler might also strip these
commands out as they have no purpose in an asp.net application.

As a quick test, I built a small windows app, with a single button, which
would write to the console window when clicked. Like an asp.net
application, it does not run at the command line, and I wanted to see what
happens when you try and send output to, or get input from the console.

private void button1_Click(object sender, System.EventArgs e)
{
MessageBox.Show(this, "starting");
Console.WriteLine("Hello World");
Console.ReadLine();
MessageBox.Show(this, "ended");
}

No console window opened, and both the "starting" and "ended" message boxes
displayed without any problems. Hence, I would guess that the compiler
strips out the Console... lines out as they serve no purpose in a windows or
asp.net application.

Mun




"Jim Heavey" <(E-Mail Removed)> wrote in message
news:Xns9446E4794FF4JimHeaveyhotmailcom@207.46.248 .16...
> Fine, but what does it do in an asp.net application?



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off




Advertisments