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.
- Q1.5 marksASP.NET and ASP.NET MVCHideAnswer
Explain the components of ASP[5]
- Q2.5 marksCommon client-side web technologiesHideAnswer
Explain the client-side scripting with practical example.[5]
- Q3.5 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.
- Q4.5 marksSetting up the EnvironmentHideAnswer
What are the ASP requirements?[5]
- Q5.5 marksCommon client-side web technologiesHideAnswer
Differentiate between client-side and server-side script.[5]
- Q6.5 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.
- Q7.5 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.
- Q8.5 marksTry statements and ExceptionsHideAnswer
Explain error handling in ASP.[5]
- Q9.5 marksApp Servers and Hosting modelsHideAnswer
Differentiate between ASP and IIS.[5]
- Q10.5 marksApp Servers and Hosting modelsHideAnswer
Explain the virtual directory properties in ASP.[5]
- Q11.5 marksServer-side strategiesHideAnswer
Explain about request object and session object in ASP.[5]
- Q12.5 marksServer-side strategiesHideAnswer
Differentiate between application object and server object in ASP.[5]
- Q13.5 marksFile IOHideAnswer
Explain about file access with ASP with example.[5]
- Q14.5 marksHideAnswer
What do you mean by debugging ASP? Explain.[5]
- Q15.5 marksHideAnswer
Explain the sending and receiving e-mail with ASP with example.[5]