page level tracing?

Sagarp
Posted by Sagarp under ASP.NET category on | Views : 1494
<%@ Page language="c#" Trace=true Codebehind="pageleveltrace.aspx.cs" AutoEventWireup="false" Inherits="day8.pageleveltrace" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<title>pageleveltrace</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
</HEAD>
<body MS_POSITIONING="GridLayout">
<form id="Form1" method="post" runat="server">
<asp:TextBox id="TextBox1" style="Z-INDEX: 101; LEFT: 200px; POSITION: absolute; TOP: 56px" runat="server"></asp:TextBox>
<asp:Label id="Label1" style="Z-INDEX: 104; LEFT: 256px; POSITION: absolute; TOP: 24px" runat="server">Label</asp:Label>
<asp:Button id="Button1" style="Z-INDEX: 103; LEFT: 248px; POSITION: absolute; TOP: 152px" runat="server"
Text="Button"></asp:Button>
<asp:TextBox id="TextBox2" style="Z-INDEX: 102; LEFT: 200px; POSITION: absolute; TOP: 104px"
runat="server"></asp:TextBox>
</form>
</body>
</HTML>
pageleveltrace.aspx.cs
private void Button1_Click(object sender, System.EventArgs e)
{
int x,y,z;
try
{
x=Convert.ToInt32(this.TextBox1.Text);
y=Convert.ToInt32(this.TextBox2.Text);
z=x/y;
this.Label1.Text=z.ToString();
Trace.Write("Division","my ans="+z.ToString());


}
catch(Exception ex)
{
Trace.Warn(ex.Message);
}
}

Comments or Responses

Login to post response