I write a ASPX c# page, and I MUST use a global variable like this;
public static Decimal _Total;
protected void Page_Load(object sender, EventArgs e)
{
if (Page.IsPostBack == false)
{
_Total=0;
}
}
public void ShowCekBanka()
{
_Total= 10 * 5;
}
public void ShowNakitBanka()
{
_Total= 10 * 10;
}
Now; I put 2 Buttons in page; Button1 is run ShowCekBanak() function;Button2 is run ShowNakitBanka() Function;
When I run first time the project I click Button1 and _Total is = 50 it is ok; BUT I open my project in another internet explorer I see My _Total value is 50 in new opened page. SO the problem is global variable _Total is too much global :) Two internet explorer pages show SAME value in _Total both are _Totals is 50; It must be like this ; First Page _Total is 50 OK, but New IE page must be _Total is 0; Is nt it?
So How Can I fix This Problem? Thanks;