Gerald:
That's because you have not instantiated your object yet.
Try this:
Private myDrillDownReport as New DrillDownReport
Protected _styleSheet As String
Private _IdNumber As String = "IdNumber"
Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
BindList()
End If
End Sub
Private Sub BindList()
ClientList.DataSource = myDrillDownReport.GetClients()
ClientList.DataBind()
End Sub
Venki
"Gerald" wrote:
Hi, can anyone please solve this problem?
My main page is :WebForm2.aspx
<%@ Page Language="vb" AutoEventWireup="false"
Codebehind="WebForm2.aspx.vb" Inherits="Transactions.WebForm2"%>
<%@ Import Namespace="System" %>
<%@ Import Namespace="ReportComponents" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
....
....
....
<script src="scripts.js"></script>
<script runat="server">
Protected _styleSheet As String
Private _IdNumber As String = "IdNumber"
Private Sub Page_Load(ByVal sender As Object, ByVal e As
System.EventArgs) Handles MyBase.Load
If Not IsPostBack Then
BindList()
End If
Private Sub BindList()
ClientList.DataSource = DrillDownReport.GetClients()
ClientList.DataBind()
End Sub
....
...
....
My Class is : DrillDownReport.vb
Namespace ReportComponents
Public Class DrillDownReport
Private _IdNumber As String
.
.
Public Shared Function GetClients() As ArrayList
.
.
End Function
End Class
End Namespace
THIS IS MY PROBLEM:
When the main page loads, and gets to line which says:
" ClientList.DataSource = DrillDownReport.GetClients()"
It gives this error " Compiler Error Message: BC30451: Name
'DrillDownReport' is not declared."
Can anyone give me a helping hand? Please i use codeinline for now i
can't cange to codebehind due to the nature of this particular job.
Let your answers please correspond to codeinline:
Thanks
Gerald