سلام.من براي نمايش اطلاعات بانك در ديتا گريد اين كدها رو نوشتم .خطا نميده ولي نمايش هم نميده.يعني صفحه كاملا لود ميشه ولي فقط گريد نمايش داده نميشه.
****البته همين كدها تو برنامه ساده C# (ويندوز اپلكيشن) به درستي اجرا شد.****
string Conn;
Conn = "Data Source=.;Initial Catalog=forushgah;Integrated Security=True";
SqlConnection Connection = newSqlConnection(Conn);
SqlDataAdapter da = newSqlDataAdapter();
da.SelectCommand= newSqlCommand();
da.SelectCommand.Connection = newSqlConnection();
da.SelectCommand.Connection.ConnectionString = Conn;
da.SelectCommand.CommandText = "select * from users";
DataSet ds = newDataSet();
Connection.Open();
da.Fill(ds);
DataTable dt = newDataTable();
dt = ds.Tables[0];
GridView1.DataSource = dt;
Connection.Close();