>string selValue = this.lsbUsers.SelectedItem.ToString(); >>
>string selValue = this.lsbUsers.SelectedItem.Text.ToString(); >This is what I currently have - do you think it's a bad code? I would appreciate your corrections here:
String selValue = this.lsbUsers.SelectedValue.ToString() ; bool TestUser = (String.IsNullOrEmpty(selValue)); String selText = this.lsbUsers.Text.ToString(); bool TestUserText = String.IsNullOrEmpty(selText); String SelRole = this.LsbRoles.SelectedValue.ToString(); bool TestRole = String.IsNullOrEmpty(SelRole) ; //if ((!this.lsbUsers.SelectedItem != null && this.lsbUsers.Text != string.Empty) // && this.LsbRoles.SelectedValue != null) if (TestUser == false && TestUserText == false && TestRole == false)