|
-
Nov 15th, 2004, 07:00 AM
#1
Thread Starter
New Member
WithEvents variable error message
When I try to run the following:
Private Sub ChangeBtn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ChangeBtn.Click
Dim succ As Boolean = False
If (Page.IsValid) Then
Dim rs As Integer = UpdatePass(username.Text, userpass.Text)
If (rs > 0) Then
succ = True
End If
End If
If (succ) Then
frmchangepass.Visible = False
lblUserMessage.Text = "Your password has been changed to ..."
Else
lblUserMessage.Text = "Could not change password, please contact administrator"
End If
End Sub
I get an error message that highlights the first line of the sub and says:
"Handles clause requires a WithEvents variable."
I have to put the following code on the page and I don''t know exactly how or where:
Protected WithEvents frmchangepass As System.Web.UI.HtmlControls.HtmlForm
Thanks for any ideas.
Last edited by jarow; Nov 15th, 2004 at 07:35 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|