• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1097
  • Last Modified:

Compiler Error Message: BC30506: Handles clause requires a WithEvents variable.

hi,

Please assist how can we resolve the error? I'm using visual web developer 2005 express edition.

referece too
http://aspalliance.com/articleViewer.aspx?aId=21&pId=#Page1

scroll down to:
3.7 Using the TemplateSelection event



thanks.

Compilation Error
Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.
Compiler Error Message: BC30506: Handles clause requires a WithEvents variable.
Source Error:
Line 57:     End Function
Line 58:
Line 59:     Private Sub HG1_TemplateSelection(ByVal sender As Object, ByVal e As DBauer.Web.UI.WebControls.HierarGridTemplateSelectionEventArgs) Handles HG1.TemplateSelection
Line 60:         e.TemplateFilename = "Templates\\" + e.Row.Table.TableName + ".ascx"
Line 61:     End Sub
Source File: c:\inetpub\wwwroot\test.aspx    Line: 59
0
RyanBank
Asked:
RyanBank
  • 3
  • 2
1 Solution
 
Bob LearnedCommented:
Look where HG1 is defined, and it show that, please.

Bob
0
 
RyanBankAuthor Commented:
<%@ Page Language="vb" AutoEventWireup="false" %>
<%@ Register TagPrefix="DBWC" Namespace="DBauer.Web.UI.WebControls" Assembly="DBauer.Web.UI.WebControls.HierarGrid" %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.Data.SqlClient" %>
<script runat="server">

.....
            &nbsp;<DBWC:HierarGrid ID="HG1" runat="server" TemplateDataMode="Table">
            </DBWC:HierarGrid>
0
 
Bob LearnedCommented:
What version of the HierarGrid do you have?  Is it the latest?

Bob
0
 
RyanBankAuthor Commented:
v2.2

thanks
0
 
RyanBankAuthor Commented:
I got it to work, place a comment on the code below.
'Handles HG1.TemplateSelection


can you kindly assist on this please:
http://www.experts-exchange.com/Programming/Programming_Languages/Dot_Net/ASP_DOT_NET/Q_21876224.html
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now