473,395 Members | 1,678 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Both DataSource and DataSourceID are defined

Hi
I have a really strange problem, I'm working with a project in C# with
many dropdownlists and all are databound programmatically using
datasource (not datasourceid). Suddenly I am getting the error that
both datasource and datasourceid are defined for all my
dropdownlists. If I comment one out, then another one throws the
error.
I have run a search through the source code both through Visual Studio
and through File Explorer, and can find no reference to DataSourceID
anywhere. I know with 2.0, partial classes are used and you don't see
all the declarations for controls, and I suspect that is where the
problem lies, how can I find the control declarations and clean it
out?
I have tried deleting the solution file, didn't work.
Thanks in advance.

Jon

Apr 18 '07 #1
1 4558
Hi there,

Did you accidently apply filter while searching i.e *.cs? If yes please note
DataSourceID is more likely defined in aspx code. If you are sure
DataSourceID isn't anywhere, please post the code so we could see it and come
up with an idea.
--
Milosz
"byrd48" wrote:
Hi
I have a really strange problem, I'm working with a project in C# with
many dropdownlists and all are databound programmatically using
datasource (not datasourceid). Suddenly I am getting the error that
both datasource and datasourceid are defined for all my
dropdownlists. If I comment one out, then another one throws the
error.
I have run a search through the source code both through Visual Studio
and through File Explorer, and can find no reference to DataSourceID
anywhere. I know with 2.0, partial classes are used and you don't see
all the declarations for controls, and I suspect that is where the
problem lies, how can I find the control declarations and clean it
out?
I have tried deleting the solution file, didn't work.
Thanks in advance.

Jon

Apr 18 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jim Katz | last post by:
I have an application that updates a strongly typed data set at run time. I'd like to dynamically create a table that connects to a run time data table. For displaying the data, this works well. ...
3
by: misiek | last post by:
Hi all. I have following problem: 1. In my web page I have a GridView control, which does not have a DataSourceId set in designer. 2. When user presses Start button then I create...
0
by: Joao Batista | last post by:
Hi all, When i run this code, it raises a error, DataList1.DataSource = pagedData ------> ... Error ..... DataList1.DataBind() Error: Both DataSource and DataSourceID are defined on...
1
by: sck10 | last post by:
Hello, I have a GridView that has AutoGenerateSelectButton="true". When the "Select" link is clicked, it opens a FormView with the appropriate data. Below is the following SelectParameter that...
2
by: Dabbler | last post by:
I have a dropdown list in an item template of a gridveiw. I get the error "datasource cannot be set declaratively" when I try and assign an sqldatasource to the dropdown list. <ItemTemplate>...
2
by: Kelly | last post by:
I'm fairly new to ASP.NET2, but I have an ASP 3.0 background, and I've been experimenting with the DataSource and FormView widgets. I wound up having some questions along the way which I hope you...
0
by: jobs at webdos | last post by:
My challenge is I need to populate a formview's dropdownlist even when my datasource does not find a record to bind with. I'm trying to avoid binding in the codebehind. This code works works...
0
by: Kieran | last post by:
Hello, I am trying to use a GridView nested within a repeater to group items together. To do this I would like to use the output of the repeater control (int_pk_parent_definition_id) to be the...
7
by: =?Utf-8?B?U0FM?= | last post by:
I am trying to cast my Gridview in my Code behide as a Dataset so I can manipulate the data. Here is the code snippet: Dim FilteredDataSet As New System.Data.DataSet Dim gv As New GridView gv...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.