blair

blair

  • NA
  • 4
  • 0

Retrieving Data in Code

Sep 28 2004 3:59 PM
I want to create a mail service that (1) looks up a recommended subject heading in a database and (2) inserts that heading on the screen’s form. The sender is free to keep that heading or change it. When the service sends the email, it takes the subject from the subject textbox and uses that as the mail object’s subject property. The problem is that I cannot get the server to recognize the name of the subject box. I have named the subject text box “tbSubject”; however, when I try to use that name in code I get an exception stating that tbSubject is undeclared. Of course, it has been declared, but it is part of a datalist. I have tried to use the datalist name as in: dlSubject.tbSubject.Text or dlSubject.ItemTemplate.tbSubject.Text. That doesn’t work either. Surely there is some simple way to refer to the text in a textbox that contains bound data.

Answers (1)