diff --git a/App_Code/modExtensiones.vb b/App_Code/modExtensiones.vb index b57e902d4..06ff258ec 100644 --- a/App_Code/modExtensiones.vb +++ b/App_Code/modExtensiones.vb @@ -3468,6 +3468,22 @@ Namespace Extensiones End Sub + Public Sub SelectedTextExist(Obj As DropDownList, Valor As Object) + + If (Obj.Items.FindByText(Valor.ToString()) IsNot Nothing) Then Obj.SelectedValue = Obj.Items.FindByText(Valor.ToString()).Value + + End Sub + + Public Sub SelectedTextLikeIfExist(ByRef Rbl As DropDownList, ByRef Valor As String) + If Valor <> "" Then + For Each item As ListItem In Rbl.Items + If item.Text.Contains(Valor) Then + item.Selected = True + End If + Next + End If + End Sub + Public Sub SelectedValuesIfExist(ByRef Rbl As RadioButtonList, ByRef Value As String) Try Dim valores As String() = Value.Split(CType(",", Char()))