Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
3.00/5 (3 votes)
See more:
following is the code and error list is shown as bellow.........


VB
Protected Sub CancelButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles CancelButton.Click
        ModalPopupExtender1.Hide()
    End Sub
 Protected Sub OkButton_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles OkButton.Click
        Dim CPID As Long, CWing As Integer, CPin As String, CPrdID123 As Long, IsVery123 As Byte
        Dim DT1 As New System.Data.DataTable
        Dim DR1 As System.Data.DataRow
        CPrdID123 = 0
        LblSName.Text = M1.ExecuteQueryAndReturnValue("select MemberName from m where memberId=" & Val(TxtSID.Text))
        If LblSName.Text = "0" Then
            LblSName.Text = "NOT FOUND"
            Call M1.ShowMsg(Me, "Sponsor ID Not Found.")
            TxtSID.Focus()
            Exit Sub
        Else
            Select Case LCase(CmbWing.SelectedItem.Text)
                Case "left" : CWing = 1
                Case "right" : CWing = 2
                Case Else
                    Call M1.ShowMsg(Me, "Select Vallid Wing.")
                    CmbWing.Focus()
                    Exit Sub
            End Select
            Session("CurrentSponsor") = M1.ExecuteQueryAndReturnValue("select userId from m where memberId=" & Val(TxtSID.Text))
            CPID = M1.ExecuteQueryAndReturnValue("EXEC TakeLastChildID " & Val(Session("CurrentSponsor").ToString) & "," & CWing)
        End If
        CPin = 0
        Dim SB1 As New StringBuilder
        Dim CUID As Long, CMID As Long, CSID As Long, CFID As Long, CBV As Double, flagChk As Integer
        flagChk = 0
        CBV = 0
        CMID = GetNextMemberID()
        CUID = M1.MaxId("m", "userId")
        CSID = GetSpilOwner(Val(Session("CurrentSponsor").ToString))
        CFID = 0
        SB1.Append("INSERT INTO m(userId,memberId,parentId,spilOwner,refId,wing,joinDate,MemberName,address,birthDate,emailId,city,pincode,")
        SB1.Append("stateId,mobile,accHolder,bankName,branchName,bankCity,BusinessValue,accType,accNo,ifsccode,panNo,pwd,frId,isFr,isRoyal,")
        SB1.Append("isBinary,delmark,isPromoter,isVerified,productID,Nominm,Nomirel,flag) VALUES (" & CUID & "," & CMID & ",")
        SB1.Append(CPID & "," & CSID & "," & Val(Session("CurrentSponsor").ToString) & "," & CWing & ",'" & M1.indianDate.ToString("dd-MMM-yyyy") & "','" & UCase(TxtName.Text))
        SB1.Append("','" & UCase(TxtAdd.Text) & "','" & GMDBDate.Date.ToString("dd-MMM-yyyy") & "','" & TxtEMail.Text & "','" & UCase(TxtCity.Text))
        SB1.Append("','" & TxtPinCode.Text & "'," & Val(CmbState.SelectedItem.Value) & ",'" & TxtMobile.Text & "','" & UCase(TxtACName.Text))
        SB1.Append("','" & UCase(TxtBName.Text) & "','" & UCase(TxtBrName.Text) & "','" & UCase(TxtBCity.Text) & "'," & CBV & ",'")
        SB1.Append(UCase(TxtACType.Text) & "','" & UCase(TxtACNo.Text) & "','" & UCase(TxtIFSCCoce.Text) & "','" & UCase(TxtPANNo.Text))
        SB1.Append("','" & TxtPWD.Text & "'," & CFID & ",0,0,1,0,0," & IsVery123 & "," & CPrdID123 & ",'" & UCase(TxtNName.Text) & "','" & UCase(TxtRelation.Text) & "'," & flagChk & ");")
 If M1.ExecuteQuery(SB1.ToString) = True Then
            Call M1.SendSMS(TxtMobile.Text, TxtName.Text & ", Welcome To www.mysigma.in. Your User ID-" & CMID.ToString & ",Password-" & TxtPWD.Text)
            Session("RegDoneUID") = CMID
            Session("RegDonePWD") = TxtPWD.Text
Response.Redirect("congrates.aspx")
            Label3.Text = "Data SAVED Successfully"
        Else
            Call M1.ShowMsg(Me, "New Registration Failed.")
        End If
 End Sub
End Class



ERROR list.......

D:\mysigmaBackup\NewJoiningform.aspx.vb(284,0): error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.


D:\mysigmaBackup\NewJoiningform.aspx.vb(280,0): error BC30506: Handles clause requires a WithEvents variable defined in the containing type or one of its base types.
Posted

1 solution

http://www.google.com.au/search?sourceid=ie7&q=%22Handles+clause+requires+a+WithEvents+variable+defined+in+the+containing+type+or+one+of+its+base+types.%22&rls=com.microsoft:en-au:IE-SearchBox&ie=UTF-8&oe=UTF-8&rlz=1I7TSAU_enAU369AU369[^]

With specific error messages, the best thing to do is read them, google them, then post explaining what you've tried to fix them, instead of just posting here first off.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900