0

I've inherited some code (not mine- I swear!) which uses a session variable in the header of the HTML to determine which javascript file to link to.

i.e.

<SCRIPT language="javascript" src="../JavaScript/<%=Session("jsFileName")%>.js"></SCRIPT>

It does work, except that it won't let me change to design view. It gives the message

"Could not open in design view. Quote Values differently inside a '<%... "value" ...%>' block."

Anyone got any suggestions as to a workaround, that doesn't involve a huge rewrite.

2 Answers 2

2

Try this:

<SCRIPT language="javascript" src='../JavaScript/<%=Session("jsFileName")%>.js'></SCRIPT>

Notice use of ' instead of " for src attribute.

Sign up to request clarification or add additional context in comments.

Comments

1

Can't you just comment out the SCRIPT tag in code view and then swith to design view?

Or replace the outer double quotes with single so you have:

src='../JavaScript/<%=Session("jsFileName")%>.js'

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.