Just like how HTML uses tags, ASP also needs tags to create dynamic websites. These tags do not resemble your typical HTML tags. Below is an ASP script that outputs “Hello World!” into HTML.<% Response.Write("Hello World!") %>
%> will always encapsulate your ASP code. Scripts surrounded by these special tags are executed on the server ASP code and can occur anywhere, even within an HTML tag, as seen below.
<a href = "<% Response.Write("Contact.asp")%>">Contact Us </a>
The above code block, when run, will display “Contact Us”.
The rest of ASP’S syntax is dependent on which scripting language you are using in your ASP code. However, you can also use non-scripting languages.
<!Doctype html> <html> <body> <% Response.Write("Hello World!") %> </body> </html>
View all Courses