Seems most of the examples I find are c#, so in some cases I'm left scratching my head... to make a long story short, I'm simply trying to output the selectList of items to a drop-down within my view:
My ViewModel:
Imports System.Web
Imports Whitebox.UI
Namespace ViewModels
Public Class TFS_VModel
Public Property AccType() As IEnumerable(Of LibAcctType)
Get
Return m_types
End Get
Set(ByVal value As IEnumerable(Of LibAcctType))
m_types = value
End Set
End Property
Private m_types As IEnumerable(Of LibAcctType)
End Class
End Namespace
My Controller:
Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web.Mvc
Imports Whitebox.UI
Imports Whitebox.UI.ViewModels
<HandleError()> _
Public Class TFSController
Inherits Controller
Dim _DB As New BlackBoxNormalizedEntities()
Function TFSMain() As ActionResult
Dim AccTypeList = (From m In _DB.LibAcctType Select m).ToList()
Dim viewModel As New TFS_VModel()
viewModel.AccType = AccTypeList
Return View(viewModel)
End Function
End Class
All I'm trying to do now is simply output my "SelectList" within a HTML.DROPDOWNLIST() in my view... any help would be greatly appreciate. When doing a step through, my list items are showing within my "Return view(viewmodel)" watch, but I'm stuck with performing the output.