Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

compiler error

Posted on 2006-07-20
2
Medium Priority
?
192 Views
Last Modified: 2010-04-23
Hi:

Can you tell the reason for the following compilation error when I
try to view my new web page, with a data connection:

Compiler Error Message: BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.

Source Error:

Line 3:      Inherits System.Web.UI.Page
Line 4:  
Line 5:      Protected Sub SqlDataSource2_Selecting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.SqlDataSourceSelectingEventArgs) Handles SqlDataSource2.Selecting
Line 6:  
Line 7:      End Sub

Thanks,
Phil Miller
 
0
Comment
Question by:pillmill
2 Comments
 
LVL 24

Accepted Solution

by:
Justin_W earned 1000 total points
ID: 17148264
Wherever you have declared SqlDataSource2, it needs to look something like this:
   Protected WithEvents SqlDataSource2 As ...
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: jpaulino
XML Literals are a great way to handle XML files and the community doesn’t use it as much as it should.  An XML Literal is like a String (http://msdn.microsoft.com/en-us/library/system.string.aspx) Literal, only instead of starting and ending with w…
Introduction When many people think of the WebBrowser (http://msdn.microsoft.com/en-us/library/2te2y1x6%28v=VS.85%29.aspx) control, they immediately think of a control which allows the viewing and navigation of web pages. While this is true, it's a…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

885 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question