hi
i want show output this code in list box
protected void Page_Load(object sender, EventArgs e)
{
Session["userName"] = User.Identity.Name;
Label1.Text = Session["userName"].ToString();
SqlConnection connect = new SqlConnection();
connect.ConnectionString = "Data Source=.;Initial Catalog=AspNetSqlProvider;Integrated Security=True";
string q = string.Format("select UserName from aspnet_Users where UserId in(select FreindId from myFreinds where UserId in(select UserId from aspnet_Users where UserName = '{0}'))", Label1.Text);
SqlCommand cmd = new SqlCommand(q, connect);
cmd.Connection.Open();
SqlDataReader dr = cmd.ExecuteReader();
ListBox1.DataSource = dr;
ListBox1.DataBind();
cmd.Connection.Close();
}The output should be as follows for example:
susan
david
ali
but is:
http://social.msdn.microsoft.com/Forums/getfile/467340
how to fix it.thanks