NullReferenceException - can't figure out why initialized object resets to null
<p>ok, i have the following class in my code behind file. it's a very simple page, just takes the TestIssue object, loads the entry into a text box for editing the entry, and then when save is clicked it calls the function which updates the TestIssue in the database.</p>

<p>here's the code.</p>

<pre><code>public partial class Issues_Edit : System.Web.UI.Page
    {
        protected string filter_test_director;
        protected TestIssue myIssue;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                string id = Request.QueryString["id"];  

                id = "1358";
                myIssue = new TestIssue(Convert.ToInt32(id));

                issue_date.Text = myIssue.Entry_Date.ToString();
                issue_author.Text = myIssue.Author.Full_Name_RFL;

                issue_text.Text = myIssue.Entry.Replace("&lt;br&gt;", "\n");
                issue_text.Height = 150;
                issue_text.Width = 400;

            }

        }

        protected void SaveButton_Click(object sender, EventArgs e)
        {
            myIssue.Entry = issue_text.Text;

            int update  = TestIssueDB.UpdateIssue(myIssue);

            if (update == 1)
            {
                //Response.Redirect("program.aspx?p=" + myIssue.Program_ID);
            }
            else
            {
                top_message.Text = "Error Updating Issue Text";
            }

        }

    }
</code></pre>

<p>Right now the problem is that when the Save function is called, it errors out with a nullreferenceexception on the myIssue object. I'm not really sure why this is, because it's the exact same way i am handling other objects on some other pages, with the object declared above the page_load, initialized within the page_load, and then modified in other functions.</p>

<p>any idea why the myIssue object does not exist in that function?</p>
