Exemple #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string search = Request.QueryString["search"];

            try
            {
                var           user = new User();
                SqlDataReader dr   = user.searchUserDR(search);
                while (dr.Read())
                {
                    txtfName.Text           = dr["fName"].ToString();
                    txtlName.Text           = dr["lName"].ToString();
                    txtAddr.Text            = dr["addr"].ToString();
                    txtTel.Text             = dr["tele"].ToString();
                    rdpGender.SelectedIndex = Convert.ToInt32(dr["Gender"]);
                    Calendar1.SelectedDate  = DateTime.Parse(dr["DOB"].ToString());
                    txtEmail.Text           = dr["email"].ToString();
                    txtNIC.Text             = dr["NIC"].ToString();
                }
            }
            catch (Exception ex)
            {
            }
            txtNIC.Enabled = false;
        }