I'm trying to save the contents of a list back to a database using the following code.
Public Shared Sub SaveWorkItems(ByVal workItems As List(Of WorkItem))
HttpContext.Current.Sessio
n("WorkIte
ms") = workItems
Dim tableadapter As New ReOrderTableAdapterTableAd
apters.Que
stionTable
Adapter
For Each item As WorkItem In ReOrderHelper.GetWorkItems
()
tableadapter.UpdateQuery(w
orkItems.I
ndexOf(ite
m) + 1, item.QID)
Next item
End Sub
And it keeps throwing me this error. Any ideas?
System.Reflection.TargetIn
vocationEx
ception was caught
Message="Exception has been thrown by the target of an invocation."
Source="mscorlib"
StackTrace:
at System.RuntimeMethodHandle
._InvokeMe
thodFast(O
bject target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle
.InvokeMet
hodFast(Ob
ject target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeM
ethodInfo.
Invoke(Obj
ect obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Delegate.DynamicInv
okeImpl(Ob
ject[] args)
at System.Delegate.DynamicInv
oke(Object
[] args)
at AjaxControlToolkit.Reorder
List.Invok
e(Object key, EventArgs e) in C:\Documents and Settings\dwebster\My Documents\Downloads\AjaxCo
ntrolToolk
it\AjaxCon
trolToolki
t\ReorderL
ist\Reorde
rList.cs:l
ine 1627
at AjaxControlToolkit.Reorder
List.OnIte
mReorder(R
eorderList
ItemReorde
rEventArgs
e) in C:\Documents and Settings\dwebster\My Documents\Downloads\AjaxCo
ntrolToolk
it\AjaxCon
trolToolki
t\ReorderL
ist\Reorde
rList.cs:l
ine 1594
at AjaxControlToolkit.Reorder
List.Proce
ssReorder(
Int32 oldIndex, Int32 newIndex) in C:\Documents and Settings\dwebster\My Documents\Downloads\AjaxCo
ntrolToolk
it\AjaxCon
trolToolki
t\ReorderL
ist\Reorde
rList.cs:l
ine 1706
Start Free Trial