Discussion in 'ASP .Net Web Controls' started by Morris Neuman, Dec 2, 2008.

  1. Hi,

    I am trying to implement the solution from the
    Walkthrough: Updating Data Using a Database Update Query in Web Forms

    In the walkthrough we are requested to drag a SqlConnection object onto the
    page from the Data tab of the Toolbox.

    I don't see SqlConnection object in my Toolbox Data tab. I right clicked
    the Data tab and selected "Choose Items", then clicked on the SqlCommand,
    SqlConnection and SqlDataAdapter, then OK, however I still do not see these
    objects in my Toolbox.

    I then added the following statement to my MasterPage, but still no help.
    <%@ Import Namespace="System.Data.SqlClient" %>

    Note, I am using a Master page and trying this walkthrough app on the
    Contents page.

    Can you please tell me how I can have these tools displayed in my toolbox?

    I am using .Net 2.0, SQL 2005
    Morris Neuman, Dec 2, 2008
    1. Advertisements

  2. Morris Neuman

    Steven Cheng Guest

    Hi Morris,

    This is a known issue due to a redesign.


    To use the SqlConnection class we don't have to show it in the Toolbar. We
    can write code in the code behind directly. You can refer to the following
    documentation to know how to write code:


    BTW, in ASP.NET 2.0, using DataSource control is a recommended way. You can
    follow the quickstart to learn how to use them.


    If you need further assistance please feel free to ask.


    Steven Cheng

    Microsoft MSDN Online Support Lead

    Delighting our customers is our #1 priority. We welcome your comments and
    suggestions about how we can improve the support we provide to you. Please
    feel free to let my manager know what you think of the level of service
    provided. You can send feedback directly to my manager at:

    Get notification to my posts through email? Please refer to

    Note: MSDN Managed Newsgroup support offering is for non-urgent issues
    where an initial response from the community or a Microsoft Support
    Engineer within 2 business day is acceptable. Please note that each follow
    up response may take approximately 2 business days as the support
    professional working with you may need further investigation to reach the
    most efficient resolution. The offering is not appropriate for situations
    that require urgent, real-time or phone-based interactions. Issues of this
    nature are best handled working with a dedicated Microsoft Support Engineer
    by contacting Microsoft Customer Support Services (CSS) at
    This posting is provided "AS IS" with no warranties, and confers no rights.
    Steven Cheng, Dec 3, 2008
    1. Advertisements

  3. Thanks for your quick reply.

    I will look at the example for the code behind.

    I do normally use DataSource control for gridview, detailview, etc.

    However I want to perform a database action based on a button_click event
    and don't know how to use a datasource control for the click event. Is there
    a way to use a datasource for the click event?
    Morris Neuman, Dec 3, 2008
  4. Hi Morris,

    The SqlDataSource control has some methods that can help to query database.
    We can call them to select, update, insert and delete records. Please check
    out the following documentations to learn how to use these methods:





    If you have further questions please feel free to ask.

    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Dec 4, 2008
  5. Hi Morris,

    Have you got the expected answer?

    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Dec 8, 2008
  6. Hi Morris,

    Have you got the expected answer?

    Allen Chen
    Microsoft Online Community Support
    Allen Chen [MSFT], Dec 8, 2008
  7. Yes thank you.
    Morris Neuman, Dec 8, 2008
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.