Lab Record
Lab Record
1. Installing .NetFramework
Aim: Enable seamless cross-platform application development and execution by installing
the .NET Framework.
Description:
Installing the .NET Framework involves the deployment of a comprehensive software
framework developed by Microsoft, providing a runtime environment for executing and
managing applications across various platforms. This framework supports multiple
programming languages and facilitates the development of robust, scalable, and secure
applications. The installation process includes downloading and configuring the necessary
components to empower developers to create versatile applications that run efficiently on
Windows, macOS, and Linux.
If the box beside .NET Framework 3.5 is not shaded in black, that means it is not installed on
your computer.
Step – 2: Download .NET Framework:
Visit the official Microsoft website or use a trusted source to download the specific version
of the .NET Framework you need.
Here is the link: https://dotnet.microsoft.com/en-us/download/dotnet-framework
Once you click on the official website, it will open and you will see the framework versions.
You can download the latest version from the list.
Select the check box and then click on install. It will take some time to complete the process.
After successful installation you will get the following dialogue box.
Description:
Installing Visual Studio 2013 involves setting up a comprehensive IDE equipped with
powerful tools for coding, debugging, and testing. This version supports a variety of
programming languages, streamlining the development process and offering features that
enhance collaboration and productivity among developers. Follow the step-by-step wizard
to configure the IDE, enabling seamless project creation and management for building
innovative software solutions.
Prerequisites
The following system requirements are required to install Visual Studio Community 2013
into your system.
Operation System:
Windows 8.1, 8 and Windows 7 SP1
Hardware Requirements:
1.6 GHz or faster processor
1 GB of RAM
20 GB of free hard disk space
5400 RPM hard disk drive
DirectX 9-Capable Video card with 1024x768 of minimum resolution
To install the Visual Studio Community 2013, you need to use the following
procedure to complete the installation.
Step 1
Click on the following URL [Visual Studio Community 2013] and you will be shown the
following screen.
Step 2
Click on the Download button and an installer file will start downloading to your system.
Step 3
After the file is completely downloaded on your system, click on the file and run the setup.
An important point to note here is Visual Studio demands a minimum of 9 GB space to be
available somewhere in all your partitions. Please ensure this requirement to continue with
the installation.
Check the “I agree” checkbox and you'll be shown the Next button on the bottom-right of
the wizard. Click it to proceed.
Step 4
Choose from the following options to install the specific or complete features. It is a best
practice to install all the features, still you can choose depending on your requirements and
click Install.
Step 5
The installation process takes some time to download the useful resources and other files
from the internet to complete the installation depending upon the speed of your internet
connection. During my installation, it took just 1 hour to complete the installation.
Step 6
After the setup is finished installing Visual Studio Community 2013 on your machine, it
shows the following window. Click on “Launch” to launch Visual Studio.
Step 7
When you're done with your development settings, click Start Visual Studio and voila, you
are ready to play with the fully functional Visual Studio Community 2013 for free.
DESCRIPTION:
The aim of this experiment is to introduce the fundamental concepts of programming
using Visual Studio and C#. The objective is to create a simple console application
that outputs the message "Hello, World!" when executed. This exercise serves as an
initial hands-on experience for students to become familiar with the development
environment, syntax, and basic structure of a C# program. Through this introductory
exercise, participants will gain practical insights into the process of coding, compiling,
and running a basic program, laying the foundation for more complex programming
concepts in subsequent experiments.
Source Code:
HelloWorld.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace helloworld_prog1
{
internal class Program
{
static void Main(string[] args)
{
Console.WriteLine("Hello, World!");
}
}
}
OUTPUT:
<asp:ListItem Value="">Select</asp:ListItem>
<asp:ListItem>BCA </asp:ListItem>
<asp:ListItem>BBA</asp:ListItem>
<asp:ListItem>BCOM</asp:ListItem>
</asp:DropDownList>
</div>
<br/>
<div>
<label for="year">Batch / Year:</label>
<asp:DropDownList ID="year" runat="server" >
<asp:ListItem Value="">Select</asp:ListItem>
<asp:ListItem>I </asp:ListItem>
<asp:ListItem>II</asp:ListItem>
<asp:ListItem>III</asp:ListItem>
</asp:DropDownList>
</div>
<br/>
<div>
<label for="date">Date:</label>
<asp:Calendar ID="Calendar" runat="server"></asp:Calendar>
</div>
<br/>
<div>
<label for="status">Attendance:</label>
<asp:DropDownList ID="status" runat="server" >
<asp:ListItem Value="">Select</asp:ListItem>
<asp:ListItem>Present </asp:ListItem>
<asp:ListItem>Absent</asp:ListItem>
</asp:DropDownList>
</div>
<br/>
<div>
<asp:Label ID="resultLabel" runat="server" Text=""></asp:Label>
</div>
<br/>
<div>
<asp:Button ID="submitAttendance" runat="server" Text="Submit"
OnClick="SubmitAttendance_Click" />
</div>
</form>
</body>
</html>
attendanceform.aspx.cs
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace StudentsAttendance
{
public partial class attendanceform : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void SubmitAttendance_Click(object sender, EventArgs e)
{
string studentNameValue = studentName.Text;
string dateValue = Calendar.SelectedDate.ToShortDateString();
course.Text = course.SelectedValue;
string courseValue = course.Text;
year.Text = year.SelectedValue;
string yearValue = year.Text;
string presentValue =status.SelectedValue;
string result = $"Student Name: {studentNameValue}<br />Course: {courseValue}<br
/>Batch / Year: {yearValue}<br />Date: {dateValue}<br />Present: {presentValue}";
resultLabel.Text = result;
}
}
}
OUTPUT:
SOURCE CODE
FormControls.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormControls.aspx.cs"
Inherits="FormControls.FormControls" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style type="text/css">
.auto-style1 {
width: 100%;
.auto-style2 {
margin-left: 0px;
.auto-style3 {
width: 121px;
</style>
</head>
<body>
<div>
<h2>Form Controls</h2>
<table class="auto-style1">
<tr>
<td class="auto-style3">
<td>
</tr>
<tr>
<td class="auto-style3">
<td>
</tr>
<tr>
<td class="auto-style3">
<td>
</tr>
<tr><td class="auto-style3">
<td>
</td></tr>
<tr>
<td class="auto-style3">
</td>
<td>
OnSelectionChanged="Calendar1_SelectionChanged"></asp:Calendar>
</td>
</tr>
</table>
</div>
<p>
</p>
</form>
</body>
</html>
FormControls.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace FormControls
userInput.Text = UserName.Text;
genderId.Text = "";
if (RadioButton3.Checked)
}
OUTPUT
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<div>
</asp:DropDownList>
</div>
</form>
</body>
</html>
DropdownList.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Collections;
namespace DropdownListForLoop
if (!this.IsPostBack)
cities.Add("Hyderabad");
cities.Add("Delhi");
cities.Add("Mumbai");
cities.Add("Bangalore");
}
OUTPUT
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data.SqlClient;
using System.Xml.Linq;
namespace datasource
new Program().CreateTable();
new Program().InsertOperation();
new Program().UpdateOperation();
try
// Creating Connection
// Opening Connection
con.Open();
cm.ExecuteNonQuery();
// Displaying a message
catch (Exception e)
con.Close();
try
// Creating Connection
// Opening Connection
con1.Open();
cm1.ExecuteNonQuery();
cm2.ExecuteNonQuery();
// Displaying a message
while (sdr.Read())
{
Console.WriteLine(sdr["id"] + " " + sdr["name"] + " " + sdr["email"] + " " +
sdr["salary"]); // Displaying Record
catch (Exception e)
finally
con1.Close();
try
// Creating Connection
// Opening Connection
con1.Open();
cm4.ExecuteNonQuery();
// Displaying a message
while (sdr2.Read())
catch (Exception e)
finally
con1.Close();
OUTPUT:
8. Asp.net for student marks using HTML along with Form Controls
AIM: Design and implement an ASP.NET web form for student marks utilizing HTML and
Form Controls in order to facilitate efficient data entry and submission. The aim is to provide
a practical understanding of creating interactive user interfaces and handling user inputs in
the context of a student marks management system, enhancing skills crucial for web
development in the laboratory setting.
DESCRIPTION:
This lab session is dedicated to the practical exploration of web development using
ASP.NET, HTML, and Form Controls for the creation of a student marks management
system. The aim is to guide participants in designing and implementing an interactive
web form that allows for the seamless entry and submission of student marks.
Through the utilization of HTML and Form Controls in ASP.NET, participants will gain
hands-on experience in creating a user-friendly interface, capturing essential data
such as student names, subjects, and marks. The session aims to foster a deeper
understanding of web form design principles, data input handling, and event-driven
programming in the context of a student-centric application. Participants will be
empowered with skills applicable to real-world web development scenarios,
preparing them for more advanced projects in the ASP.NET environment.
SOURCE CODE:
StudentMarks.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="StudentMarks.aspx.cs"
Inherits="StudentMarks.StudentMarks" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2>Student Marks Entry</h2>
<div>
<label for="txtStudentRollNO">Student RollNO:</label>
<asp:TextBox ID="txtStudentRollNO" runat="server" CssClass="form-
control"></asp:TextBox>
</div>
<br/>
<div>
<label for="txtStudentName">Student Name:</label>
<asp:TextBox ID="txtStudentName" runat="server" CssClass="form-
control"></asp:TextBox>
</div>
<br/>
<div>
<label for="txtSubject">Subject:</label>
<asp:DropDownList ID="Subject" runat="server" >
<asp:ListItem Value="">Select</asp:ListItem>
<asp:ListItem>UNIX</asp:ListItem>
<asp:ListItem>ASP.NET</asp:ListItem>
<asp:ListItem>OOAD</asp:ListItem>
<asp:ListItem>SOFTWARE QUALITY TESTING</asp:ListItem>
<asp:ListItem>MOBILE APPLICATIONS</asp:ListItem>
</asp:DropDownList>
<label for="txtMarks">Marks:</label>
<asp:TextBox ID="txtMarks" runat="server" CssClass="form-control"></asp:TextBox>
</div>
<br/>
<br/>
<br/>
<div>
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="btnSubmit_Click" CssClass="btn btn-primary" />
</div>
</div>
</form>
</body>
</html>
StudentMarks.aspx.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
namespace StudentMarks
{
public partial class StudentMarks : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btnSubmit_Click(object sender, EventArgs e)
{
// Handle the submit button click event
string studentRollNO = txtStudentRollNO.Text;
string studentName = txtStudentName.Text;
string subject = Subject.SelectedValue;
string marks = txtMarks.Text;
OUTPUT: