General discussion


Active Server Pages

By f_saleem ·
I would like to know that 'output directive' is just the other way of writing 'Response.write' or there is any technical difference between them.

This conversation is currently closed to new comments.

Thread display: Collapse - | Expand +

All Comments

Collapse -

Active Server Pages

by Bill_H In reply to Active Server Pages

The output directive syntax and Response.Write are functionally identical; they cause the client browser to display the text or expression. The difference is that the output directive is used to display the value of an expression, while Response.Write is most often used to display a dynamically created string (which may contain values form expressions using the output directive syntax.

You may wish to refer to the MSDN article "Creating an ASP Page", which is located at:

(If the URL above does not work, locate and remove any spaces inserted by the TechRepublic system.)

To quote from the article:

"Using ASP Directives

ASP provides directives that are not part of the scripting language you use: the output directive and the processing directive.

The ASP output directive <%= expression %> displays the value of an expression. This output directive is equivalent to using Response.Write to display information. For example, the output expression <%= city %> displays the word Baltimore (the current value of the variable) on the browser."

Hope this helps...

Related Discussions

Related Forums