Monday, March 22, 2010

You can use HTML tags to format the text!

") %> <% response.write(" This text is styled with the style attribute! ") %> 3) Redirect the user to a different URL -How to redirect the user to a different URL. <% if Request.Form("select")<>"" then Response.Redirect(Request.Form("select")) end if %>
Server Example Text Example
4)Show a random link-How to create a random link. <% randomize() r=rnd() if r>0.5 then response.write("W3Schools.com!") else response.write("Refsnesdata.no!") end if %>

This example demonstrates a link, each time you load the page, it will display one of two links: W3Schools.com! OR Refsnesdata.no! There is a 50% chance for each of them.
5)Controlling the buffer-How to control the buffer. <% Response.Buffer=true %>

This text will be sent to your browser when my response buffer is flushed.
<% Response.Flush %> 6) Clear the buffer-How to clear the buffer. <% Response.Buffer=true %>

This is some text I want to send to the user.

No, I changed my mind. I want to clear the text.
<% Response.Clear %> 7) End a script in the middle of processing and return the result-How to end a script in the middle of processing.

I am writing some text. This text will never be <% Response.End %> finished! It's too late to write more!
8) Set how many minutes a page will be cached in a browser before it expires -How to specify how many minutes a page will be cached in a browser before it expires. <%Response.Expires=-1%>

This page will be refreshed with each access!
9)Set a date/time when a page cached in a browser will expire-How to specify a date/time a page cached in a browser will expire. <% Response.ExpiresAbsolute=#May 05,2001 05:30:30# %>

This page will expire on May 05, 2001 05:30:30!
10) Check if the user is still connected to the server-How to check if a user is disconnected from the server. <% If Response.IsClientConnected=true then Response.Write("The user is still connected!") else Response.Write("The user is not connected!") end if %> 11) Set the type of content-How to specify the type of content. <% Response.ContentType="text/html" %>

This is some text
12) Set the name of the character set-How to specify the name of the character set. <% Response.Charset="ISO8859-1" %>

This is some text