Hi,
I have a really basic ASP.Net question regarding the life of variables. I'm following the book Beginning ASP.Net 4 by Apress.
The question is this, I declare a list in the .aspx page and it is available for access by the corresponding .aspx.cs class similar to the code sample below.
<select ID="Currency" runat="server" />
protected void Page_Load(Object sender, EventArgs e)
{
if (this.IsPostBack == false)
{
Currency.Items.Add(new ListItem("Euros", "0.85"));
Currency.Items.Add(new ListItem("Japanese Yen", "110.33"));
Currency.Items.Add(new ListItem("Canadian Dollars", "1.2"));
//hiding the image
Graph.Visible = false;
}
}
How is it that the server is aware of which ListItem I have selected for processing by the page? Where is the ListItem selected stored?
Thanks