Sub Page_Load(sender As Object, e As EventArgs)
getProvince()
BindProvince()
If Page.IsPostBack = False Then
getProvince()
BindProvince()
End If
End Sub
Sub BindProvince()
End Sub
Public Sub getProvince()
strConnString = ConfigurationManager.ConnectionStrings("conn").ConnectionString
objConn.ConnectionString = strConnString
objConn.Open()
strSQL = "SELECT PROVINCE_ID FROM Province "
objCmd = New SqlCommand(strSQL, objConn)
Dim ds As New DataSet
Dim da As New SqlDataAdapter(objCmd)
da.Fill(ds, "Province")
'Present_Province ชื่อ dropdown ในหน้า form
Present_Province.DataSource = ds
Present_Province.DataValueField = "PROVINCE_ID"
Present_Province.DataTextField = "PROVINCE_ID"
Present_Province.DataBind()
End Sub