Tuesday, February 28, 2012

Classic ASP Objects Part 1



<br /> Classic ASP Objects<br /> meta name="Keywords" content="classic asp objects, html,css,tutorial,html5,dhtml,<br /> asp,ado,vbscript,dom,sql,beginner's guide,primer,lessons,examples,samples,source code,tags,demos,tips,<br /> links,FAQ,tag list,forms,frames,active server pages,dynamic html,<br /> internet,database,classic asp guide" /><br /> <meta name="Description" content="Learn about classic asp objects." /><br />


Classic ASP Object:


Response Object:
Basicaly we are using ASP Response object to send output to the user from the server.
response.write alternate syntax <%= %>
Example:

<% response.write("Hello New Programmer...!") %>.
Method for Response Object

1)AddHeader:- Adds HTTP header abd HTTP response

2)AppendToLog:- Adds a string to the end of the server log entry

3)BinaryWrite:- Writes data, without any character conversion

4)Clear:- Clears any buffered HTML output

5)End :- Stops the current processing a script.

6)Flush:- Sends buffered output immediately

7)Redirect:- Redirects the user to a different URL intrire a application

8)Write:- Writes a specified string


Request Object:


Request Object:
Request object is used to get information from a user or visiter.
There are various collection for Request Objects:
Requesr.form("name")
Request.QueryString("name")
Request.cookies("cookiesname")
Request.ServerVariables (server_variable)
There are only ine method for Request object
BinaryRead : Retrieves the data sent to the server from the client.
<% dim a,b a=Request.TotalBytes b=Request.BinaryRead(a) %>


ASP Application Object:

ASP Application Object:

The Application object holds information that will be used by many pages in the application (like database connection information). The information can be accessed from any page. The information can also be changed in one place, and the changes will automatically be reflected on all pages.

<% Dim DailyHoroscope Application("DailyHoroscope")="Good day filled with happiness. All commitments and financial transactions need to be handled carefully. A lack of communication with someone you care will leave you depressed. tree in autumn. If travelling make sure you carry all-important documents. " Response.write(Application("DailyHoroscope")) %>


ASP Session Object:

Session Object: The Session object stores information about a user. session is logicaly objects to preserve data accross subsequence HTTP request.
<% Session("username")="Deepak madheshiya" Session("age")=24 %>

No comments:

Post a Comment