[VB]
If Not IsNothing(DropDownList1.Items.FindByText(strText)) Then
    DropDownList1.Items.FindByText(strTex)).Selected = True
End If


[C#]
if ((DropDownList1.Items.FindByText(str))!=null)
{
   DropDownList1.Items.FindByText(str).Selected = true;
}


arrow
arrow
    文章標籤
    FindByText DropDownList Selected
    全站熱搜

    Roger 發表在 痞客邦 留言(0) 人氣()