Scenario: we have a list in our MVC View, and the user has the opportunity to select several values. I would like to keep these selected values ββ(if possible?) As a comma-delimited cell value in our SQL '08 database.
The figure below shows what I'm trying to explain. Pay attention to the choice in LISTBOX Thank you in advance!
Here we save the values ββpassed in the values ββfrom the DDL position (Listbox w / mulitple highlights).
> <HttpPost()>
> Function Edit(wsmonitor As WSMonitor, ByVal vbpositionnumberDDL As Integer, ByVal PassedCounty As Integer, ByVal
> MonitorTypeDDL As String) As ActionResult
> wsmonitor.PositionNumber = vbpositionnumberDDL
> wsmonitor.MonitorType = MonitorTypeDDL
> wsmonitor.county = PassedCounty
>
> If ModelState.IsValid Then
> db.Entry(wsmonitor).State = EntityState.Modified
> db.SaveChanges()
> Return RedirectToAction("Index")
> End If
>
> Return View(wsmonitor)
> End Function
source
share