title: How to make an HTML row clickable while fetching data from the database (Using C#) in visual Studio
body: <p>I am creating a table header in HTML and for the table data, I am using a function which fetches data from the database and creates a table. Now, I want to make each of the rows of the table "clickable". I am not getting that how should I make the rows clickable. If someone can help me out it will of great help. HTML and C# code is provided.</p>
  
  <p>HTML CODE:</p>
  
  <p>`   </p>
  
  <pre><code>        &lt;!--Table head--&gt;
          &lt;thead class="mdb-color darken-3"&gt;
      &lt;tr class="text-white"&gt;
       &lt;th&gt;#&lt;/th&gt;
      &lt;th&gt;Equipment Name&lt;/th&gt;
      &lt;th&gt;University Name&lt;/th&gt;
        &lt;th&gt;Qty&lt;/th&gt;
        &lt;th&gt;Status&lt;/th&gt;
          &lt;th&gt;&lt;/th&gt;
              &lt;/tr&gt;
          &lt;/thead&gt;
          &lt;!--Table head--&gt;
  
          &lt;!--Table body--&gt;
               &lt;tbody&gt;
  
  
             &lt;asp:PlaceHolder ID="DBPlaceHolder1" runat="server"&gt;&lt;/asp:PlaceHolder&gt;     
  
  
  &lt;/tbody&gt;`
  </code></pre>
  
  <p>C# CODE:</p>
  
  <pre><code> public partial class List_of_Equipment{
  </code></pre>
  
  <p>: System.Web.UI.Page
      {
          string connectionString = ConfigurationManager.ConnectionStrings["MyDatabaseConnectionString2"].ConnectionString;</p>
  
  <pre><code>    protected void Page_Load(object sender, EventArgs e)
      {
          DBPlaceHolder1.Controls.Add(new Literal { Text = getStudentData().ToString()});
          Console.WriteLine(getStudentData());
      }
      public string getStudentData()
      {
          string data = "";
          using (SqlConnection conn = new SqlConnection(connectionString))
          {
              using (SqlCommand cmd = new SqlCommand("select e.Ename as ename, u.Uname as uname, eu.Equantity as quantity, eu.Estatus as status from " +
                  "Equipment e, University u, EquipmentUniversity eu where eu.Eid = e.Eid and eu.Uid = u.Uid", conn))
              {
  
                  conn.Open();
                  using (SqlDataReader sqlRdr = cmd.ExecuteReader())
                  {
                      // table = new DataTable();  
                      // table.Load(reader);  
                      if (sqlRdr.HasRows)
                      {
                          int id = 1;
                          while (sqlRdr.Read())
                          {
                              string ename = sqlRdr.GetString(0);
                              string uname = sqlRdr.GetString(1);
                              int equantity = sqlRdr.GetInt32(2);
                              string estatus = sqlRdr.GetString(3);
  
                              data += "&lt;tr&gt;&lt;td&gt;" + id + "&lt;/td&gt;&lt;td&gt;" + ename + "&lt;/td&gt;&lt;td&gt;" + uname + "&lt;/td&gt;&lt;td&gt;" + equantity + "&lt;/td&gt;" + 
                                  "&lt;/td&gt;&lt;td&gt;" + estatus + "&lt;/td&gt;" + "&lt;td&gt;" + "&lt;button class=\"btn btn-success btn-md\"&gt;Request&lt;/button&gt;&lt;button class=\"btn btn-danger btn-md\"&gt;Hold&lt;/button&gt; &lt;/td&gt;" + "&lt;/td&gt;&lt;/tr&gt;";
                              id = id + 1;
                          }
                      }
                  }
              }
              return data;
          }
      }
  }
  </code></pre>
  
  <p>}</p>