Problem writing ASP code via ASP

Results 1 to 3 of 3

Thread: Problem writing ASP code via ASP

  1. #1
    Hud Guest

    Default Problem writing ASP code via ASP

    I am trying to write a ASP script from an ASP script when a user select certain parameters. It creates a web page with some ASP features built in. <BR><BR>Problem: Writing " doesn&#039;t work. You can&#039;t use &#039; because HTML doesn&#039;t recognize them. So my SESSION("AFFNO") = "12345" doesn&#039;t come out right and doesn&#039;t work. The page bombs. My latest ploy seen here doesn&#039;t work either. I was trying to do it with "quot", which this message board things is parsing into " here. <BR><BR>Anyone know how to write a line of text in ASP and have it put in double quotes?<BR><BR><BR>AFFSTR = "SESSION("AFFNO")="" & RID & """<BR>NEWPAGE = "members/" & PAGENM & "/top.asp"<BR>whichFN=server.mappath(NEWPAGE)<BR>Set fstemp = server.CreateObject("Scripting.FileSystemObject")< BR>Set filetemp = fstemp.CreateTextFile(whichFN, true)<BR>filetemp.WriteLine("&#060;HTML&#062;")<BR >filetemp.WriteLine("&#060;head&#062;")<BR>filetem p.WriteLine("&#060;link rel=stylesheet href=../style2.css type=text/css&#062;")<BR>filetemp.WriteLine("&#060;" & "%")<BR>filetemp.WriteLine(AFFSTR)<BR>filetemp.Wri teLine("%" & "&#062;")

  2. #2
    Join Date
    Dec 1969

    Default Same as with SQL...

    In SQL, we use a pair of &#039; to indicate that you want a single &#039; in the output.<BR><BR>In VBS, we use a pair of " to indicate that you want a single " in the output.<BR><BR>SO:<BR>&nbsp; &nbsp; Response.Write "He said, ""This is how to do it!"" "<BR>produces<BR>&nbsp; &nbsp; He said, "This is how to do it!"<BR><BR>and<BR>&nbsp; &nbsp; AFFSTR = "SESSION(""AFFNO"")=""" & RID & """"<BR>puts the string<BR>&nbsp; &nbsp; SESSION("AFFNO")="12345"<BR>into the variable AFFSTR.<BR><BR>Etc.<BR><BR>This *SHOULD* be in *EVERY* beginning ASP book! If it isn&#039;t in the book you are using, find another book!<BR><BR>

  3. #3
    Hud Guest

    Default RE: Same as with SQL...

    I tried that, but I think I put three together and that screwed things up. Thanks!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts