…requires a withevents variable…

If I have a page with codebehind like this:

 Page1.aspx:

<%@ Page Language="VB" AutoEventWireup="false" CodeFile="propDetails.aspx.vb" Inherits="home_search_propDetails" %>

<asp:imageButton ID="contactAgentbtn" height="20" ImageUrl="../images/contact-agent-icon.gif" runat="server" width="131" />

Page1.aspx.vb

Partial Class home_search_propDetails
    Inherits System.Web.UI.Page

    Protected Function contactAgentBtn_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs) Handles contactAgentbtn.Click
        requestInformationTable.Visible = True
    End Function

…I get an error saying that the contactAgeentBtn_Click line requires a "withevents variable" – which is odd because in the same page I have other imageButtons that don't have this problem. What is the issue?

Read More

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s