Protected Sub DDLJob1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedValue = "งานอื่นๆ" Then
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub
Tag : ASP.NET Ms Access, Web (ASP.NET), VB.NET, VS 2010 (.NET 4.x), VS 2012 (.NET 4.x)
Protected Sub DDLJob1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedValue = DDLJob1.Items.IndexOf(DDLJob1.Items.FindByValue("งานอื่นๆ")) Then
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub
Code (ASP)
Protected Sub DDLJob1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedIndex = DDLJob1.Items.IndexOf(DDLJob1.Items.FindByValue("งานอื่นๆ")) Then
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub
Code (ASP)
Protected Sub DDLJob1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedIndex = DDLJob1.Items.IndexOf(DDLJob1.Items.FindByText("งานอื่นๆ")) Then
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub
Protected Sub DDLJob1_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedIndex = DDLJob1.Items.IndexOf(DDLJob1.Items.FindByValue("งานอื่นๆ")) Then
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub
Protected Sub DDLJob1_SelectedIndexChanged1(ByVal sender As Object, ByVal e As System.EventArgs) Handles DDLJob1.SelectedIndexChanged
If DDLJob1.SelectedItem.Value = "งานอื่นๆ" Then // แก้ตรงนี้ครับ
txtJob1.Enabled = True
Else
txtJob1.Enabled = False
End If
End Sub