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

  • Home
  • SEARCH
  • 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 6183067
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T01:18:16+00:00 2026-05-24T01:18:16+00:00

In my company few of the employees are using ObjectDataSource. Example snippet is :

  • 0

In my company few of the employees are using ObjectDataSource. Example snippet is :

<asp:ObjectDataSource ID="odsRequirement" runat="server" EnablePaging="True" 
                      MaximumRowsParameterName="intMaxRows"
                      SelectMethod="GetAll" 
                      StartRowIndexParameterName="intRowIndex" 
                      TypeName="MyNamespace.MyType" 
                      SortParameterName="SortString"
                      OnSelecting="odsRequirement_Selecting"
                      SelectCountMethod="GetAllCount">
    <SelectParameters>
        <asp:Parameter Name="A" DefaultValue="null" />
        <asp:Parameter Name="B" DefaultValue="null" />
        <asp:Parameter Name="C" />
        <asp:Parameter Name="D" />
        <asp:Parameter Name="E" />
    </SelectParameters>
</asp:ObjectDataSource>

Will the SelectCountMethod GetAllCount be always fired after the SelectMethod GetAll? And is there a better way we should be doing this?

Thanks in advance:)

  • 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-24T01:18:17+00:00Added an answer on May 24, 2026 at 1:18 am

    Personally I’m not a big fan of these types of controls. I much prefer getting data from the code-behind and binding the data to the page. My problem is that you’re baking domain logic into the ASPX page itself. I’d recommend seperating that by moving the code which gets the data into another class, which should be in another layer (i.e. Domain, or Model – which are usually class libraries).

    Regardless, try to get away from using this control and move the data gathering logic into another file. In the long term, you will see the benefits.

    http://geekswithblogs.net/opiesblog/archive/2006/09/11/90906.aspx

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

Sidebar

Related Questions

My site has few global configurations. For example "smtp-server address", "company address", etc. Of
I have a few tables with the following relationships: Company hasMany Jobs, Employees, and
My company is looking at using SQL Server Compact Edition 3.5 as a datastore
I have a driver that my company has been using for a few years
I am developing a website for a manufacturing company. The company has a few
My company is redoing our website over the next few months, going from a
I have been researching a few different apps lately for my company which are
I've found a few answers on how to change your company name, but is
Our company has a share point document server where the UNC looks something like
In the next few weeks, my company will be engaging multiple vendors to establish

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.