[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

Why am I getting this compile error?


my aspx page

  <asp:Button ID="Button1" runat="server" CssClass="CommandButton"
        EnableViewState="False" Text="Email event notices to registered attendees"
        ValidationGroup="EventRegAttendee" Width="269px" OnClick="EmailRegAttendeeNotices()"/>
--------------------------------------------------------------------------------------
my aspx inline code
----------------------------
   <script runat="server" language="vb">
       
       Protected Sub EmailRegAttendeeNotices_Click(ByVal sender As Object, ByVal e As EventArgs)
           
           Dim u As UserControl = TryCast(FindControl("EventDetails"), UserControl)
           Dim b As Label = TryCast(u.FindControl("lblTitle"), Label)
         
           If b IsNot Nothing Then
               Response.Write("Found lblTitle" + b.Text)
           End If
           
           Dim sb As New StringBuilder()
           'For Each dr As DataRow In ctlAttendees.grdAttendees.Rows
           'sb.Append(ctlAttendees.grdAttendees.DataKeys(dr.RowIndex)("strBadgeName").ToString())
           'sb.Append(",")
           'Next
          End Sub
   </script>
====================================================

Compile error?
=======================================================
Error      20      Argument not specified for parameter 'e' of 'Protected Sub EmailRegAttendeeNotices(sender As Object, e As System.EventArgs)'.      C:\Documents and Settings\Dennis West\Local Settings\Temp\VWDWebCache\cmaanorcalevents.com\DesktopModules\i2Integration - Events\user\Register.ascx      100      
Error      22      Argument not specified for parameter 'e' of 'Protected Sub EmailRegAttendeeNotices(sender As Object, e As System.EventArgs)'.      C:\Documents and Settings\Dennis West\Local Settings\Temp\VWDWebCache\cmaanorcalevents.com\DesktopModules\i2Integration - Events\user\Register.ascx      100      
Error      21      Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices(sender As Object, e As System.EventArgs)'.      C:\Documents and Settings\Dennis West\Local Settings\Temp\VWDWebCache\cmaanorcalevents.com\DesktopModules\i2Integration - Events\user\Register.ascx      100      
Error      23      Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices(sender As Object, e As System.EventArgs)'.      C:\Documents and Settings\Dennis West\Local Settings\Temp\VWDWebCache\cmaanorcalevents.com\DesktopModules\i2Integration - Events\user\Register.ascx      100      
=========================================================
0
westdh
Asked:
westdh
1 Solution
 
HainKurtSr. System AnalystCommented:
you should add  Handles btn.click I guess

Protected Sub EmailRegAttendeeNotices_Click(ByVal sender As Object, ByVal e As EventArgs)
-->
Protected Sub EmailRegAttendeeNotices_Click(ByVal sender As Object, ByVal e As EventArgs) handles Button1.click
0

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now