I have the below code.. i am finding a way to optimise it..
is there anyway to optimise it using findcontrol and loops ?? also eliminating headofficeSelected,areaSelected ,headofficeSelected and only using storeSelected ?
If (storeSelected = 1) Then
tempCollector = tempCollector + "<br>" + "Department" + ": " + txt_panview3_ddinput1.SelectedItem.ToString
tempCollector = tempCollector + "<br>" + "Store" + ": " + txt_panview3_input2.Text + "<br>"
End If
If (areaSelected = 1) Then
tempCollector = tempCollector + "<br>" + "Area Name" + ": " + txt_panview0_ddinput1.SelectedItem.ToString
End If
If (headofficeSelected = 1) Then
tempCollector = tempCollector + "<br>" + "Department " + ": " + txt_panview1_ddinput1.SelectedItem.ToString
End If
If (regionSelected = 1) Then
tempCollector = tempCollector + "<br>" + "Region " + ": " + txt_panview2_ddinput1.SelectedItem.ToString
End If
'
If storeSelected() = 0 Then
tempCollector = tempCollector + "<p><b>" + lbl_viewTitle2.Text + "</b>"
tempCollector = tempCollector + "<br>" + lbl_view2_ManagersEmailAddress.Text + ": " + txt_view2_ManagersEmailAddress.Text
End If