Problem with HTML link with classic ASP [closed]

1

The following code snippet is giving me problems:

 While not rsQuery.EOF
            If vStrCurso <> rsQuery("SIGLA") Then
                ind = ind & "<p></p>"
                ind = ind & "<span><b><a href='"&vStrParametro7&"/Busca/"&rsQuery("ID_CURSO")&"/' target='blank'>"&rsQuery("SIGLA")&" - "&rsQuery("DESCR")&"</a></b></span><br/>"
                ind = ind & "<span>- <a href='"&vStrParametro7&"/Busca/"&rsQuery("ID_CURSO")&"/'&#calendario target='blank'>"&rsQuery("DT_INICIO")&" à "&rsQuery("DT_FIM")&"</a></span>"
            Else
                ind = ind & "<br/><span>- <a href='"&vStrParametro7&"/Busca/"&rsQuery("ID_CURSO")&"/'&#calendario target='blank'>"&rsQuery("DT_INICIO")&" à "&rsQuery("DT_FIM")&"</a></span><br/>"
            End If

Do not give an error message, just do not redirect. I believe that something is wrong with the bar and the quotation marks, I have tried several times but without success. Something is wrong. NOTE: The page exists.

    
asked by anonymous 15.06.2015 / 15:11

1 answer

3

In this part:

 & #calendario "' target='blank'>" &

You are trying to concatenate a #calendario variable. This is an invalid name for a variable in VBScript, so it can not exist.

Even if it were valid, the string concatenation operator (&) between that supposed variable and the next string is missing.

#calendario "' target='blank'>" &
^ erro        ^ aqui falta o operador &

If #calendário is actually an anchor of the link, then the correct code should be:

ind = ind & "<span>- <a href='" & vStrParametro7 & "/Busca/" & rsQuery("ID_CURSO") & "/#calendario' target='blank'>" & rsQuery("DT_INICIO") & " à " &rsQuery("DT_FIM") & "</a></span>"
    
15.06.2015 / 16:36