Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8854271
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T13:50:40+00:00 2026-06-14T13:50:40+00:00

I have an ObjectDataSource declared like this: <asp:ObjectDataSource ID=PaymentsDataSource runat=server DataObjectTypeName=Payment TypeName=PaymentAdapter SelectMethod=GetPayments> <SelectParameters>

  • 0

I have an ObjectDataSource declared like this:

<asp:ObjectDataSource ID="PaymentsDataSource"
                      runat="server"
                      DataObjectTypeName="Payment"
                      TypeName="PaymentAdapter"
                      SelectMethod="GetPayments">
    <SelectParameters>
        <asp:ControlParameter ControlID="StartDate"
                              PropertyName="Text"
                              Name="startDate"
                              Type="DateTime" />
        <asp:ControlParameter ControlID="EndDate"
                              PropertyName="Text"
                              Name="endDate"
                              Type="DateTime" />
        <asp:ControlParameter ControlID="LocationCodes"
                              PropertyName="Items"
                              Name="selectedLocationCodes"
                              Type="Object" />
    </SelectParameters>
</asp:ObjectDataSource>

The control is question is LocationCodes declared like this:

<select id="LocationCodes"
        disabled="disabled"
        runat="server"
        class="chzn-container"
        multiple=""
        data-placeholder="Choose a Location Code(s)"
        style="width: 100%;"
        data-class="span10">
</select>

The server-side Select method on the adapter is defined like this:

[DataObjectMethod(DataObjectMethodType.Select, true)]
public List<Payment> GetPayments(
    DateTime startDate,
    DateTime endDate,
    object selectedLocationCodes)
{
}

Now, even though the ListItemCollection is successfully passed into the Select method and the code in the Select method can process without error, the following error is still being thrown passively in Application_Error. Is there a way to ignore this error?

11/15/2012 13:37:49 168 (Machine=, App=34a846f1, Project=null, Dept=null, Thread=007, TraceLevel=1)
    Exception Source: mscorlib
    Exception Type: System.Runtime.Serialization.SerializationException
    Exception Message: Type 'System.Web.UI.WebControls.ListItemCollection' in Assembly 'System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' is not marked as serializable.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T13:50:41+00:00Added an answer on June 14, 2026 at 1:50 pm

    Okay, so the way I solved this was by turning ViewState off on the ObjectDataSource element by adding this ViewStateMode="Disabled".

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a basic DropDownList bound to a ObjectDataSource: <asp:DropDownList ID=DropDownList1 runat=server AutoPostBack=True DataSourceID=objDataSource1
I have the following GridView and ObjectDataSource: <asp:GridView ID=grdTrades runat=server DataSourceID=srcTrades DataKeyNames=tradeId EnablePersistedSelection=true SelectedRowStyle-BackColor=Yellow
If I have the following (generic) ASP code: <asp:ObjectDataSource runat=server ID=myODS>...</asp:ObjectDataSource> <asp:GridView runat=server ID=myGV
I have this ASP.NET code: <asp:DropDownList ID=ddlBrokers runat=server AutoPostBack=true DataSourceID=srcBrokers DataTextField=broker DataValueField=brokerId /> <asp:ObjectDataSource
In ObjectDataSource we have a method called SelectMethod and TypeName in which we can
Suppose I have a given ObjectDataSource, this objectdatasource SelectMethod property is set to GetProjectsByUsername
Issue: I have 2 datasources declared on my .aspx file as shown below: <asp:ObjectDataSource
I have an ObjectDataSource (but perhaps this question is the same for all kinds
I have trouble getting a custom ObjectDataSource for an asp:ListView control to work. I
Can someone explain exactly how/when an ObjectDataSource fires? I have an ASP.NET page, with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.