title: Script generating BC30205: End of statement expected. compiler error
body: <p>I am trying to alter an asp.net 2.0 script to dynamically gather values from a database based on a URL variable rather than have multiple versions of the script each with their own hard-coded values (which was how it was designed to operate).</p>
  
  <p>The error is this:</p>
  
  <pre><code>Line 51:     Private MSG_FROM As String = "valuehere"
  Line 52:     Private MSG_FROM_NAME As String = "valuehere"
  Line 53:     Private MSG_SUBJECT As String = "&lt;%# forms.FieldValue("MSG_SUBJECT", Container) %&gt;"
  Line 54:     Private MSG_BODY As String = "valuehere"
  </code></pre>
  
  <p>It is the line 53 which is the problem, which is the only variable for this test run that I set to obtain a database value. The database connection is fine and the script operates fine if the value is hard-coded.</p>
  
  <p>Could anyone give me an insight as to what the problem is? MSDN states that I must insert a line terminator. I tried a <code>/r/n</code> and <code>Environment.NewLine</code> after the second quotation mark to no avail.</p>
  
  <p>This is not really a language I understand, but I am hoping this is something very basic I need to enter.</p>
  
  <p>Thanks,
  Ben</p>
  
  <hr>
  
  <p>Some additional information as per the responses:</p>
  
  <p>MSG_SUBJECT is a call to the db cell with that name. The value is plain text to dictate the subject line of the email it will generate. Both solutions here got the script to operate, but mistook the first sent the email with a subject of &lt;%# forms.FieldValue("MSG_SUBJECT", Container) %> and the second with &lt;%# forms.FieldValue('MSG_SUBJECT', Container) %> therefore not recognising it as referencing the db table cell, but as the variable itself. Normally within the code it would say rivate MSG_SUBJECT As String = "Your completed form is attached" and the next variable would follow on the line below, i.e. address to be sent to, sent from. But really, there is little more to the code. The entire script is run server-side. While I could contain these variables within the posting form page and this would work, it is not a solution I want, as the script can also receive FDF data submitted from an acroform which has used the URL submit to facility, therefore in this mode these message variables must be included within the sever-side script. As you said, I really don't know myself whether this is even possible, it is just a punt as keeping the variables within a db is far easier to administrate and deploy new forms than having multiple versions of the script with hard-coded variables. Thanks for your assistance.</p>