[thelist] ASPX: Syntax for Multi-Line String Variable

Brett Stinson brettastinson at comcast.net
Wed Oct 6 14:31:44 CDT 2004


Casey:
  Looks like you just need to specify the 'correct' property of the control
you are reading from....

If it is a label:       first_name.caption
If it is a text box:    first_name.text

Not sure if this is it, but it seems to be from the error message.
Apparently the "default" for the control you are using isn't what you want.

HTH,
Brett Stinson
bstinson at programmer.net <mailto:bstinson at programmer.net>


-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org]On Behalf Of Casey Crookston
Sent: Wednesday, October 06, 2004 2:15 PM
To: thelist at lists.evolt.org
Subject: [thelist] ASPX: Syntax for Multi-Line String Variable


I hope all this code looks like it should once I hit send...  I'm putting
together a string variable which will become the body of an email:

  emailBody = "The following was submitted from the Membership Application
form:<br><br> " & _

      "First Name = " & first_name & "<br> " & _

      "Last Name = " & last_name & "<br> " & _

      "Address 1 = " & address_1 & "<br> " & _

      "Address 2 = " & address_2 & "<br> " & _

      "City = " & user_city & "<br> " & _

      "State = " & user_state & "<br> " & _

      "Zip = " & user_zip & "<br> " & _

      "Phone = " & user_phone & "<br> " & _

      "Mail = " & user_email & "<br> " & _

      "Profession = " & user_profession & "<br> " & _

      "How did you hear = " & how_hear & "<br> " & _

      "How did you find the site = " & how_find & "<br> " & _

      "Comments = " & q_and_c & "<br>"

It bombs out on the third line.  If I make it like this:

  emailBody = "The following was submitted from the Membership Application
form:<br><br> " & _

      "First Name = " & first_name & "<br> " & _

      "Last Name = "

then it works.  here's the error:

Compiler Error Message: BC30452: Operator '&' is not defined for types
'String' and 'System.Web.UI.WebControls.Label'.

Source Error:


Line 38:   dim emailSubject as string = "!! Membership Application from
StPaulRotary.org"
Line 39:
Line 40:   emailBody = "The following was submitted from the Membership
Application form:<br><br> " & _
Line 41:       "First Name = " & first_name & "<br>Last Name = " & last_name
& "<br> "
Line 42:


--

* * Please support the community that supports you.  * *
http://evolt.org/help_support_evolt/

For unsubscribe and other options, including the Tip Harvester
and archives of thelist go to: http://lists.evolt.org
Workers of the Web, evolt !




More information about the thelist mailing list