Variable's value not retained in the method of a class
<p>In ASP>Net using C#, I declared a variable as member of the class as follows:</p>

<pre><code>public class sales: System.Web.UI.Page
{
string type=null;
}
</code></pre>

<p>And i have an Image Button in my UI for which I've defined the event called</p>

<pre><code>protected void ImageButton2_Click(object sender, ImageClickEventArgs e)
</code></pre>

<p>in this method, any value assigned to variable 'type'(by any other method of the class) is not retained and only value null is being retrieved though I've assigned some value to 'type' somewhere inside the class...</p>

<p>What could be the problem that I cant access the assigned value????</p>
