|
|
|
| I have the following. I've tried swapping the " and ' in and around and
can't get the right syntax.
<%
varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
">Article</a>"
%>
My end results are: Type mismatch: '[string: "<a href=article.asp?"]'
Can someone lend a thought?
thanks
| |
|
| <%
varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value & "'>Article</a>"
%>
'dlbjr
'Pleading sagacious indoctrination!
| |
|
| Nope...
Type mismatch: '[string: "<a href='article.asp"]'
thanks
"dlbjr" <oops@iforgot.com> wrote in message
news:enjYsbUvEHA.1404@TK2MSFTNGP11.phx.gbl...
> <%
> varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value &
> "'>Article</a>"
> %>
>
> 'dlbjr
> 'Pleading sagacious indoctrination!
>
>
| |
|
| <%
strData = rsHead.Fields.Item("ID").Value
Response.Write strData & "<BR>"
Response.Flush
If Len(strData) > 0 Then
varA = "<a href='article.asp?id=" & rsHead.Fields.Item("ID").Value & "'>Article</a>"
End If
%>
This will let you see what is returned
--
'dlbjr
'Pleading sagacious indoctrination!
| |
| Ray Costanzo [MVP] 2004-10-28, 8:55 pm |
| Did you copy and paste that from your ASP file? And are you that that is
the line in error? I don't see anything syntactically incorrect.
Try:
<%
varA = "<a href=""article.asp?id=" & rsHead.Fields.Item("ID").Value &
""">Article</a>"
%>
Ray at home
"shank" <shank@tampabay.rr.com> wrote in message
news:ey6pjSUvEHA.3376@TK2MSFTNGP12.phx.gbl...
>I have the following. I've tried swapping the " and ' in and around and
>can't get the right syntax.
>
> <%
> varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
> ">Article</a>"
> %>
>
> My end results are: Type mismatch: '[string: "<a href=article.asp?"]'
>
> Can someone lend a thought?
> thanks
>
| |
| StephenMcC 2004-10-29, 8:55 am |
| Try loosing the db field and build the string with a dummy value, also all
variables in ASP are variants so you may need to perform a CSTR on the db
field, ie:
<%
Dim varA
'..With dummy value
varA = "<a href='article.asp?id=1'>Article</a>"
'..Then maybe
varA = "<a href='article.asp?id=" & CStr("" &
rsHead.Fields.Item("ID").Value) & "'>Article</a>"
%>
Hope this is helpful,
Stephen.
..
"shank" wrote:
> I have the following. I've tried swapping the " and ' in and around and
> can't get the right syntax.
>
> <%
> varA = "<a href=" & "article.asp?id=" & (rsHead.Fields.Item("ID").Value) &
> ">Article</a>"
> %>
>
> My end results are: Type mismatch: '[string: "<a href=article.asp?"]'
>
> Can someone lend a thought?
> thanks
>
>
>
|
|
|
|