.NETv3.5,VB,IIS7 - dhtmlx.js error

I am getting the following error when I try to run the code that follows:
Line: 5
Error: Unable to get value of the property ‘appendChild’: object is null or undefined

When I use the script debugger that comes with IE, the following text is highlighted:
this.obj.firstChild.appendChild(C)

ASPX Page


[code]

[/code] ********************************************************************************

Here’s the Handler (.ashx):


[code]<%@ WebHandler Language=“VB” Class=“dhtmlxConnector.Net_Samples.dhtmlxGrid.DAV_Handler” CodeBehind=“DAV_Handler.ashx” %>

Imports System
Imports System.Collections.Generic
Imports System.Linq
Imports System.Web
Imports System.Web.Services
Imports dhtmlxConnectors
Imports System.Configuration
Imports System.Data.SqlClient
Imports System.Data

Namespace dhtmlxConnector.Net_Samples.dhtmlxGrid


’ Connector body

<WebService([Namespace]:=“http://tempuri.org/”)> _
<WebServiceBinding(ConformsTo:=WsiProfiles.BasicProfile1_1)> _
Public Class DAV_Handler
Inherits dhtmlxRequestHandler
Public Overrides Function CreateConnector(context As HttpContext) As IdhtmlxConnector
'configure grid connector
Dim connector As New dhtmlxGridConnector(“DAV”, “DAV_NUMBER, DAV_SRNO, DAV_ROAD, DAV_NAME, DAV_TOWN, DAV_ZIP”, “DAV_ID”, dhtmlxDatabaseAdapterType.SqlServer2005, ConfigurationManager.ConnectionStrings(“911conn”).ConnectionString)
If (Not (context.Request.QueryString(“dynamic”)) = “”) Then
connector.SetDynamicLoading(Convert.ToInt32(context.Request.QueryString(“dynamic”)))
End If
Return connector
End Function
End Class
End Namespace
[/code]

I have very little experience with handler (.ashx) files, so I’m a little confused as to why your C# sample (.ashx) files have code behind files but when I create a .ashx (VB) file in VS2010 for v3.5, I get no option for a code-behind file. Thanks.

The code looks fine, but you can try to alter it by adding

mygrid.init()

before mygrid.loadXML(…) command.

That was all it needed. Thanks Stanislav.