title: how to show records dynamically in asp.net?
body: <p>i am creating small property website, but need some help in showing records from database.</p>
  
  <p>i want this kind of results:-</p>
  
  <p><a href="http://www.99acres.com/property-in-mumbai-harbour-15-lakhs-to-20-lakhs-ffid?search_type=QS&amp;search_location=HP&amp;lstAcn=HP_R&amp;src=CLUSTER&amp;np_search_type=NP%2CR2M&amp;isvoicesearch=N&amp;keyword_suggest=mumbai%20harbour%3B&amp;class=O%2CB%2CA&amp;strEntityMap=W3sidHlwZSI6ImNpdHkifSx7IjEiOlsibXVtYmFpIGhhcmJvdXIiLCJDSVRZXzEzLCBQUkVGRVJFTkNFX1MsIFJFU0NPTV9SIl19XQ%3D%3D&amp;texttypedtillsuggestion=mumbai&amp;refine_results=Y&amp;Refine_Localities=Refine%20Localities&amp;action=%2Fdo%2Fquicksearch%2Fsearch&amp;suggestion=CITY_13%2C%20PREFERENCE_S%2C%20RESCOM_R&amp;property_type=1%2C4%2C2%2C3%2C90%2C5%2C22%2C80" rel="nofollow">http://www.99acres.com/property-in-mumbai-harbour-15-lakhs-to-20-lakhs-ffid?search_type=QS&amp;search_location=HP&amp;lstAcn=HP_R&amp;src=CLUSTER&amp;np_search_type=NP%2CR2M&amp;isvoicesearch=N&amp;keyword_suggest=mumbai%20harbour%3B&amp;class=O%2CB%2CA&amp;strEntityMap=W3sidHlwZSI6ImNpdHkifSx7IjEiOlsibXVtYmFpIGhhcmJvdXIiLCJDSVRZXzEzLCBQUkVGRVJFTkNFX1MsIFJFU0NPTV9SIl19XQ%3D%3D&amp;texttypedtillsuggestion=mumbai&amp;refine_results=Y&amp;Refine_Localities=Refine%20Localities&amp;action=%2Fdo%2Fquicksearch%2Fsearch&amp;suggestion=CITY_13%2C%20PREFERENCE_S%2C%20RESCOM_R&amp;property_type=1%2C4%2C2%2C3%2C90%2C5%2C22%2C80</a></p>
  
  <p>this is my code to show static single record from 2 tables:-</p>
  
  <pre><code>using System;
  using System.Collections.Generic;
  using System.Linq;
  using System.Web;
  using System.Web.UI;
  using System.Web.UI.WebControls;
  using System.Data.SqlClient;
  using System.Data;
  
  public partial class Result : System.Web.UI.Page
  {
      SqlConnection con;
      SqlCommand cmd,cmd1;
      SqlDataReader dr;
  
      string city1, area1, type1;
      int min, max;
      int id = 0;
      int id2 = 0;
      protected void Page_Load(object sender, EventArgs e)
      {
          city1 = Request.QueryString["city"];
          area1 = Request.QueryString["area"];
          type1 = Request.QueryString["propertytype"];
         // type1= "1bhk";
          min = Convert.ToInt32(Request.QueryString["minprice"]);
          max = Convert.ToInt32(Request.QueryString["maxprice"]);
          id = Convert.ToInt32(Request.QueryString["uid"]);
         // id = 1;
          con = new SqlConnection("integrated security=true; database=data1; server=sudhir-pc");
          con.Open();
          //cmd = new SqlCommand("select price,area,imagename,users_id from property where city='" + city1 + "' and area='" + area1 + "' and propertytype='" + type1 + "' and users_id=" + id + "", con);
          //  cmd1 = new SqlCommand("select frstname,laststname,contactno from users where users_id='"+id+"'", con);
          cmd = new SqlCommand("select price,area,imagename,users_id,available from property where city=@city1 and area=@area1 and propertytype=@type1", con);
          cmd.Parameters.AddWithValue("@city1",city1);
          cmd.Parameters.AddWithValue("@area1",area1);
          cmd.Parameters.AddWithValue("@type1",type1);
  
        //  cmd.Parameters.AddWithValue("@id",id);
          dr = cmd.ExecuteReader();
  
          while (dr.Read())
          {
              Label1.Text = (string)dr["price"].ToString();
              Label2.Text= (string)dr["area"];
              string imgstr=(string)dr["imagename"];
              int id1 = (int)dr["users_id"];
              Image1.ImageUrl = "~/upload/"+imgstr+"";
              Label13.Text = city1;
              Label14.Text = type1;
              Label16.Text = (string)dr["available"].ToString();
  
              id2 = (int)dr["users_id"];
          }
          dr.Dispose();
          cmd1 = new SqlCommand("select firstname,laststname,contactno from users where users_id=" + id2 + "", con);
          dr = cmd1.ExecuteReader();
          while (dr.Read())
          {
              Label4.Text = (string)dr["firstname"];
              Label5.Text = (string)dr["laststname"];
  
              if (id &gt; 0)
                  Label6.Text = (string)dr["contactno"];
  
  
          }
          if (id &lt; 1)
              Label6.Text = "To see contact information. Register!";
      }
  }
  </code></pre>
  
  <p>but i need to show multiple records dynamically which control should i use ?</p>