D
dancer
I get this compilation error:
Handles clause requires a WithEvents variable
I know I need to declare a WithEvents variable, but I don't know how or
where.
Here is a part of the code:
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace="System.Data.Oledb" %>
<%@ Import Namespace="System.Data.DataSet" %>
<%@ Import Namespace="System.Data.Oledb.OleDbDataAdapter" %>
<%@ Import Namespace="System.IO.StringWriter" %>
<%@ Import Namespace="System.Web.UI.HtmlTextWriter" %>
<script runat="server">
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
Dim intFileNameLength As Integer
Dim strFileNamePath As String
Dim strFileNameOnly As String
If Not (UploadFile.PostedFile Is Nothing) Then
strFileNamePath = UploadFile.PostedFile.FileName
Handles clause requires a WithEvents variable
I know I need to declare a WithEvents variable, but I don't know how or
where.
Here is a part of the code:
<%@ Page Language="VB" debug="true" %>
<%@ Import Namespace="System.Data.Oledb" %>
<%@ Import Namespace="System.Data.DataSet" %>
<%@ Import Namespace="System.Data.Oledb.OleDbDataAdapter" %>
<%@ Import Namespace="System.IO.StringWriter" %>
<%@ Import Namespace="System.Web.UI.HtmlTextWriter" %>
<script runat="server">
Private Sub btnSubmit_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btnSubmit.Click
Dim intFileNameLength As Integer
Dim strFileNamePath As String
Dim strFileNameOnly As String
If Not (UploadFile.PostedFile Is Nothing) Then
strFileNamePath = UploadFile.PostedFile.FileName