protected void btnSubmitClick(object sender, EventArgs e) { lblUser.Text = string.Empty; string userName = inputUserName.Value; UserBLL users = new UserBLL(); var foundUsers = users.getUserByName(userName); foreach (var user in foundUsers) { lblUser.Text += String.Join("", user.FirstName,user.LastName) + "</br>"; } }
protected void btnSubmitClick(object sender, EventArgs e) { int UserId = Int32.Parse(inputUserId.Value); UserBLL users = new UserBLL(); User foundUser = users.getUserNameById(UserId); if (foundUser != null) { lblUser.Text = foundUser.FirstName + foundUser.LastName; } else { lblUser.Text = DisplayUser.notFound; } }