More in this section

Forums / Developing with Sitefinity / Not Finding SQLDataSource Control

Not Finding SQLDataSource Control

4 posts, 0 answered
  1. Steve
    Steve avatar
    7 posts
    Registered:
    27 Apr 2009
    25 Aug 2009
    Link to this post
    I'm using Sitefinity 3.6, trial version, and looking for the SQLDataSource control, but I'm not finding it. 

    I'm looking at the "Select a Control" list, while editing a page.  XMLDataSource is listed, under the Data category, but SQLDataSource is not listed, there or in any other category.

    Can anyone point me in the right direction to find the SQLDataSource control?

    Thanks - Steve
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    25 Aug 2009
    Link to this post
    Hello Steve,

    You can register the control under <toolboxControls> of your web.config file as below:

    <add name="SqlDataSource" section="Data" type="System.Web.UI.WebControls.SqlDataSource, System.Web, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> 

    Greetings,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Check out the tips for optimizing your support resource searches.
  3. Steve
    Steve avatar
    7 posts
    Registered:
    27 Apr 2009
    27 Aug 2009
    Link to this post
    Thanks, Ivan.  That worked.

    Now, I have this connectionString added to the web.config file:
    <add name="TestDB" connectionString="data source=111.2.3.4;UID=username;PWD=password;initial catalog=Test"
          providerName="System.Data.SqlClient" />

    Next, when editing a page in Sitefinity, that contains a SQLDataSource control, what do I enter into the ConnectionString field, within the SQLDataSource control's admin form?  Would it simply be "TestDB"?  Do I need quotes around it, etc?

    Perhaps you can point me to documentation regarding setting these fields properly.  I'm unsure of the syntax that Sitefinity requires in these fields.

    Thanks again - Steve
  4. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    12 Sep 2017
    27 Aug 2009
    Link to this post
    Hi Steve,

    Actually this is the ASP.NET control that comes from the framework. We just add a designer to its properties. As a connection string you can add web.config's connetctionString (data source=111.2.3.4;UID=username;PWD=password;initial catalog=Test) or use connection string to another database if you want to get some data stored remotely .

    Sincerely yours,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Register for webinar
4 posts, 0 answered