可能重複:
Where does Console.WriteLine go in ASP.NET?Console.WriteLine沒有顯示消息
我知道刪除是發生了我檢查了數據庫
代碼:
try
{
MyCommand.Connection.Open();
int count = MyCommand.ExecuteNonQuery();
if (count > 0)
{
Console.WriteLine("Delete Success!!!");
//lblMessage.Text = tbTourName.Text + " Deleted!";
}
else
{
Console.WriteLine("No Delete!!!");
}
Console.ReadLine();
}
catch (SqlException ex)
{
Console.WriteLine("Delete Failed coz.. " + ex.Message);
}
finally
{
MyCommand.Connection.Close();
}
做它應該顯示網頁上的消息本身?
問候 茶
的回答你的問題是在以下答案:http://stackoverflow.com/questions/137660/where-does-console-writeline-go-in-asp-net –
你在使用窗口應用程序嗎? –
使用Response.Write() – scartag