Object Data Source Error
Hello Guys, I'm new to this forum.
My ObjectDataSource connect to a custom class. However when I set the value of the ObjectDataSource from ListBox3.SelectedValue to ListBox3.Item(see attached pic), [img=http://img293.imageshack.us/img293/1318/errorobjectdatasourcegf4.th.jpg] I get the following error. Type 'System.Web.UI.WebControls.ListItemCollection' in Assembly 'System.Web, Version=184.108.40.206, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
I googled for an answer but I couldn't find one. Initially I thought it was my web.config which is causing the problem and I tried adding the following assembly
<add assembly="System.Web, Version=220.127.116.11, Culture=neutral, PublicKeyToken=B03F5F7F11D50A3A"/>
into my web.config but I still got the same error.
Do anyone know whats causing this error? Any help is greatly appreciated. Many thanks in advance! =)