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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T11:58:51+00:00 2026-05-22T11:58:51+00:00

I have a DataList which is bound to a SqlDataSource, Ive got a LINQ

  • 0

I have a DataList which is bound to a SqlDataSource,
Ive got a LINQ query which the users can use to narrow down the data, I’m making the DataSource = the LINQ on the click event of a button.

I get an error as the list has a DataSourceID and now I’m giving it a DataSource.

Think this would work if i removed the datasourceid first with code before binding to the new LINQ?
If so, any hints on how to do this?

Thanks.

  • 1 1 Answer
  • 1 View
  • 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-22T11:58:52+00:00Added an answer on May 22, 2026 at 11:58 am

    BaseDataBoundControl, BaseDataList, etc has 2 options how data can be bound to:

    • DataSource (like LINQ result)
    • DataSourceId (like SqlDataSource)

    Use one of them, or null first before assigning second.

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

Sidebar

Related Questions

I am using datalist to display data from the database,I have got three fields
I have a DataList on my webpage, which I am populating through a data
I have a page with few listview and a few datalist, which are bound
I have a form with containing a datalist which is bound to a datasource
I have a datalist control which some controls(ex: button) are in it. I want
I have the following code which is created with a datalist control: http://jsfiddle.net/vmE2E/1/ But
I have a DataList control that displays a set of elements. Can anyone point
i have a datatable which connected to DB... i want make the data inside
I have a Datalist which renders a list of checkboxes and value attributes on
I have a datalist with itemtemplate which contains: an anchor and an href tag

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.