Repater fejl - not declared
Jeg har følgende stykke kode:<%@ Page Language="VB" Debug="True" CompilerOptions='/R:"E:\Program Files\Microsoft.NET\Odbc.Net\Microsoft.data.odbc.dll"'%>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Microsoft.Data.ODBC" %>
<html>
<head>
<title>Statistik-site for Webtermometer - Horsens</title>
<script runat="server">
'DATABASE CONNECTION
Dim strConn As String = "driver=MySQL;Server=localhost;DB=wtdb;UID=;Pwd=;"
Dim objConn As New ODBCConnection(strConn)
Public Sub Page_Load (obj As Object, e As EventArgs)
'DISPLAY RECORDS IN DATAGRID WHEN PAGE FIRST LOADS
If Not Page.IsPostBack Then
Dim objCmd As New ODBCCommand
Dim dvw As DataView
Dim ds As New DataSet
dim strSQL = "SELECT * FROM T1 order by tidspunkt desc"
dim objDA = New ODBCDataAdapter(strSQL, objConn)
objDA.Fill(ds, "T1")
dvw = ds.Tables("T1").DefaultView
ctrlRepeater.DataSource = dvw
ctrlrepeater.DataBind()
End If
End Sub
</script>
...men får følgende fejl:
BC30451: Name 'ctrlRepeater' is not declared.
i denne linie:
ctrlRepeater.DataSource = dvw
Nogen der kan hjælpe mig?
