Nothing showing in results

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I've been having probs for weeks with VS.NET / ASP.NET and just established that even a simple form doesn't work. Please help; its put a hold on my project for weeks

Just ran a simple exercise from a sample chapter in this book
ran this real simple exercise: http://www.programmersheaven.com/other/BookSamples/pdf/novice to pro.pd

......but when I run it there are NO results showing in IE (or Netscape). My webform1.aspx page is blank !!! Cannot be right

Completed the exercise which sets up the SQL conn; the adapter, the dataset and binds it to the datagrid. I do as instructed in the book but nothing appears in IE!!! I mean nothing - the page is blank

Are there Config settings which are wrong ?????

HELP HELP HELP !!!
 
Please help me

here's the code in the aspx.vb file

Option Explicit On
Imports System.Data.SqlClien

Public Class WebForm
Inherits System.Web.UI.Pag
Protected WithEvents northwindConnection As System.Data.SqlClient.SqlConnectio
Protected WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlComman
Protected WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlComman
Protected WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlComman
Protected WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlComman
Protected WithEvents Button1 As System.Web.UI.WebControls.Butto
Protected WithEvents adap As System.Data.SqlClient.SqlDataAdapte
Protected WithEvents ds As DBtest.DataSet
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGri

#Region " Web Form Designer Generated Code

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Loa
'Put user code to initialize the page her
adap.Fill(ds
End Su

End Clas

a 'northwindConnection' as the connection
'adap' as the adapter for the employee
'ds' as the datase

PLEASE HELP.
 
It seems there are no UI control bind to the dataset. usually , it is a
datagrid.


dazza said:
Please help me.

here's the code in the aspx.vb file:

Option Explicit On
Imports System.Data.SqlClient

Public Class WebForm2
Inherits System.Web.UI.Page
Protected WithEvents northwindConnection As System.Data.SqlClient.SqlConnection
Protected WithEvents SqlSelectCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlInsertCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlUpdateCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents SqlDeleteCommand1 As System.Data.SqlClient.SqlCommand
Protected WithEvents Button1 As System.Web.UI.WebControls.Button
Protected WithEvents adap As System.Data.SqlClient.SqlDataAdapter
Protected WithEvents ds As DBtest.DataSet1
Protected WithEvents DataGrid1 As System.Web.UI.WebControls.DataGrid

#Region " Web Form Designer Generated Code "

Private Sub Page_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load
 
i have got a datagrid in the webform called 'datagrid1', and have selected 'ds' as my data source, and 'employees' as my datamember.

the 'adap.Fill(ds)' in my page_load as previous post should simply bind the info ???

the adapt = my adapter
the ds = my dataset

please help
 
Hi Daza,

Add this after that fill in the load event
datagrid1.datasource = ds
datagrid1.databind

I hope this helps?

Cor
 
Cor - fantastic -I can now see the results

Looking at my code, I followed exactly what was written for that example (though admitedly I think that was a Windows and not a Web App example) so wonder why that didn't happen

I have the MS Press Book 'building web apps with VB.NET/c#.NET' but not finding it useful, so now looking for a ADO.NET or ASP.NET book. I've seen various but not sure which to purchase, do you know of any? considering I am fairly new to VB / ASP.NET

Thanks anyway
 
Back
Top