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 6129573
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T16:45:30+00:00 2026-05-23T16:45:30+00:00

In ObjectDataSource my checkbox is always ignored. My update method always receives NULL. What

  • 0

In ObjectDataSource my checkbox is always ignored. My update method always receives NULL. What am I doing wrong here?

Thanks.

<asp:CheckBox ID="CheckBoxSort" runat="server" Checked="true" />

CheckBox is on its own. It is not contained in any other .net controls.
….

<asp:ObjectDataSource ID="odsProfileItems" runat="server" SelectMethod="GetProfileItemsForCategory" TypeName="Valero.WEB.BO.StoreProfile.ProfileItemService"             UpdateMethod="UpdateProfileItem">
    <SelectParameters>
        <asp:Parameter Name="CategoryID" Type="Int32" />
    </SelectParameters>
    <UpdateParameters>
        <asp:ControlParameter Name="IsSorting" ControlID="CheckBoxSort" PropertyName="Checked" />
    </UpdateParameters>
</asp:ObjectDataSource>
  • 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-05-23T16:45:31+00:00Added an answer on May 23, 2026 at 4:45 pm

    When using a CheckBox control with an Object Data Source, the value to pass to the wired up ‘Update’ method needs to be of type Boolean. I do this often, take a look to my code:

     <UpdateParameters>
           <asp:Parameter Name="IsAdminUser" Type="Boolean" />
           <asp:Parameter Name="IsPowerUser" Type="Boolean" />  
     </UpdateParameters>
    

    Now just to show you as well, here is how I am binding the CheckBox on the page with data from the ‘Select’:

    <asp:CheckBox ID="chkIsAdmin" runat="server" Checked='<%# Bind("IsAdminUser") %>' />
    

    This checkbox control happens to be within a GridView, and the GridView’s datasource is the Object Data Source control, so that is where data is bound. No matter if you are using a GridView or any other control such as a plain checkbox box, you should be able to use the format above to get the checkbox bound and updated properly.

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

Sidebar

Related Questions

If I have the following (generic) ASP code: <asp:ObjectDataSource runat=server ID=myODS>...</asp:ObjectDataSource> <asp:GridView runat=server ID=myGV
<asp:ObjectDataSource ID=sourceGroups runat=server TypeName=Kurs4.Code.GroupDB SelectMethod=GetGroups> </asp:ObjectDataSource> <asp:ListBox ID=lstGroups runat=server DataSourceID=sourceGroups DataTextField=GroupName></asp:ListBox> <asp:Button ID=btnDeleteGroup runat=server
I'm using an ObjectDataSource to sort/page/filter as below: <asp:ObjectDataSource ID=odsCompaniesIndex runat=server EnablePaging=true SelectMethod=GetCompaniesSubset StartRowIndexParameterName=startRowIndex
I have the following GridView and ObjectDataSource: <asp:GridView ID=grdTrades runat=server DataSourceID=srcTrades DataKeyNames=tradeId EnablePersistedSelection=true SelectedRowStyle-BackColor=Yellow
I'm running a program with an objectdatasource and a gridview. My Update method looks
I have trouble getting a custom ObjectDataSource for an asp:ListView control to work. I
I have a ListView (in an update panel) bound to an ObjectDataSource (connected to
I have a telerik radgrid that is doing an insert using an objectdatasource. The
I have an ObjectDataSource on an ASP.NET WebForms page, that also has a data-bound
In ObjectDataSource we have a method called SelectMethod and TypeName in which we can

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.