CSC378 · TU past paper
NET Centric Computing 2076 question paper
The complete TU 2076 exam paper for NET Centric Computing (CSC378), all 15 questions with solved model answers written to the mark scheme.
Tap a question to open its answer.
- 15 marksASP.NET and ASP.NET MVCHideAnswer
Explain the components of ASP[5]
ASP.NET Core is designed to separate web logic, infrastructure, and core components from each other to provide a more development-friendly environment. The main components are organized into distinct layers. --- - This layer encapsulates...
- 25 marksCommon client-side web technologiesHideAnswer
Explain the client-side scripting with practical example.[5]
Client-side scripting refers to scripts that are executed on the client's browser rather than on the web server. The script is downloaded along with the HTML page and runs locally on the user's machine without requiring a round-trip to t...
- 35 marks.NET and ASP.NET frameworksHideAnswer
What do you mean by Microsoft Net framework? Explain with example.[5]
Microsoft .NET Framework
Definition
The .NET Framework is a software development platform developed by Microsoft that provides a controlled programming environment where software can be developed, installed, and executed on Windows-based operating systems. It provides tools and libraries for building and running applications using multiple programming languages such as C#, F#, and Visual Basic.
The .NET ecosystem includes several implementations:
- .NET Framework (original Windows-based platform)
- .NET Core (modern, cross-platform version)
- Mono (open-source, cross-platform implementation)
Key Components of .NET Framework
1. Common Language Runtime (CLR)
The CLR is the execution engine of .NET. It manages code execution, memory management, and security. Code written in .NET languages is compiled into Intermediate Language (IL), which the CLR then executes.
2. Class Libraries / Base Class Library (BCL)
A large collection of reusable classes, interfaces, and value types that provide common functionality to all .NET applications.
3. Application Models / Technologies
Technology Purpose Example Win Forms Form-based desktop applications Notepad-like client apps ASP.NET Web-based applications Runs on Chrome, Firefox, etc. ADO.NET Database interaction Oracle, Microsoft SQL Server
.NET Core (Modern Version)
.NET Core is the newer, improved version of the .NET Framework. It is:
- Open-source -- maintained by Microsoft on GitHub under MIT and Apache 2 licenses
- Cross-platform -- runs on Windows, macOS, and Linux
- Modular and lightweight -- written from scratch for performance
- Supports multiple languages -- C#, F#, Visual Basic
- Wide range of applications -- mobile, desktop, web, cloud, IoT, games, machine learning
- Consistent across architectures -- x64, x86, and ARM
Mono
Mono is another example of a cross-platform .NET implementation available on Windows, macOS, Linux, and more. It was originally designed as an open-source implementation of .NET Framework on Linux.
Example: The Unity game engine uses C# through Mono as a cross-platform way of creating video games. Mono provides the means to compile and run C# programs, similar to the .NET Framework.
Simple Example (C# Console Application on .NET Core)
using System; namespace HelloDotNet { class Program { static void Main(string[] args) { Console.WriteLine("Hello from .NET Framework!"); Console.WriteLine("Platform: Cross-platform with .NET Core"); } } }Output:
Hello from .NET Framework! Platform: Cross-platform with .NET CoreThis simple program can be compiled and run on Windows, macOS, or Linux using .NET Core, demonstrating the cross-platform nature of the framework.
Summary
Feature Description Developer Microsoft Languages Supported C#, F#, Visual Basic Platform (.NET Core) Windows, macOS, Linux Application Types Web, Desktop, Mobile, Cloud, IoT, Games Open Source Yes (.NET Core on GitHub) The .NET Framework (and its modern evolution .NET Core) provides a unified, powerful, and flexible environment for building a wide variety of applications across multiple platforms.
- 45 marksSetting up the EnvironmentHideAnswer
What are the ASP requirements?[5]
ASP.NET (Active Server Pages .NET) is a web application framework developed by Microsoft for building dynamic web applications and services. To develop and run ASP.NET applications, the following requirements must be met: --- - ASP.NET a...
- 55 marksCommon client-side web technologiesHideAnswer
Differentiate between client-side and server-side script.[5]
Client-Side Script refers to code that is executed on the user's browser (client machine). The script is downloaded from the server and runs locally on the browser without any server interaction. Server-Side Script refers to code that is...
- 65 marksADO.NET basicsHideAnswer
What is ADO in ASP?[5]
What is ADO in ASP?
ADO (ActiveX Data Objects)
ADO is a Microsoft technology used in Active Server Pages (ASP) to connect web applications to databases. It provides a set of COM-based objects that allow developers to access and manipulate data stored in databases (such as MS Access, SQL Server, Oracle, etc.) from within ASP pages.
Key Features of ADO
- ADO stands for ActiveX Data Objects
- It is used to connect, retrieve, insert, update, and delete data from a database
- It works with OLE DB providers to communicate with various databases
- It is a part of Microsoft's Universal Data Access (UDA) strategy
- It is simple, fast, and easy to use in classic ASP pages
Main ADO Objects
Object Description Connection Establishes a connection to the database Recordset Holds the data retrieved from the database (like a table of rows) Command Executes SQL queries or stored procedures Error Contains details about data access errors
How ADO Works in ASP (Steps)
- Create a Connection object to connect to the database
- Open the connection using a connection string
- Create a Recordset object to hold query results
- Execute SQL queries to retrieve or manipulate data
- Process the data (display, update, delete)
- Close the Recordset and Connection to free resources
Example Code (Classic ASP with ADO)
<% ' Step 1: Create Connection Object Dim conn, rs, sql Set conn = Server.CreateObject("ADODB.Connection") ' Step 2: Open Connection conn.Open "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=C:\mydb.mdb" ' Step 3: Create Recordset Object Set rs = Server.CreateObject("ADODB.Recordset") ' Step 4: Execute SQL Query sql = "SELECT * FROM Students" rs.Open sql, conn ' Step 5: Display Data Do While Not rs.EOF Response.Write rs("StudentName") & " " rs.MoveNext Loop ' Step 6: Close Objects rs.Close conn.Close Set rs = Nothing Set conn = Nothing %>
Connection String Components
A connection string typically includes:
- Provider - the OLE DB provider name
- Data Source - path or server name of the database
- User ID and Password - credentials (if required)
Advantages of ADO
- Easy to use and implement in ASP pages
- Supports multiple database types through OLE DB providers
- Allows both connected and disconnected data access
- Supports CRUD operations (Create, Read, Update, Delete)
- Lightweight and fast for web-based database access
Summary
ADO in ASP is a data access technology that acts as a bridge between an ASP web application and a backend database. It uses objects like Connection, Recordset, and Command to perform database operations efficiently, making it a fundamental component of classic ASP-based web development.
- 75 marksHideAnswer
What is VB Script in ASP?[5]
VB Script in ASP
Definition
VBScript (Visual Basic Scripting Edition) is a lightweight scripting language developed by Microsoft, based on Visual Basic. In the context of Active Server Pages (ASP), VBScript is the default scripting language used to write server-side scripts that are executed on the web server to generate dynamic HTML content sent to the client's browser.
Key Characteristics of VBScript in ASP
1. Server-Side Execution
VBScript code embedded in ASP pages is executed on the server, not on the client browser. The server processes the script and sends only the resulting HTML to the browser.
2. Syntax and Delimiters
VBScript code in ASP is enclosed within special delimiters:
<% VBScript code here %>Or using the script tag:
<script language="VBScript" runat="server"> ' code here </script>3. Basic Example
<% Dim strName strName = "TU CSIT Student" Response.Write("Hello, " & strName) %>Output sent to browser:
Hello, TU CSIT Student
Features of VBScript in ASP
Feature Description Default Language VBScript is the default scripting language for Classic ASP Case Insensitive Variable names and keywords are not case-sensitive Loosely Typed All variables are of type Variant; no need to declare data typesBuilt-in Objects Works with ASP built-in objects like Request,Response,Session,Application,ServerInterpreted Scripts are interpreted at runtime on the server No Compilation Does not require pre-compilation like compiled languages
VBScript with ASP Built-in Objects
VBScript interacts with ASP's built-in objects to handle web functionality:
<% ' Reading form data using Request object Dim username username = Request.Form("username") ' Writing output using Response object Response.Write("Welcome, " & username) ' Using Session object Session("user") = username %>
Conditional and Loop Example
<% Dim i For i = 1 To 5 Response.Write("Number: " & i & " ") Next %>Output:
Number: 1 Number: 2 Number: 3 Number: 4 Number: 5
Advantages of VBScript in ASP
- Easy to learn for developers familiar with Visual Basic
- Tight integration with Microsoft technologies (IIS, COM objects)
- Dynamic content generation -- pages change based on user input or database data
- Access to databases through ADO (ActiveX Data Objects)
- Reusable code through procedures and functions
Limitations
- Runs only on Microsoft IIS server (not cross-platform)
- Slower compared to compiled languages
- Replaced by ASP.NET which uses VB.NET or C# for more powerful server-side development
Summary
VBScript in ASP provides a simple, powerful way to create dynamic, data-driven web pages by embedding server-side scripting logic directly within HTML. It uses ASP's built-in objects to handle requests, responses, sessions, and server operations, making it the foundation of Classic ASP web development on Microsoft platforms.
- 85 marksTry statements and ExceptionsHideAnswer
Explain error handling in ASP.[5]
Error handling (Exception Handling) in C is a mechanism to detect and handle run-time errors in code. The CLR (Common Language Runtime) supports error and exception handling as one of its core responsibilities. C provides three keywords ...
- 95 marksApp Servers and Hosting modelsHideAnswer
Differentiate between ASP and IIS.[5]
--- ASP is a server-side scripting technology developed by Microsoft that allows developers to create dynamic web pages and web applications. It processes scripts on the server before sending the result (HTML) to the client's browser. II...
- 105 marksApp Servers and Hosting modelsHideAnswer
Explain the virtual directory properties in ASP.[5]
A Virtual Directory in ASP (Active Server Pages) is a directory name (alias) used in a URL that corresponds to a physical directory on the server. It allows web applications to be organized and accessed without exposing the actual physic...
- 115 marksServer-side strategiesHideAnswer
Explain about request object and session object in ASP.[5]
--- The Request Object in ASP.NET is part of the HttpContext object, which holds information about the current HTTP request. Whenever a new HTTP request is made, the HttpContext object is created, capturing the current state of that HTTP...
- 125 marksServer-side strategiesHideAnswer
Differentiate between application object and server object in ASP.[5]
--- Basis Application Object Server Object --------- Definition The Application object is used to store and share information that is accessible to all users across the entire web application. The Server object provides properties and me...
- 135 marksFile IOHideAnswer
Explain about file access with ASP with example.[5]
File access in ASP.NET allows web applications to read from and write to files stored on the server. ASP.NET provides built-in classes through the System.IO namespace to handle file input/output operations. The two main streams used are:...
- 145 marksHideAnswer
What do you mean by debugging ASP? Explain.[5]
Debugging in ASP.NET refers to the process of identifying, analyzing, and fixing errors (bugs) in an ASP.NET application. It involves examining the code execution flow, inspecting variable values, and tracing program behavior to locate t...
- 155 marksHideAnswer
Explain the sending and receiving e-mail with ASP with example.[5]
ASP.NET provides built-in support for sending and receiving e-mails using the System.Net.Mail namespace. This namespace contains classes that allow web applications to send e-mail messages through an SMTP (Simple Mail Transfer Protocol) ...