I've got a number of fields on a form (all called "txt{something}" eg txtHomeTelephoneNumber) and I want to be able to quickly set them in code, ideally without typing every time
txtHomeTelephoneNumber.Text = PimContact.HomeTelephoneNumber
is there a quicker way (or at with least less typing)?
for instance in classic ASP I could do
setField(fldName)
sub setField(fldName)
eval("txt" & fldName & ".Text = PimContact." & fldName)
end sub
I know I'm just being lazy
txtHomeTelephoneNumber.Text = PimContact.HomeTelephoneNumber
is there a quicker way (or at with least less typing)?
for instance in classic ASP I could do
setField(fldName)
sub setField(fldName)
eval("txt" & fldName & ".Text = PimContact." & fldName)
end sub
I know I'm just being lazy