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:
00262338
Vues:
23
>Hi! I'm having some problems with scripting. I use the following
>coding structure in my asp pages:
>
>< % response = "intro"
> if response = "intro" then % >
> Hello world.
>< % else % >
> Press back button.
>< % end if % >
>
>A friend said it would be faster and clearer if i wrote:
>
>< % response = "intro"
> if response = "intro" then
> response.write "Hello world."
> else
> response.write "Press back button."
> end if
>% >
>
>However, how can I use this clearer coding technique when it comes to the < a href> (i.e. < a href = "myasp.asp" >home< / a >) since there are quotes. How do i adopt that technique for that tag since the tag would contain embedded quotes?
>
>Thanks
>
>Ramon Carlos

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

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