1.What is wrong with Request.ServerVariables(â€ÂHTTP_REFERERâ€Â)?
Ans.
The situations where it doesn’t work:
clicking on a Favorite, History, or the recently-typed URLs list;
clicking on ‘Home’ in IE’s toolbar, or an item in IE’s ‘Links’ toolbar;
using location.href or location.replace() in client-side JScript/JavaScript/VBScript;
using HierMenus (details);
typing the URL directly in the browser and hitting Enter or clicking ‘Go’;
launching a clickable URL from an e-mail or MS Office document;
using Response.Redirect / Server.Transfer;
using Response.AddHeader (302) or to redirect;
loading the URL with XML (see Article #2173);
misspelling the variable name (many people assume HTTP_REFERRER).
Obviously, this variable cannot be relied upon for many situations.
Here is the code I used to test with. Ref.asp contains the following code:
2.This error can happen when setting a barebones custom COM object to session or application scope (especially if you leave out the Set keyword).
Response.Write Response
Generates this error:
Response object error ‘ASP 0185 : 80020003′
Missing Default Property
/.asp, line 0
A default property was not found for the object.
30.Which editor should I use for developing ASP applications?
Generally we use Microsoft Visual InterDev 6.0 for developing ASP applications.We also use Macromedia Dreamweaver MX for ASP applications.
6 Comments on ASP interview questions
32 # How do I prevent my ASP pages from caching?
Response.expire = 0
The above statement cause the page to expire immediately (Hence it will not be cached by browser)
1.What is wrong with Request.ServerVariables(â€ÂHTTP_REFERERâ€Â)?
Ans.
The situations where it doesn’t work:
clicking on a Favorite, History, or the recently-typed URLs list;
clicking on ‘Home’ in IE’s toolbar, or an item in IE’s ‘Links’ toolbar;
using location.href or location.replace() in client-side JScript/JavaScript/VBScript;
using HierMenus (details);
typing the URL directly in the browser and hitting Enter or clicking ‘Go’;
launching a clickable URL from an e-mail or MS Office document;
using Response.Redirect / Server.Transfer;
using Response.AddHeader (302) or to redirect;
loading the URL with XML (see Article #2173);
misspelling the variable name (many people assume HTTP_REFERRER).
Obviously, this variable cannot be relied upon for many situations.
Here is the code I used to test with. Ref.asp contains the following code:
And ref.htm contains the following:
version:
%>
> ‘>
> ‘>
Go
there - straight link
Go
there - javascript href
Go
there - javascript replace
Go
there - javascript GET
Go
there - javascript POST
2.This error can happen when setting a barebones custom COM object to session or application scope (especially if you leave out the Set keyword).
Response.Write Response
Generates this error:
Response object error ‘ASP 0185 : 80020003′
Missing Default Property
/.asp, line 0
A default property was not found for the object.
When we use CINT, as soon as the number goes over the limit -32768 and 32767 it throws the error because of interger size limit in VB Script.
Resolutions is to use CLNG (Long variable) which will support the number between -2147483648 and 2147483647.
30. You can use Visual InterDev 6.0 for developing ASP applications.
30.Which editor should I use for developing ASP applications?
Generally we use Microsoft Visual InterDev 6.0 for developing ASP applications.We also use Macromedia Dreamweaver MX for ASP applications.