locked
Data source window missing RRS feed

  • Question

  • User-1154650662 posted

    Hi!

    I have VS 2008 PRO

    In Visual web developer (ASP project in C#) I do not see the "Data Sources" window and neither the "Data" menu (I have the project and several aspx pages/forms opened).

    Where can I "find" the "Data sources" window or is it not supported for ASP.NET Web Applications ???


    Thank you!

    M

    Tuesday, December 8, 2009 5:20 AM

Answers

  • User636094332 posted

    The Data Sources window and Data menu are intentionally disabled in Websites and Web Application Projects.  If you want to connect to a database then you can use the Server Explorer window.  If you want to add a new sql express database, you can add one through the solution explorer. 

    Can you provide some details on what data source you are trying to connect to or add?

    For more information on how to write in ASP.NET please see the tutorials available at:

    http://www.asp.net/learn/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 9, 2009 5:12 PM

All replies

  • User1925485754 posted

    I thought they were added through the designer in VS2008?

    Tuesday, December 8, 2009 5:27 AM
  • User-1154650662 posted

    I thought they were added through the designer in VS2008?

    How/where should I do this?

    Tuesday, December 8, 2009 5:37 AM
  • User1925485754 posted

    Through the design view and drag the ODS onto your page or instantiate through code:

    <asp:ObjectDataSource ID="odsMain"



    Tuesday, December 8, 2009 8:12 AM
  • User-1154650662 posted

    Through the design view and drag the ODS onto your page or instantiate through code:

    1. <asp:ObjectDataSource ID="odsMain"  
    <asp:ObjectDataSource ID="odsMain"


    Thank you for the help, but:

    1. drag it from where, when I can't see it anywhere ??

    2. if I put this code in my default.aspx ("<asp:ObjectDataSource ID="odsMain" />") I get the following error: "Warning    1    Validation (ASP.Net): Element 'asp:ObjectDataSource' is missing required attribute 'runat'."


    m

    Tuesday, December 8, 2009 9:47 AM
  • User1925485754 posted

    Sorry I was being brief, are you aware of how to write ASP.NET controls?

    <asp:ObjectDataSource id="odsMyDataSource" runat="server" />


    That is very brief, there are other properties to set up, have a read here:

    http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.aspx

    Tuesday, December 8, 2009 9:49 AM
  • User-1154650662 posted

    Thanks again.


    I'm not sure if we understand each other, but I would like to have/see "Data Sources" as part of my development environment – see image:

    Screen-shot


    M
















    M

    Wednesday, December 9, 2009 2:18 AM
  • User1925485754 posted

    Have you created your solution as a project? If it is created as "New Website" you won't see it.

    Wednesday, December 9, 2009 4:03 AM
  • User-1154650662 posted

    Yes. I chose "New project..." and then "Visual C# / Web" and "ASP.NET Web Application".


    M


    Wednesday, December 9, 2009 8:24 AM
  • User636094332 posted

    The Data Sources window and Data menu are intentionally disabled in Websites and Web Application Projects.  If you want to connect to a database then you can use the Server Explorer window.  If you want to add a new sql express database, you can add one through the solution explorer. 

    Can you provide some details on what data source you are trying to connect to or add?

    For more information on how to write in ASP.NET please see the tutorials available at:

    http://www.asp.net/learn/

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, December 9, 2009 5:12 PM
  • User-1154650662 posted

    The Data Sources window and Data menu are intentionally disabled in Websites and Web Application Projects.  If you want to connect to a database then you can use the Server Explorer window.  If you want to add a new sql express database, you can add one through the solution explorer. 

    OK. Thank you.

    Monday, December 14, 2009 9:19 AM
  • User1925485754 posted

    Which is what I said... Yell

    Monday, December 14, 2009 9:56 AM
  • User447704385 posted

    I am facing the same problem; If Data Sources window and Data menu are disabled in Websites and Web Application Projects, then what type of project should I open? I want to connect to a web service for data extraction from a database to populate another database.


    Thanks.

    Monday, May 24, 2010 3:33 PM