近日面试的给我两道题目,一道是IQ测试,第二个就是题目所言 总共两个表 department(id int not null primary key,parentid int,name char(50)); employee(id int not null foreign key(id) references department(id) ,departmentid,name char(50)); 实现的代码记录如下 using System; using System.Collections…
用Ajax动态绑定数据库的数据:点击后台查看代码,编写代码如下 if (!IsPostBack) { using (SnailTechDataContext con = new SnailTechDataContext()) { DropDownList1.DataSource = con.Job.ToList(); DropDownList1.DataTextField = "JobName"; DropDownList1.DataValueField = "JobCode…