[quoted text, click to view] Roger Stenson wrote:
>
> Print #1, "Response.Write ""<a target="""_top"""
> href="""OrderItem.asp?EUPartNo="" & rsPart(""PartNo"") &
> ""&EUPartDescription="" & rsPart(""Description"") & ""&Source="" &
> rsPart(""Application"") & """">"" & rsPart(""Description"") &
> ""</a></td></tr>"""
>
> The compiler says that "_" is an illegal character. If I take out the
> 'target = _top"" bit, it points at the '?' after 'asp' and says
> 'Expression required"
>
> I would be very grateful for some advice on how to code my way past
> this problem
>
> Roger Stenson
Oh wait. I see the problems. Start off by breaking this string down (I still
suggest you assign it to a variable to make debugging easier). Let's start
with the very first line:
stop
str="Response.Write ""<a target="""_top"""
debug.print str
You have 3 quotes after target=. The third quote ends the string. I doubt
that's what you intended. Let's correct that and move on:
str="Response.Write ""<a target=""_top"""
debug.print str
str=str & href="""OrderItem.asp?EUPartNo=""
debug.print str
Again, we have an error: We have no delimiter to start the string, an extra
quote after href=, and no quote to end the string. Let's fix that:
str="Response.Write ""<a target=""_top"""
debug.print str
str=str & "href=""OrderItem.asp?EUPartNo="""
debug.print str
Then continue adding the bits on until it prints correctly to the debug
window. Then, comment out all the debug.print's and end with this statement:
Print #1,str
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"