title: Display True/False data type value to dropdownlist
body: <p>I like to display the value of database which is stored as True/False datatype.
  I want to render this data to dropdownlist.</p>
  
  <p>So when the value is "true" in database, i like to display it as "Yes" in dropdownlist.
  and if the value is "false" in database, i like to display as "No" in dropdownlist.</p>
  
  <pre><code>DataSet ds = getDetails(username);
  
  if (ds.Tables.Count &gt; 0) {
      TextBox1.Text = ds.Tables[0].Rows[0]["fName"].ToString();
      TextBox2.Text = ds.Tables[0].Rows[0]["lName"].ToString();
      TextBox3.Text = ds.Tables[0].Rows[0]["username"].ToString();
      TextBox2.Text = ds.Tables[0].Rows[0]["password"].ToString();
  
      if (Convert.ToInt32(ds.Tables[0].Rows[0]["admin"]) == 0) {
          DropDownList1.SelectedValue = "Yes";
  
      }
  }
  </code></pre>
  
  <p>What i have tried is, i add two items in dropdownlist, one "Yes" with value "Yes" and another "No" with value "No".</p>
  
  <p>In above code, i convert true/false to int type and compare it with another int.
  As database stores true=0 and false= -1, i compare that in the code to make dropdownlist Yes or No.</p>
  
  <p>But it is not working.
  Does anyone have easy solution to this?</p>