Wrox Programmer Forums
Classic ASP Databases Discuss using ASP 3 to work with data in databases, including ASP Database Setup issues from the old P2P forum on this specific subtopic. See also the book forum Beginning ASP.NET Databases for questions specific to that book. NOT for ASP.NET 1.0, 1.1, or 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Databases section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 23rd, 2005, 08:57 PM
Authorized User
Join Date: Feb 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts
Default Cannot display Datagrid on ASP.Net

     I am using ASP.Net1.1 on my Windows 2000 Terminal Server. I have a Datagrid on the Form and I want to populate the grid with the data.

I get no errors when I run the form but I cannot see any grid or data.

What am I missing here? I am new to ASP.Net


Old February 23rd, 2005, 09:01 PM
Authorized User
Join Date: Feb 2005
Posts: 21
Thanks: 0
Thanked 0 Times in 0 Posts

Here is my attached code. Thanks

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        'Put user code to initialize the page here

        Dim strConn As String
        Dim sSql As String = "select * from products"

        strConn = "Initial Catalog = NORTHWIND; data source = SERVER;uid=;pwd=;Trusted_Connection=Yes"

        Dim cn As New SqlConnection
        cn.ConnectionString = strConn

        Dim adapter As New SqlDataAdapter(sSql, cn)
        Dim dSet As New DataSet


        Dim table As DataTable = dSet.Tables(0)

        DataGrid1.DataSource = table
    End Sub

Similar Threads
Thread Thread Starter Forum Replies Last Post
display messagebox in ASP.Net with VB.Net suresh_accudocs ASP.NET 1.0 and 1.1 Basics 7 November 5th, 2014 06:31 PM
display .tiff in asp.net eraldov ASP.NET 1.0 and 1.1 Basics 3 May 11th, 2007 05:31 PM
Display the record ASP.NET Venkatesan ASP.NET 1.0 and 1.1 Basics 3 December 20th, 2006 11:37 AM
Cannot display datagrid on ASP webform smujib Classic ASP Basics 6 March 11th, 2005 09:12 AM
display .tiff in asp.net eraldov ASP.NET 1.x and 2.0 Application Design 1 September 17th, 2004 09:00 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.