css style sheet with asp code

Discussion in 'ASP General' started by weiwei, Sep 9, 2004.

  1. weiwei

    weiwei Guest

    Hi
    I am having trouble with css style sheet with asp code, everything was
    working till I put extra of css code in there, and I got error message
    state expected end statement, anyone has idea
    thanks in advance
    wei

    below is my code

    Response.Write "<a class="three" href=""job.asp?ID=" & rs("ID") & """
    style="text-decoration: none">"
    weiwei, Sep 9, 2004
    #1
    1. Advertising

  2. double up your quotes or use '

    Response.Write "<a class='three' href='job.asp?ID=" & rs("ID") & "'
    style='text-decoration: none'>"

    that should work

    "weiwei" <> wrote in message
    news:...
    > Hi
    > I am having trouble with css style sheet with asp code, everything was
    > working till I put extra of css code in there, and I got error message
    > state expected end statement, anyone has idea
    > thanks in advance
    > wei
    >
    > below is my code
    >
    > Response.Write "<a class="three" href=""job.asp?ID=" & rs("ID") & """
    > style="text-decoration: none">"
    Steven Scaife, Sep 9, 2004
    #2
    1. Advertising

  3. weiwei

    na Guest

    Don't forget your round brackets. ;)

    response.write("<a class='three' href='job.asp?ID=" & rs("ID") &
    "'style='text-decoration: none'>Something to click</a>")

    ya.. thats the ticket

    "Steven Scaife" <> wrote in message
    news:%...
    > double up your quotes or use '
    >
    > Response.Write "<a class='three' href='job.asp?ID=" & rs("ID") & "'
    > style='text-decoration: none'>"
    >
    > that should work
    >
    > "weiwei" <> wrote in message
    > news:...
    >> Hi
    >> I am having trouble with css style sheet with asp code, everything was
    >> working till I put extra of css code in there, and I got error message
    >> state expected end statement, anyone has idea
    >> thanks in advance
    >> wei
    >>
    >> below is my code
    >>
    >> Response.Write "<a class="three" href=""job.asp?ID=" & rs("ID") & """
    >> style="text-decoration: none">"

    >
    >
    na, Sep 18, 2004
    #3
  4. weiwei

    Evertjan. Guest

    na wrote on 18 sep 2004 in
    microsoft.public.inetserver.asp.general:
    >
    >>> Response.Write "<a class="three" ...


    > Don't forget your round brackets. ;)
    >
    > response.write("<a class='three' href='job.asp?ID="
    > & rs("ID") &
    > "'style='text-decoration: none'>Something to click</a>")


    No, at least with ASP-vbscript you do not need those brackets

    response.write "Hi"

    is good

    response.write("Hi")

    works, but adds some unnecesary processing.

    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress,
    but let us keep the discussions in the newsgroup)
    Evertjan., Sep 18, 2004
    #4
  5. na wrote:
    > Don't forget your round brackets. ;)
    >
    > response.write("<a class='three' href='job.asp?ID=" & rs("ID") &
    > "'style='text-decoration: none'>Something to click</a>")
    >


    No. The parentheses (round brackets) aren't needed unless you are writing
    javascript. The places where parentheses are required in VB/VBA/vbscript are
    covered here:
    http://blogs.msdn.com/ericlippert/archive/2003/09/15/52996.aspx

    Bob Barrows

    --
    Microsoft MVP - ASP/ASP.NET
    Please reply to the newsgroup. This email account is my spam trap so I
    don't check it very often. If you must reply off-line, then remove the
    "NO SPAM"
    Bob Barrows [MVP], Sep 18, 2004
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=

    CSS style sheet not showing correctly on the server

    =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=, Nov 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    906
    =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=
    Nov 29, 2005
  2. FC
    Replies:
    4
    Views:
    889
  3. Replies:
    0
    Views:
    507
  4. Lukas Kurka

    register css style sheet

    Lukas Kurka, Oct 23, 2006, in forum: ASP .Net
    Replies:
    5
    Views:
    496
    Flinky Wisty Pomm
    Oct 24, 2006
  5. epsilon
    Replies:
    2
    Views:
    2,412
    epsilon
    Jan 23, 2008
Loading...

Share This Page