Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

String End 1

Status
Not open for further replies.

egodette

Technical User
Jun 12, 2002
222
US
I am trying to create an output file that looks like this.

<%response.write "&data=10"%>

The output so far is correct except for adding the %> at the end.

My code looks like this.

answer = "<%response.write "&""""&"&data="&FormatNumber(CDbl(rsFocus("NAV")),2)&""""

When I try putting &"%>" on the end I get an error of Unterminated string constant.

 
Is answer a server-side variable, or a client-side one? The last time you asked this question, your example was all server-side scripting.

Lee
 
>answer = "<%response.write "&""""&"&data="&FormatNumber(CDbl(rsFocus("NAV")),2)&""""
[tt]answer = "<% response.write "&data="&FormatNumber(CDbl(rsFocus("NAV")),2) %>"[/tt]
 
Then the answer you got before in your other post with the same question is the correct one. You don't use <% or %> inside server-side scripting.

Did you not like the other responses to your question?

Lee
 
I need to create a file with this single string in it to be read by another application. The string must look like this; <%response.write "&data=10"%>.
 
What kind of application? How does the other application use that string? If you want to insert that in a web page using ASP, the ASP won't execute the contents of that string, but will print it to the page directly.

Lee
 
I fixed it.. thanks for all the help you guys are great!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top