protected void Page_Load(object sender, EventArgs e)
    {
        DataTable Dt = new DataTable();
        DataRow Dr;
        Dt.Columns.Add("Name", typeof(String));
        Dt.Columns.Add("No", typeof(String));
        Dr = Dt.NewRow();
        Dr["No"]=1;
        //int i = 1;
        Dr["Name"]="zs";
        Dt.Rows.Add(Dr);
        Session["Dt"] = Dt;
        DataRow[] Rows;
        Rows = ((DataTable)Session["Dt"]).Select("Name=zs");
        //string str1 = Rows[0]["Name"].ToString();
       // i = str1.CompareTo("zs");
        TextBox1.Text = Rows[0]["Name"].ToString();

    }
当我把Name=zs改为No=1就能选取了

相关文章:

  • 2022-12-23
  • 2021-04-17
  • 2021-05-02
  • 2022-12-23
  • 2021-11-14
  • 2022-12-23
  • 2021-12-23
  • 2021-07-13
猜你喜欢
  • 2021-12-11
  • 2022-12-23
  • 2022-01-06
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案