Hi All,
I have a gridview with a button in it, that when pressed sends an email that references information from that row of the data returned. It works, however, I receive two emails. I can't see why it does this. Any help much appreciated. The code is posted below (emails changed for privacy).
Protected Sub ImageButtonApplyNow_Click(ByVal sender As Object, ByVal e As System.Web.UI.ImageClickEventArgs)
'Define the button and row that is being referenced on click:
Dim btn As ImageButton = DirectCast(sender, ImageButton)
Dim row As GridViewRow = DirectCast(btn.NamingContainer, GridViewRow)
'Get information from the required labels in the row
Dim lblJob As Label = DirectCast(row.Cells(0).FindControl("LabelProject"), Label)
'Send an email message for notification
Const ToAddress As String = "my@email.address"
Const TestFrom As Str ...
Go to the complete details ...