none
关于linq RRS feed

  • 问题

  •  

     DataClasses1DataContext db = new DataClasses1DataContext();

    checkuserClass1 cu = new checkuserClass1();
                    cu.getfromSession();
                   users user1 = db.users.First(c => c.name ==cu.username.Trim());
                    user1.mail = this.TextBox2.Text.Trim();
                  user1.password = this.TextBox1.Text.Trim();
                    user1.cellphone = this.TextBox3.Text.Trim();
                    user1.area = this.TextBox4.Text.Trim();
                   user1.description = this.TextBox5.Text.Trim();

    db.SubmitChanges();

    请问以上代码中有什么问题, 为什么不能更新textbox里的数据到数据库中,谢谢!?

     

    2012年1月5日 7:31

答案

全部回复