title: asp repeater button text change
body: <p>Good day, I want the text of the button inside the repeater to change dynamically based on what the sql selected values would have. </p>
  
  <p>here's my code:</p>
  
  <p>asp.cs</p>
  
  <pre><code>if (!IsPostBack) 
  {
     string getEmp = "Select employeeid, photo, lastname, firstname, departmentname, designation,userType from tblEmployee e inner join tblDepartment d on d.departmentid=e.department";
     SqlCommand com = new SqlCommand(getEmp,con);
     con.Open();
     SqlDataReader dr = com.ExecuteReader();
     Button btnSet = (Button)FindControl("btnSet");
     if (dr.HasRows)
     {
        if (dr.Read())
        {
           if (btnSet != null)
           {
               if (dr["userType"].ToString() == "2")
               {
                  btnSet.Text = "Set as Normal User";
               }
               else
               {
                  btnSet.Text = "Set as Power User";
               }
           }
        } 
     }
     Repeater1.DataSource = dr;
     Repeater1.DataBind();
     dr.Dispose();
     con.Close();
  </code></pre>
  
  <p>aspx</p>
  
  <pre><code>&lt;asp:Repeater ID="Repeater1" runat="server" DataSourceID="SqlDataSource1"&gt;
  &lt;asp:Button ID="btnSet" commandname="set" commandargument=&lt;%# Eval  ("employeeid") %&gt; runat="server" class="tiny success expand button"  Text="" /&gt;
  </code></pre>
  
  <p>   </p>