|
protected System.Web.UI.HtmlControls.HtmlAnchor Aback;
...
this.Aback.ServerClick + = new System.EventHandler (this.Aback_ServerClick);
...
public void Aback_ServerClick (object sender, System.EventArgs e)
{
// The code at this location is executed twice
int lbid = Convert.ToInt32 (this.ListBox1.SelectedItem.Value.ToString ()); // Line 1
...
} // line 9
---------------------------------------
The above is the code in question
When I clicked the back button (Aback), I saw in the breakpoint that the code in the ServerClick method was executed twice. The first time, after the last sentence was executed to line 9}, it did not come out, but continued to Line 1.
Because the content of the line is a listbox, when the second execution reaches line 1, this will prompt me to set the object reference to the object instance.
Does anyone know why? Anxious to me.
please. Thank you, brothers and sisters. |
|