ASP.NET:Get data into Radiobuttonlist from database
<p>I am trying to insert data into radiobuttonlist from the database. but i get this error: Index was out of range. Must be non-negative and less than the size of the collection.</p>

<p>even though i have set the datatype of the field as VARCHAR(MAX). and the data in that field is a simple 4 letter word..say 'john'.</p>

<p>my code for inserting data is like this.:</p>

<p>RadioButtonList1.Items[0].Text = obj.dr["op1"].ToString();</p>

<p>RadioButtonList1.Items[1].Text = obj.dr["op2"].ToString();</p>

<p>RadioButtonList1.Items[2].Text = obj.dr["op3"].ToString();</p>

<p>RadioButtonList1.Items[3].Text = obj.dr["op4"].ToString();</p>
