How to populate records with checkboxes in Outlook


New member
Sep 20, 2013
Programming Experience
Hello, I am currently unable to populate all the records from a page into the body of an outlook message. What I have done so far populates the records from a parent-child page into the body . however, it only populates the first record.

I want to be able to populate all those child records that are checked as received and have current date on the itemrecddate field. Some parents have just one and some might have multiple child records. It only pulls the first record and displays it in the outlooks.

Can someone please help me on this: Here is my code :

Public Overrides Sub PushButton1_Click(ByVal sender As Object, ByVal args As System.EventArgs)

' ' MyBase.PushButton1_Click(sender, args)

Dim itemrecvd As CheckBox = CType(Me.Page.FindControlRecursively("itemrecvd"), System.Web.UI.WebControls.CheckBox)

'Dim itemrecvddate As TextBox = CType(Me.Page.FindControlRecursively("itemrecvddate"), System.Web.UI.WebControls.TextBox)

'Dim recvddate As String = itemrecvddate.Text

If itemrecvd.Checked = True Then

Dim emailadd As String = UserEmail0.Text

Dim reqno As String = Requisition_.Text

Dim reqitem As TextBox = CType(Me.Page.FindControlRecursively("reqItem"), System.Web.UI.WebControls.TextBox)

Dim reqItemno As String = reqitem.Text

Dim reqQTY As TextBox = CType(Me.Page.FindControlRecursively("reqqty"), System.Web.UI.WebControls.TextBox)

Dim qty As String = reqQTY.Text

Dim requnit As TextBox = CType(Me.Page.FindControlRecursively("requnit"), System.Web.UI.WebControls.TextBox)

Dim unit As String = requnit.Text

Dim itemdescription As TextBox = CType(Me.Page.FindControlRecursively("itemdescription"), System.Web.UI.WebControls.TextBox)

Dim description As String = itemdescription.Text

Dim address As String

Dim subject As String

'Dim cc As String

'Dim bcc As String

Dim body As String

address = emailadd

subject =
"The following Items have been received for Req #:" & reqno

'cc = ""

'bcc = ""

body =
"Item:" & reqItemno & " Quantity:" & qty & " Unit:" & unit & " Item Description:" & description

Dim str As String = String.Format("mailto:{0}?subject={1}&body={2}", address, subject, body)

Me.GetType(), "mailto", "<script type = 'text/javascript'>" & "parent.location='" + str + "'</script>")


Me, "Error", "No Item Received as of today")


End If


End Sub
Top Bottom