title: Show/Hide div tags within an ASP Repeater C#
body: <p>I want to be able to show /hide "div tags" based on user roles.</p>
  
  <p>Some people will see somethings and others will not. This is easy outside of the repeater. Obviously <code>d1.Visible = false;</code> does not work.</p>
  
  <p>I have searched the web including Stack and to no avail. It is more of an issue of which direction would be appropriate. </p>
  
  <p>Code - Inline--</p>
  
  <pre><code>protected void Eng_SelectedIndexChanged(object sender, EventArgs e)
  
  {
  
  sqlInv = "Select Item1, Item2, Item3, From Table";
  
  IDataReader reader6 = DatabaseHelper.GetReader(string.Empty, sqlInv);
  
  
      Repeater1.DataSource = reader6;
  
          Repeater1.DataBind();
  
          reader6.Close();
  
  }
  </code></pre>
  
  <p>html</p>
  
  <pre><code>asp:Repeater runat="server" id="Repeater1"&gt;
  
  itemtemplate&gt;
  
  div&gt;
  div id="d1" runat="server"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "Item1") %&gt;/div&gt;
  
  &lt;div id="d2" runat="server"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "Item2") %&gt;/div&gt;
  
  div id="d3" runat="server"&gt;&lt;%# DataBinder.Eval(Container.DataItem, "Item3") %&gt;/div&gt;
  
  
  /itemtemplate&gt;
  
  /asp:Repeater&gt;
  
  
  /div&gt;
  </code></pre>