Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Mixed Coding
Message
Information générale
Forum:
Visual C++
Catégorie:
Autre
Titre:
Divers
Thread ID:
00262291
Message ID:
00262826
Vues:
29
>>
>>Your Friend is correct. ASP mixed with raw HTML is S L O O O O W!
>>It does get to be a pain getting " correct. In you example you don't need quotes. The only time you need quotes in your example is if there is a space in the href. response. write "< a href=myasp.asp >" works just fine, but response. write "< a href=my no one asp.asp >" won't work. reponse. write ""< a href=my no one asp.asp >"" will work.
>>
>>As I said it does get to be a pain, but the speed difference is worth it and you do get use to it.
>>
>>You can all so do stuff like qt=chr(34) then use &qt& where you want as a quote.
>>
>>HTH
>>Jeff
>
>Thanks for the great advice! However, does this mean that I don't have to use raw html for the < html >, < body > ,etc. tags - that I can include them in the response . write as well?
>
>Ramon Carlos

Well I guess, Here is an example.
<%
cr=chr(13)
response.write "< html >< head >"&cr&_
"< title >Tech Comm Art Work Search Engine< /title >< /head >"&cr&_
"< body background=/images/backgrnd.gif bgcolor=#FFFFFF >"&cr&_
"< Center >"&cr&"< font color=#000080 size=7 >< em >"&cr&_
"< strong >Art Log Search Engine< /strong >< /em >< /font >"&cr

the &_ is a continuation of the response.write this is faster than issuing<BR> a Write for each line. The down side to this is if you view source the code is<BR>just one long line and hard to read. That is why I do a CR=chr(13),<BR> saves me some typing and by &cr&_ continues the response.write but cause the<BR> generated source code to break where I want so the view source is easy to read.

The pain comes in when you want to write a variable that<BR>has spaces and needs quotes around it to work such as a<BR>value of a button.

I want my button to say "Submit Request" in raw html it would look like
< input type=submit name=new VALUE="Submit Request" >
in a response.write it would look like
response.write "< input type=submit name=new VALUE=""Submit Request"" >"
if a had a variable to put in a button it would have to look like
var="Submit Request"
response.write "< input type=submit name=new VALUE="""&var&""" >"
HTH
Jeff

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform