Link to home
Start Free TrialLog in
Avatar of premiertechconsulting
premiertechconsulting

asked on

WithEvents in VB 2005

Any suggestions why I get the following error: "Handles clause requires a WithEvents variable defined in the containing type or one of its base types"? It occurs on the "emlbutton" of "handles emailbutton.click." I'm a newbie so maybe this is just something simple I'm overlooking...

Public Shared Sub emlbutton_click(ByVal subject As String, ByVal messageBody As String, _
        ByVal fromAddress As String, ByVal toAddress As String, ByVal ccAddress As String) Handles emlbutton.click

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Mike Tomlinson
Mike Tomlinson
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of premiertechconsulting
premiertechconsulting

ASKER

Idle Mind,
Your are correct. I tried to to view my file in design time but VB is telling me I have errors (however, I can still view in a browser). So let's back track a little...
The error is "Cannot switch views: Validation (XHTML 1.0 Transitional): Element 'link' cannot be nested within element 'html'. " I must admit that I cheated a little in that I copied and pasted from a html view source file as that was all I had access to at the time and I need the css style sheet.  Here are the "links" that are causing the problem. I guess I don't understand why the links cannot be nested within html when the entire page is html.


<link rel="stylesheet" href="http://www.mulliganagain.com/wp-content/themes/default/style.css" type="text/css" media="screen" />
<link rel="alternate" type="application/rss+xml" title="&#8220;I&#8217;ll take my Mulligan now!&#8221; RSS Feed" href="http://www.mulliganagain.com/?feed=rss2" />
<link rel="alternate" type="application/atom+xml" title="&#8220;I&#8217;ll take my Mulligan now!&#8221; Atom Feed" href="http://www.mulliganagain.com/?feed=atom" />
<link rel="pingback" href="http://www.mulliganagain.com/xmlrpc.php" />
 
<link rel="EditURI" type="application/rsd+xml" title="RSD" href="http://www.mulliganagain.com/xmlrpc.php?rsd" />
<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="http://www.mulliganagain.com/wp-includes/wlwmanifest.xml" /> 

Open in new window

I'm glad we've narrowed down the problem...but unfortunately I have NO clue when it comes to web programming.  I simply focused on the core WithEvents/Handles error....   =(