Computer Keywords  Meta tag Generator  Software  Whois  Web Programming  India Article  Write text using ASP  Submit Articles  Follow me on twitter

New Page 1

 

Free Newsletter

Custom Software

Software Process
Web Development
Review Our Site
Our Developments
ASP Tutorials
HTML/ DHTML Tutorials
Computer keywords
Whois

Link Exchange

Computer
Business
Marketing
Misc General
Website

Articles

Automobile articles
Business articles
Computers articles
Entertainment articles
Education articles
Health & Food articles
Law/Legal articles
Marketing articles
General articles
Software articles
Sports articles
Science \Technology articles
Travel /Tourism articles
Web articles

ASP Tutorials

Response Object

Format text with HTML tags

<html>
<body>
<%
response.write("<h2>You can use HTML tags to format the text!</h2>")
%>

<%
response.write("<p style='color:#0000ff'>This text is styled with the style attribute!</p>")
%>

</body>
</html>
 

You can use HTML tags to format the text!
This text is styled with the style attribute!
 

Redirect the user to another URL

<%
if Request.Form("select")<>"" then
Response.Redirect(Request.Form("select"))
end if
%>

<html>
<body>

<form action="redirect_demo.asp" method="post">

<input type="radio" name="select"
value="server_demo.asp">
Server Example<br>

<input type="radio" name="select"
value="text_text.asp">
Text Example<br><br>
<input type="submit" value="Go!">

</form>

</body>
</html>
 

Server Example
Text Example

 

Random links

<html>
<body>

<%
randomize()
r=rnd()
if r>0.5 then
response.write("<a href='http://www.w3schools.com'>W3Schools.com!</a>")
else
response.write("<a href='http://www.refsnesdata.no'>Refsnesdata.no!</a>")
end if
%>

<p>
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.
</p>

</body>
</html>
 

W3Schools.com!
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.
 

Controlling the buffer

<%
Response.Buffer=true
%>

<html>
<body>
<p>
This text will be sent to your browser when my response buffer is flushed.
</p>
<%
Response.Flush
%>

</body>
</html>
 
This text will be sent to your browser when my response buffer is flushed.
 

Clear the buffer

<%
Response.Buffer=true
%>

<html>
<body>
<p>This is some text I want to send to the user.</p>
<p>No, I changed my mind. I want to clear the text.</p>
<%
Response.Clear
%>

</body>
</html>
 
 

End a script in the middle of processing

<html>
<body>
<p>I am writing some text. This text will never be<br>
<%
Response.End
%>

finished! It's too late to write more!</p>
</body>
</html>
I am writing some text. This text will never be

 

End a script in the middle of processing

<%Response.Expires=-1%>
<html>
<body>
<p>This page will be refreshed with each access!</p>
</body>
</html>
 
This page will be refreshed with each access!
 

Check if the user is still connected

<html>
<body>

<%
If Response.IsClientConnected=true then
Response.Write("The user is still connected!")
else
Response.Write("The user is not connected!")
end if
%>

</body>
</html>
 

The user is still connected!

 

Our Service

  Black Magic Raksha Kavach

Mantravidya | Divyayoga shop | How to remove Black Magik | Dhyansanjivani.ORG | India Article | Dhyansanjivani.COM | Free horoscope |

w