title: List sparql result into asp.net component
body: <p>I want to list sparql query result into textbox(multi line) or Grid view or list</p>
  
  <p>But the code shown below returns only one result!</p>
  
  <p>Please any help?</p>
  
  <pre><code>IGraph g = new Graph();
  g.LoadFromFile("example.owl");
  
  try
  {
      SparqlQueryParser par = new SparqlQueryParser();
      SparqlQuery q = par.ParseFromString(@"PREFIX uni:&lt;http://www.semanticweb.org/salim/ontologies/2018/10/university-ontology-2#&gt;SELECT ?P_Name (COUNT(?P_Name) AS ?Material_Num)
          WHERE
          {
          ?P uni:Have ?Material;
             uni:P_Name ?P_Name.
          }
          GROUP BY ?P_Name");
  
      object results = g.ExecuteQuery(q);
  
      if (results is SparqlResultSet)
      {
          SparqlResultSet rset = (SparqlResultSet)results;
  
          foreach (SparqlResult r in rset)
          {
              TextBox1.Text = r.ToString();
              //or
              GridView1.DataSource = r.ToString();
              GridView1.DataBind();
          }
      }
  }
  </code></pre>