|
Question : Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices_Cl<wbr />ick(sender<wbr /> As Object, e As System.EventArgs)'.
|
|
I have list both the control frontpage and code behind -
why am i getting this error ---
Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices_Click(sender As Object, e As System.EventArgs)'.
=======================================================
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="EmailCompanyAttendees.ascx.vb" Inherits="DesktopModules_i2Integration___Events_controls_EmailCompanyAttendees" %>
ValidationGroup="EventRegAttendee" Width="312px" OnClick="EmailRegAttendeeNotices_Click()" />
==========================================================
Imports System Imports System.Data Imports System.Data.SqlClient Imports System.Configuration Imports System.Collections Imports System.IO Imports System.Text Imports System.Xml Imports System.Web Imports System.Web.Security Imports System.Web.UI Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls.WebParts Imports System.Web.UI.HtmlControls Imports System.Net.Mail
Partial Class DesktopModules_i2Integration___Events_controls_EmailCompanyAttendees Inherits System.Web.UI.UserControl
Protected Sub EmailRegAttendeeNotices_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Dim u1 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a1 As Label = TryCast(u1.FindControl("lblEventID"), Label) Dim str1 As String str1 = "Event ID: " + a1.Text + " "
Dim u2 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a2 As Label = TryCast(u2.FindControl("lblStatus"), Label) Dim str2 As String str2 = "Event Status: " + a2.Text + " "
Dim u3 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a3 As Label = TryCast(u3.FindControl("lblTitle"), Label) Dim str3 As String str3 = "Event Title: " + a3.Text + " "
Dim u4 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a4 As Label = TryCast(u4.FindControl("lblDate"), Label) Dim str4 As String str4 = "Event Date: " + a4.Text + " "
Dim u5 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a5 As Label = TryCast(u5.FindControl("lblSummary"), Label) Dim str5 As String str5 = "Event summary: " + a5.Text + " "
Dim u6 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a6 As Label = TryCast(u6.FindControl("lblDetails"), Label) Dim str6 As String str6 = "Event details: " + a6.Text + " "
Dim u7 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a7 As Label = TryCast(u7.FindControl("lblViewStart"), Label) Dim str7 As String str7 = "Event View Start Date: " + a7.Text + " "
Dim u8 As UserControl = TryCast(FindControl("EventDetails"), UserControl) Dim a8 As Label = TryCast(u8.FindControl("lblViewEnd"), Label) Dim str8 As String str8 = "Event View End Date: " + a8.Text + " "
Dim Bodytext As String = str1 + str2 + str3 + str4 + str6 + str7 + str8 'If str <> "" Then 'Response.Write("Found lblTitle" + Str()) 'End If
Dim sb As New StringBuilder() 'For Each dr As DataRow In ctlAttendees.GetGrdAttendees.Rows() 'sb.Append(ctlAttendees.grdAttendees.DataKeys(dr.RowIndex)("strBadgeName").ToString()) 'sb.Append(",") 'Next
If sb.ToString() = "" Then 'Response.Write(sb.ToString()) Dim msg As New MailMessage("dennis@dianewestdesign.com", "[email protected]") msg.Subject = str3 'txtEmailSubject.Value msg.Body = Bodytext 'txtArea.Value
Dim sc As New SmtpClient("smtp.dianewestdesign.com", 25) sc.Credentials = New Net.NetworkCredential("dennis@dianewestdesign.com", "programmer") sc.EnableSsl = False Try sc.Send(msg) Response.Write("Email Has been sent successfully.") Catch ex As Exception Response.Write(ex.Message) End Try End If
End Sub End Class
|
|
Answer : Argument not specified for parameter 'sender' of 'Protected Sub EmailRegAttendeeNotices_Cl<wbr />ick(sender<wbr /> As Object, e As System.EventArgs)'.
|
|
Instead OnClick="EmailRegAttendeeNotices_Click()"
try
OnClick="EmailRegAttendeeNotices_Click"
|
|
|
|