I have a calculation class file where I am doing something. I made an object x of the calculation class in .cs file of aspx and called it in aspx using server tag. Now I am getting hits for that page. Is that page is going to use the a single object for that class or for every hit will it create a new object? Is this a good practice of doing coding?
calculation.cs
using system;
public calculation()
{
//some decelerations
}
public string getProduct()
{
return (A*B*C).toString();
}
page.aspx.cs
public calculation cal = new calculation();
page.aspx
<%# cal.getProduct()%>