0% found this document useful (0 votes)
5 views16 pages

Short Questions: Unit I Important Questions

The document outlines important questions and answers regarding ASP.NET, covering topics such as web applications, HTTP, namespaces, server controls, validation, ADO.NET, and error handling. It includes both short and long questions that emphasize key concepts and components of ASP.NET, providing a comprehensive overview for learners. The content is structured into units, each focusing on different aspects of ASP.NET development.

Uploaded by

kaifmohamad923
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
5 views16 pages

Short Questions: Unit I Important Questions

The document outlines important questions and answers regarding ASP.NET, covering topics such as web applications, HTTP, namespaces, server controls, validation, ADO.NET, and error handling. It includes both short and long questions that emphasize key concepts and components of ASP.NET, providing a comprehensive overview for learners. The content is structured into units, each focusing on different aspects of ASP.NET development.

Uploaded by

kaifmohamad923
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIT – I IMPORTANT QUESTIONS

SHORT QUESTIONS
1. What is [Link]? ([Link])

[Link] is a server-side web framework by Microsoft used to develop dynamic web applications and
services. It runs inside IIS and supports multiple languages like C#. [Link] provides built-in features
such as state management, security, caching, event-driven programming, and a rich set of controls,
making web development fast and efficient.

2. How does a web application work? ([Link])

A web application works based on the client–server model. When a user sends a request from a
browser, the request goes to the web server over HTTP. The server processes the request using server-
side code ([Link]), interacts with the database if needed, generates output, and sends the response
back to the browser. The browser displays the final result to the user.
3. Write about HTTP. ([Link])

HTTP (HyperText Transfer Protocol) is the main communication protocol between web browsers and
servers. It is a stateless protocol and uses methods like GET, POST, PUT, and DELETE for communication.
HTTP follows a request–response model where each request is processed independently.

4. Define Namespace. ([Link])

A namespace is a logical container that groups related classes, interfaces, and structures. It avoids
naming conflicts and organizes code for better readability. Example: System, [Link], etc.
LONG QUESTIONS
1. Web applications with web servers ([Link])

A web server (IIS/Apache) receives client requests, processes them using web applications, and returns
the output. When the browser sends a request, the server passes it to [Link] runtime, which executes
the code, accesses databases if needed, prepares HTML output, and sends it back. Web servers also
manage security, sessions, and error handling.

2. Role of web server – Apache & IIS ([Link])

IIS: Microsoft web server used for [Link] apps. Supports .NET runtime, Windows authentication,
application pools, high security, and scalability.
Apache: Open-source, platform-independent web server. Widely used for hosting PHP/Python apps
using modular architecture.
Both servers handle requests, serve pages, manage connections, and ensure reliable communication
between client and server.
3. Web Support Languages ([Link])

Web technologies use:

• Client-side: HTML for structure, CSS for design, JavaScript for interactivity.

• Server-side: [Link], PHP, Python for backend logic, database handling, authentication, and
dynamic content.
Both work together to create complete functional web applications.

4. TCP/IP role in web application development ([Link])

TCP/IP is the backbone of internet communication.

• TCP ensures reliable delivery of data packets without loss.

• IP handles addressing and routing.


Web applications use TCP/IP to send HTTP requests and responses, ensuring correct and secure
data delivery.
5. [Link] Framework Components ([Link])

[Link] includes:

• CLR: Executes code, handles memory and exceptions

• Class Library: Provides standard reusable components

• WebForms/MVC: Methods to build apps

• State Management: Session, ViewState

• Security: Authentication, authorization

• Caching: Improves performance


These components allow faster and more secure web development.
UNIT – II IMPORTANT QUESTIONS
SHORT QUESTIONS
1. What are [Link] Web Forms? ([Link])

Web Forms are event-driven web pages that use server-side controls to build rich UIs quickly. They
support ViewState, which maintains data across postbacks, making web apps feel like desktop apps.
Controls like TextBox, Button, and GridView automate HTML generation and server-side processing.

2. Types of Server Controls in [Link] ([Link])

[Link] supports:

• HTML Controls: Basic HTML elements

• Web Server Controls: TextBox, Button, Label

• Validation Controls: RequiredFieldValidator, CompareValidator

• Data Controls: GridView, Repeater, DataList


These controls help build interactive and data-driven applications easily.
3. Demonstrate Buttons in WebForm ([Link])

Buttons handle events such as OnClick. On clicking, a postback occurs and the event handler in the code-
behind executes.
Example:

protected void Button1_Click(object sender, EventArgs e)

[Link] = "Submitted!";

4. What is code-behind technique? ([Link])

Code-behind separates UI (.aspx) and logic (.[Link]). This improves readability, simplifies debugging,
and allows UI designers and developers to work independently. C# logic executes server-side while
markup remains untouched.
5. Use of Page Directives ([Link])

Page directives give instructions on how [Link] should compile and execute the page.
Examples:

• Page: language, inherits, auto event wiring

• Import: adds namespaces

• Register: user controls


They control the behavior and structure of the web page.

LONG QUESTIONS
1. Advantages of [Link] + Directives ([Link])

Advantages:

• Fast performance due to server-side execution

• Rich toolbox and controls

• Automatic state management

• Strong security (authentication & authorization)

• Supports multiple languages

Directives like Page, Import, Control, Assembly guide the compilation and runtime behavior of pages.
2. Page Directive and its use ([Link])

The Page directive exists at the top of an .aspx file and defines configuration settings such as language,
code-behind file, inheritance, debugging mode, master page, and theme. It helps [Link] understand
how to process the page during runtime.

3. Separating Code & Design ([Link])

[Link] uses code-behind to separate HTML design from C# logic. The .aspx file contains UI, and
.[Link] contains logic. This improves clarity, reusability, scalability, and team collaboration.

4. Code-Behind Feature ([Link])

The code-behind feature keeps all event handlers and logic in a separate C# file. This supports partial
classes, auto-generated designer files, and reduces clutter. It also makes applications easier to maintain
and debug.

5. Themes & Skins ([Link])

Themes provide consistent styling across the website. Skins define how individual controls look (color,
font, size). Using themes reduces repetitive CSS coding and keeps the UI uniform and professional.
UNIT – III IMPORTANT QUESTIONS

SHORT QUESTIONS
1. Validation Controls in [Link] ([Link])

[Link] provides RequiredFieldValidator, CompareValidator, RangeValidator,


RegularExpressionValidator, and CustomValidator. These help validate input on both client and server
sides and ensure correct data entry.

2. Group Validations ([Link])

ValidationGroup property allows multiple controls to be validated together (e.g., login form). Only
controls in the same group trigger each other’s validations.
3. Benefits of [Link] ([Link])

[Link] uses a disconnected architecture, meaning data can be fetched and used without maintaining
a continuous connection. DataSet, DataAdapter, and DataReader make database operations fast and
structured. It also supports XML integration.

LONG QUESTIONS
1. Validation Control & Compare Validator ([Link])

Validation controls ensure correct user input. CompareValidator compares one control's value with
another or with a fixed value. It supports operators like Equal, GreaterThan, LessThan, etc.

2. Required Field Validator ([Link])

This validator ensures that a user does not leave a mandatory field empty. If the field is blank, the form
cannot be submitted. Useful for login, registration, and forms with essential fields.

3. [Link] XML ([Link])

[Link] supports XML through DataSet's ReadXml() and WriteXml(). Data can be stored, transported,
and displayed using XML. This makes [Link] ideal for data sharing across different platforms.

4. Converting XML to HTML ([Link])

XML data can be converted to HTML using XSLT (Extensible Stylesheet Language Transformations). XSLT
formats XML data into readable HTML pages without modifying the actual XML.
UNIT – IV IMPORTANT QUESTIONS
SHORT QUESTIONS
1. Properties of GridView Control ([Link])

Important properties include AutoGenerateColumns, DataKeyNames, RowStyle, EditIndex, AllowSorting,


AllowPaging. These properties help control appearance and behavior of GridView.

2. Creating a User Control ([Link])

Steps:

1. Create .ascx file

2. Design UI using controls

3. Write logic in .[Link]

4. Register the control using <%@ Register %>

5. Use it in .aspx pages


User controls promote reusability.

3. Define Master Pages ([Link])

Master pages allow consistent layout (header, footer, menu) for all pages. Content pages fill only the
content area, while the master defines the common structure.
LONG QUESTIONS
1. Advantages of Data-Bound Controls ([Link])

Data-bound controls like GridView, Repeater, and DataList simplify displaying database data. They
support sorting, paging, editing, and formatting. They automatically bind to data sources and reduce
coding time.

2. Repeater and Its Uses ([Link])

Repeater is a flexible data-bound control used to display repeating items. It provides full control over
layout using templates. Best used for custom formatting of lists.

3. Importance of DataGrid ([Link])

DataGrid provides editing, deleting, paging, and sorting features. It is more advanced than Repeater and
is used in admin dashboards, reports, and management systems.

4. FormView vs DetailsView ([Link])

FormView: Uses templates to show one record at a time with complete customization.
DetailsView: Automatically displays fields in a tabular format.
FormView = customizable; DetailsView = auto-formatting.
UNIT – V IMPORTANT QUESTIONS
SHORT QUESTIONS
1. [Link] Error Handling ([Link])

[Link] handles errors using try–catch blocks, custom error pages, and Application_Error in
[Link]. This prevents application crashes and provides user-friendly error pages.

2. .NET Returns ([Link])

Methods can return values like integers, strings, objects, datasets, etc. Return types define the data a
method sends back after execution.

3. Global Assembly Cache ([Link])

GAC stores shared .NET assemblies that can be used by multiple applications. It avoids duplication and
ensures version safety.

4. HTTP Handlers ([Link])

HTTP handlers process specific web requests manually. For example, custom handlers can manage
requests for images, files, or dynamic content. They are lightweight and faster than normal pages.
LONG QUESTIONS
1. Error Handling & .NET Returns ([Link])

[Link] uses try–catch–finally blocks for safe execution. Errors can be logged, rethrown, or redirected.
Methods return values to the caller, making application logic reusable and modular.

2. Structured Error Handling ([Link])

Structured exception handling uses try, catch, and finally blocks. It allows catching specific exceptions,
logging errors, and writing clean, fault-tolerant applications.

3. Catching General vs Specific Exceptions ([Link])

Specific exceptions (like DivideByZeroException) are caught first. General Exception class catches all
remaining errors. This order prevents unexpected behavior and provides detailed error control.

4. Page-Level Error Handling ([Link])

Page Error method handles errors that occur within a single page. This prevents the entire website from
failing and allows page-specific error messages.

5. Application-Level Error Handling ([Link])

Application_Error in [Link] handles errors that occur anywhere in the project. It provides a
centralized place to log and manage exceptions.
6. HTTP Handlers Role ([Link])

HTTP handlers handle low-level requests like file downloads, images, and custom routes. They provide
faster execution and fine control over request processing, making them ideal for performance-critical
components.

7. Applications ([Link])

Application state stores data globally for all users, such as counters, configuration values, etc. It is stored
in server memory and is available until the application stops.

You might also like