extensión nueva para dropdownlist
This commit is contained in:
@@ -3468,6 +3468,22 @@ Namespace Extensiones
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
<Runtime.CompilerServices.Extension()>
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
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
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
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
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
Public Sub SelectedValuesIfExist(ByRef Rbl As RadioButtonList, ByRef Value As String)
|
Public Sub SelectedValuesIfExist(ByRef Rbl As RadioButtonList, ByRef Value As String)
|
||||||
Try
|
Try
|
||||||
Dim valores As String() = Value.Split(CType(",", Char()))
|
Dim valores As String() = Value.Split(CType(",", Char()))
|
||||||
|
|||||||
Reference in New Issue
Block a user