protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { // db.fillddl("select distinct(student.name) as studentname,student.lid as studentlid from student inner join teacher on student.did=teacher.did", DropDownList1, "studentname", "studentlid"); db.filldlist("SELECT * FROM CHAT where fromid=" + Session["login_id"] + " or toid=" + Session["Login_id"], DataList1); } }