select items in a checkbox list based on their text
<p>i have a check box list in my asp.net page ...i need to select the check box based on their text...am getting these string values form the database and storing it in a array.....the below code works fine for a single text ..What should i do in case of array..how should i pass the array values in the if loop</p>

<pre><code> for (int i = 0; i &lt; chkbx.Items.Count; i++)
        {
            if (chkbx.Text == "Dress" )

            {

                chkbx.Items[i].Selected = true;

            }
        }
</code></pre>
