MS VBScript Compilation error 800a0401

Discussion in 'ASP General' started by Matthew Louden, Oct 9, 2003.

  1. I have no idea what's wrong with the following ASP statement:

    Response.Write "<select name=\"id\">"

    MS VBScript Compilation error 800a0401
    expected end of statement

    However, if I do the following, it will be fine:

    <select name="id">
    <%

    %>
    </select>


    any ideas??
     
    Matthew Louden, Oct 9, 2003
    #1
    1. Advertisements

  2. Response.Write "<select name=""id"">"

    Within VBScript, you escape a " with another " and not \.
     
    Manohar Kamath [MVP], Oct 9, 2003
    #2
    1. Advertisements

  3. Matthew Louden

    Ray at Guest

    The \ character is used to escape characters in jscript, not vbscript. In
    vbscript, you write "" to escape a " character in a string.
    Response.Write "<select name=""id"">"

    Ray at work
     
    Ray at, Oct 9, 2003
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.