The DataSourceID of 'visitSecDropDown' must be the ID of a control of type IDataSource.  A control with ID 'rydhaveSrc' could not be found.

Posted on 2010-03-30
Medium Priority
Last Modified: 2012-05-09
I am geting this error when i try and load my website, and i can't quite figure out why? I've googled a bit and not found a solution that helps me.

The DataSourceID of 'visitSecDropDown' must be the ID of a control of type IDataSource.  A control with ID 'rydhaveSrc' could not be found.

bellow is the given code

<asp:DropDownList ID="visitSecDropDown" runat="server" DataSourceID="rydhaveSrc"
                                                        DataTextField="Rydhave" DataValueField="ID" Width="155px">
                                                    </asp:DropDownList><asp:CompareValidator ID="CompareValidator1" runat="server" 

                                                        CultureInvariantValues="True" ErrorMessage="Please select section of visit" 

                                                        ValueToCompare="Select One">*</asp:CompareValidator>

Open in new window

Question by:Vx_Chemical
  • 2
LVL 22

Expert Comment

by:Om Prakash
ID: 29082075
Add <asp:SqlDataSource ... which is missing
<asp:SqlDataSource ID="sda_nw1" runat="server" ConnectionString='<%$ ConnectionStrings:NORTHWIND %> '         SelectCommand="SELECT orders.customerid, ContactName, count(OrderID) as numorders FROM orders join customers on orders.CustomerID=Customers.CustomerID group by orders.customerid, ContactName order by ContactName"         ProviderName="System.Data.SqlClient" OldValuesParameterFormatString="original_{0}">        </asp:SqlDataSource> <asp:DropDownList ID="DropDownList1" runat="server" DataSourceID="sda_nw1" DataTextField="customerid"            DataValueField="customerid">        </asp:DropDownList><br />

Open in new window

LVL 22

Accepted Solution

Om Prakash earned 500 total points
ID: 29082237
      ConnectionString='<%$ ConnectionStrings:NORTHWIND %> '        
      SelectCommand="SELECT ID, Rydhave FROM table_name"        
      ProviderName="System.Data.SqlClient" OldValuesParameterFormatString="original_{0}">        


Author Comment

ID: 29170923
Yes. i had some how killed my data source, now im getting something else though.

DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Garden'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: DataBinding: 'System.Data.DataRowView' does not contain a property with the name 'Garden'.

Source Error:

anyone who can solve this mystery?

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Article by: Najam
Having new technologies does not mean they will completely replace old components.  Recently I had to create WCF that will be called by VB6 component.  Here I will describe what steps one should follow while doing so, please feel free to post any qu…
Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
In this video I will demonstrate how to set up Nine, which I now consider the best alternative email app to Touchdown.
From store locators to asset tracking and route optimization, learn how leading companies are using Google Maps APIs throughout the customer journey to increase checkout conversions, boost user engagement, and optimize order fulfillment. Powered …

624 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question