J
Jimmy
This is a basic question. Does Page related member variable values
only be set in the Page they are executed? Example code like below
public partial class _Default : System.Web.UI.Page
{
string var = "";
protected void BtnSubmit_Click(object sender, EventArgs e)
{
if (Select.Checked)
{
var = "Visited";
tbox.Text = "Selected On " + var;
}
else
tbox.Text = "Selected Off " + var;
}
Variable var is set to value 'Visited' ONLY in web page that is executed by
submit.
Not in other instances of same page executed in other page instances in
other Browser instances.
What I like to know that does Page instance differ in this case from Java's
Servlet member variables
that are shared with all instances.
Cheers!
only be set in the Page they are executed? Example code like below
public partial class _Default : System.Web.UI.Page
{
string var = "";
protected void BtnSubmit_Click(object sender, EventArgs e)
{
if (Select.Checked)
{
var = "Visited";
tbox.Text = "Selected On " + var;
}
else
tbox.Text = "Selected Off " + var;
}
Variable var is set to value 'Visited' ONLY in web page that is executed by
submit.
Not in other instances of same page executed in other page instances in
other Browser instances.
What I like to know that does Page instance differ in this case from Java's
Servlet member variables
that are shared with all instances.
Cheers!