How to access a string variable outside
<pre><code> public void Button1_Click(object sender, EventArgs e)
    {


        String a = DropDownList1.SelectedItem.Value;
        String b = DropDownList3.SelectedItem.Value.PadLeft(3, '0');
        String c = TextBox1.Text.PadLeft(5, '0').ToString();
        String d = TextBox2.Text.ToString();
        String digit = a + b + c + d;


        try
        {
            OdbcConnection casetype = new OdbcConnection("Driver={MySQL ODBC 3.51 Driver};Server=localhost;Database=testcase;User=root;Password=root;Option=3;");
            casetype.Open();
            //************to get case type     
            string casetypequery = "select casename from casetype where skey=?";



            //************to get case type 
            OdbcCommand casetypecmd = new OdbcCommand(casetypequery, casetype);
            String casetypefromdropdown = DropDownList3.SelectedItem.ToString();
            casetypecmd.Parameters.AddWithValue("?", casetypefromdropdown);
            using (OdbcDataReader casetypeMyReader = casetypecmd.ExecuteReader())
            {
                while (casetypeMyReader.Read())
                {
                    String casename = casetypeMyReader["casename"].ToString();

                }
            }
        }

        catch (Exception ewa)
        {
            Response.Write(ewa);
        }
</code></pre>

<p>I am not able to access</p>

<pre><code>String casename = casetypeMyReader["casename"].ToString();
</code></pre>

<p>which is inside while loop in my above code.
How can i access </p>

<blockquote>
  <p>'casename'</p>
</blockquote>

<p>outside while loop?i want to use it to put the content in HtmlEditor(ajax)</p>
