Find Interview Questions for Top Companies
Ques:- Which choice is NOT a property of Dictionary Object? A. Key() B. CompareMode C. Item () D. Exists () E. Count
Asked In :-
Right Answer:
B. CompareMode
Comments
Admin May 17, 2020

Exists () is the answer.

Ques:- Using VBScript, which of the following Scripting Object(s) is NOT available from scrrun.dll? A. TextStream B. Dictionary Object C. Err Object D. FileSystemObject E. All are available from scrrun.dll.
Asked In :-
Right Answer:
C. Err Object
Comments
Admin May 17, 2020

All are available from scrrun.dll.

Ques:- What is a .ASP file?
Asked In :-
Right Answer:
A .ASP file is a server-side script file used by Microsoft Active Server Pages (ASP) to create dynamic web pages. It can contain HTML, scripts, and server-side code that is processed on the server before being sent to the client's web browser.
Comments
Admin May 17, 2020

It is a Text File that contains the combination of the
following:
? Text
? HTML tags
? Script Commands

Ques:- What is the use of following Statement Response.Expires=120 A.The page will be removed form cache after 120 Hours B.The page will be removed form cache after 120 Sec C.The page will be removed form cache before 120 Min D.The page will be removed form cache after 2 Hours
Asked In :-
Right Answer:
B. The page will be removed from cache after 120 Sec
Comments
Admin May 17, 2020

The page will be removed form cache after 2 Hours

Ques:- How to Display images using Response object? A. Contenttype=Application/Brush B. Contenttype=Image/JPG C. Contenttype=Application/paint D. Contenttype=Image/WMF
Asked In :-
Right Answer:
B. Contenttype=Image/JPG
Comments
Admin May 17, 2020

Contenttype=Image/JPG

Ques:- When does the application OnEnd event handler fire? A. After every request for an application document, since web servers are stateless servers. B. As soon as there are no open connections to any application document. C. When the web server is stopped in an orderly fashion. D. Twenty minutes after the last request for a document in the application. E. When there are no application requests for the amount of time defined by the SessionTimeout variable.
Asked In :-
Right Answer:
C. When the web server is stopped in an orderly fashion.
Comments
Admin May 17, 2020

When the web server is stopped in an orderly fashion.

Ques:- How long is a SessionID guaranteed to be unique? A. It is unique for the web server, whether it is restarted or not. B. Only until the web server is restarted. C. It is like a GUID in that it is for any web server at any time. D. Only until the session expires, then it can be reissued to another client. E. It is unique per client. A client cannot have two sessions with the same SessionID
Asked In :-
Right Answer:
D. Only until the session expires, then it can be reissued to another client.
Comments
Admin May 17, 2020

Only until the session expires, then it can be reissued to
another client.

Ques:- The FileSystemObject provides an object interface to drives, directories, and files for which of the following? A. Any local or mapped drive on either the server or the client. B. Only files and subdirectories in the web site’s home directory. C. Any local physical drive or mapped drive on the web server. D. Any file system physically located on the web server. E. The client’s computer.
Asked In :-
Comments
Admin May 17, 2020

Any local or mapped drive on either the server or the
client.

Ques:- What purpose is served by the Application.Lock method? A. It locks the Application object, preventing other clients from altering any values in the Contents collection. B. It locks the application, preventing the server from responding to any requests for application documents. C. It locks the application, preventing non-SSL requests from being processed. D. It locks the Application object, preventing other clients from reading any values in the Content collection. E. It locks other clients from reading the Contents collection.
Asked In :-
Right Answer:
A. It locks the Application object, preventing other clients from altering any values in the Contents collection.
Comments
Admin May 17, 2020

It locks the Application object, preventing other clients
from altering any values in the Contents collection.

Ques:- How are sessions maintained? A. The browser sends a cookie to the server with each request. B. The browser sends a Querystring variable to the server with each request. C. The browser sends a hidden Form variable to the server with each request. D. The browser sends a long variable to the server in the BODY of each request. E. None of the above.
Asked In :-
Right Answer:
A. The browser sends a cookie to the server with each request.
Comments
Admin May 17, 2020

The browser sends a cookie to the server with each request.

Ques:- What are the advantages of Cookies over Session Object?
Asked In :-
Right Answer:
1. Cookies can store data on the client side, allowing for persistence across sessions.
2. Cookies can be accessed by the client without needing a server round trip.
3. Cookies can be shared across different applications on the same domain.
4. Cookies can have an expiration date, allowing for long-term storage of user preferences.
5. Cookies can be used for tracking user behavior across different sessions and visits.
Comments
Admin May 17, 2020

? It informs each page what session the request belongs to
when a user accesses during a session.
? It retrieves all the session information stored on the
server.
? Cookies can persist for a much longer period of time than
session that has a timeout value usually of 20 minutes and
hence can store information even when a user is off the
site.

Ques:- What is the difference between Querystring collection and Form collection?
Asked In :-
Right Answer:
The QueryString collection contains data sent in the URL after the question mark (e.g., `?key=value`), while the Form collection contains data submitted through an HTML form using the POST method.
Comments
Admin May 17, 2020

Querystring collection - store the value in user & its a
Getmethod
Form Collection-Hold the value& its a post Method

Ques:- What is the difference between Cookies collection and Form/Querystring collection?
Asked In :-
Right Answer:
Cookies collection stores data sent from the client (browser) to the server, allowing for persistent data storage across sessions. Form collection contains data submitted through HTML forms in a POST request, while Querystring collection holds data passed in the URL as part of a GET request.
Comments
Admin May 17, 2020

Cookie collection does not have the Count property. Cookies
can have multiple values for the same cookie name but each
value can be referred using a key whereas in a
Form/Querystring cookie each value has to be referred using
a index value.

Ques:- What is a Virtual Directory?
Asked In :-
Right Answer:
A Virtual Directory is a directory that is not physically located within the web server's root directory but is mapped to a specific folder on the server, allowing access to its contents via a URL.
Comments
Admin May 17, 2020

Virtual directories are aliases for directory paths on the
server.
It allows moving files on the disk between different
folders, drives or even servers without changing the
structure of web pages. It avoids typing an extremely long
URL each time to access an ASP page.

Ques:- What is the difference between client-side script and server-side script?
Asked In :-
Right Answer:
Client-side script runs in the user's browser and is responsible for user interface interactions, while server-side script runs on the server and handles data processing, database interactions, and business logic.
Comments
Admin May 17, 2020

Scripts executed only by the browser without contacting the
server is called client-side script. It is browser
dependent. The scripting code is visible to the user and
hence not secure. Scripts executed by the web server and
processed by the server is called server-side script.

Admin May 17, 2020

client side take less time to execute since it execute at
client before it go to server whereas server side scripting
take more time b'coz it required to send the request to
server for execution .client side can be disable wheras
sever side can't be disable by end user.

Ques:- How does VaryByCustom work?
Asked In :-
Right Answer:
VaryByCustom is a property of the OutputCache directive in ASP.NET that allows you to specify custom cache variations based on a string returned by the VaryByCustom method. This enables you to create different cached versions of a page or control based on specific criteria, such as user roles or query string parameters. You override the VaryByCustom method in your code to return a unique string for each variation you want to cache.
Ques:- Give an example of how using an HttpHandler could simplify an existing design that serves Check Images from an .aspx page.
Asked In :-
Right Answer:
Using an HttpHandler can simplify the design by allowing you to directly serve check images without the overhead of an .aspx page. For example, instead of having an .aspx page that processes requests and renders images, you can create a custom HttpHandler that directly retrieves and returns the image data. This reduces the complexity of the page lifecycle and improves performance by handling requests more efficiently.

Here's a simple implementation:

1. Create a class that implements `IHttpHandler`:
```csharp
public class CheckImageHandler : IHttpHandler
{
public void ProcessRequest(HttpContext context)
{
string imagePath = context.Request.QueryString["image"];
context.Response.ContentType = "image/jpeg";
context.Response.WriteFile(imagePath);
}

public bool IsReusable => false;
}
```

2. Register the handler in `web.config`:
```xml
<system.webServer>
<handlers>
<add name="Check
Ques:- Describe ways to present an arbitrary endpoint (URL) and route requests to that endpoint to ASP.NET.
Asked In :-
Right Answer:
In ASP.NET, you can present an arbitrary endpoint and route requests to it using the following methods:

1. **Routing in ASP.NET Core**: Use the `Map` method in the `Startup.cs` file to define custom routes. For example:
```csharp
app.UseEndpoints(endpoints =>
{
endpoints.MapGet("/custom-endpoint", async context =>
{
await context.Response.WriteAsync("Hello from custom endpoint!");
});
});
```

2. **Attribute Routing**: Decorate your controller actions with route attributes to define custom endpoints. For example:
```csharp
[Route("api/[controller]")]
public class MyController : ControllerBase
{
[HttpGet("custom-endpoint")]
public IActionResult GetCustom()
{
return Ok("Hello from custom endpoint!");
}
}
```

3. **Using Middleware**: Create custom middleware to handle requests to arbitrary endpoints. For example:
Ques:- Juxtapose the HTTP verbs GET and POST. What is HEAD?
Asked In :-
Right Answer:
GET is used to request data from a server and can be cached, while POST is used to submit data to a server and is not cached. HEAD is similar to GET but only retrieves the headers of a response, not the body.
Ques:- How does if-not-modified-since work? How can it be programmatically implemented with ASP.NET?
Asked In :-
Right Answer:
The `If-Not-Modifed-Since` header is used in HTTP requests to check if a resource has been modified since a specified date. If the resource has not been modified, the server can respond with a `304 Not Modified` status, indicating that the client can use its cached version.

In ASP.NET, you can implement this by checking the `If-Modified-Since` header in the request and comparing it with the last modified date of the resource. Here’s a simple example:

```csharp
protected void Page_Load(object sender, EventArgs e)
{
DateTime lastModified = GetLastModifiedDate(); // Method to get the last modified date of the resource
Response.Cache.SetLastModified(lastModified);

if (Request.Headers["If-Modified-Since"] != null)
{
DateTime ifModifiedSince;
if (DateTime.TryParse(Request.Headers["If-Modified-Since"], out ifModifiedSince))
{
if (last


The ASP (Active Server Pages) category on takluu.com is designed for developers and IT professionals preparing for interviews that focus on Microsoft’s classic web development technology. ASP enables the creation of dynamic web pages by embedding server-side scripts in HTML, commonly using VBScript or JavaScript.

This category covers fundamental and advanced ASP topics including page lifecycle, server-side scripting, session and application management, state management techniques (cookies, sessions), database connectivity (ADO), error handling, and security best practices. You will also find interview questions on classic ASP vs ASP.NET differences, performance optimization, and common troubleshooting scenarios.

Candidates aiming for roles like ASP Developer, Web Developer, or Backend Developer will benefit from detailed explanations of how to build and maintain scalable, secure web applications using ASP. The section also explores integration with databases like SQL Server and MySQL to fetch and manipulate data dynamically.

With the shift toward modern frameworks like ASP.NET, understanding classic ASP remains valuable for maintaining legacy systems and transitioning projects. This category provides practical examples, coding challenges, and scenario-based questions to enhance your preparation.

At Takluu, we emphasize hands-on learning combined with conceptual clarity to help you confidently answer technical questions and demonstrate your proficiency in ASP development.

AmbitionBox Logo

What makes Takluu valuable for interview preparation?

1 Lakh+
Companies
6 Lakh+
Interview Questions
50K+
Job Profiles
20K+
Users