i am doing the walkthrough of an asp.net book and i have
come to one of the tutorials where i am supposed to
create a simple code behind method. but, when i follow
the instructions in the book i get this error message.
considering that i am following a walkthrough i would
like to iorn out this problem ASAP so i can continue...
here is the error message:
Compiler Error Message:
CS1595: 'Temperature.TemperatureCB' is defined in
multiple places; using definition
from 'C:\WINDOWS\Microsoft.NET\Framework\v1.0.3705
\Temporary ASP.NET Files\mcsd\63097906\8e1380c7
\adecz8jd.dll'
and here is the simple code definition of the cs file:
//TemperatureCB.cs
//Define a namespace
namespace Temperature
{
//Define TemperatureCB class
public class TemperatureCB : System.Web.UI.Page
{
//Define ToCensius() method
double ToCelsius(double f)
{
//Calculate and return
return (5.0/9.0)*(f-32.0);
}
//Define the CreateTemperatureTable()
method
public void CreateTemperatureTable()
{
for (double f = 50.0; f<=100.0;
f++)
{
Response.Output.Write(
"<tr><td>{0}
</td><td>" +
"{1:f}</td><tr>",
f, ToCelsius(f));
}
}
}
}
and here is the asp file exactly as i have been running
it..
<! -- StepByStep1_7.aspx -->
<%@ Page Language="C#"
Inherits="Temperature.TemperatureCB"
Src="TemperatureCB.cs"%>
<html>
<body>
<h2>Fahrenheit to Celsius Conversion
Chart</h2>
<table border="2">
<tr>
<th>
°
Fahrenheit</th>
<th>
° Celsius</th>
</tr>
<%CreateTemperatureTable();%>
</table>
</body>
</html>
any help would be appreiciated...