protected void Page_Load(object sender, EventArgs e)
{
string connectionstring = ConfigurationManager.ConnectionStrings["DefaultConnection"].ConnectionString;
SqlConnection sqlcon = new SqlConnection();
sqlcon.ConnectionString = connectionstring;
SqlCommand cmd = new SqlCommand();
cmd.Connection = sqlcon;
cmd.CommandType = CommandType.Text;
cmd.CommandText = "SELECT TOP 10 * FROM sample";
sqlcon.Open();
rep.DataSource = cmd.ExecuteReader();
rep.DataBind();
sqlcon.Close();
}