protected void Page_Load(object sender, EventArgs e) { if (ddlYetki.Items.Count >= 0) { roless = jobs.Role(); foreach (var item in roless) { ddlYetki.Items.Add(item.PkID.ToString()); ddlYetki.Items[ddlYetki.Items.Count - 1].Value = item.PkID.ToString(); } } btnUpdate.ServerClick += BtnUpdate_ServerClick; btnClear.ServerClick += BtnClear_ServerClick; btnClear.Value = Resources.Index.Clean; btnUpdate.Value = Resources.Index.Save; users = jobs.User(); if (!Page.IsPostBack) { lblid.Text = users[0].id.ToString().Clean(); txtUserName.Value = users[0].UserName.ToString().Clean(); txtPassword.Value = users[0].Password.ToString().Clean(); txtConfirmPassword.Value = users[0].ConfirmPassword.ToString().Clean(); txtNameSurname.Value = users[0].UserName.ToString().Clean(); txtEmail.Value = users[0].Email.ToString().Clean(); string UserRole = users[0].RoleID.ToString().Clean(); ddlYetki.SelectedValue = UserRole; if (users[0].ProfilePhoto == "") { image1.ImageUrl = "Content\\img\\user2-160x160.jpg"; } else { image1.ImageUrl = users[0].ProfilePhoto.ToString().Clean(); } } }