protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { HiddenField1.Value = (string)Session["uname"]; if (HiddenField1.Value != (string)Session["uname"]) { Response.Redirect("log.aspx"); } DropDownList1.DataSource = d1.getairport(); DropDownList1.DataTextField = "name"; DropDownList1.DataValueField = "id"; DropDownList1.DataBind(); } }