Create an exposure of web applications and tools . generate ASP.
NET program using c#
Part 1: Exposure to Web Applications & Tools
What is a Web Application?
A web application is software that runs on a web server and is accessed via a browser. Unlike
traditional desktop apps, web apps are platform-independent and accessible from anywhere.
Common Tools & Technologies in Web App Development:
Category Tools/Technologies
Frontend (UI) HTML, CSS, JavaScript, Bootstrap, Angular, React
Backend (Logic) ASP.NET, Node.js, Django, PHP, Java Spring
Languages C#, Python, JavaScript, Java, PHP
Databases SQL Server, MySQL, MongoDB, PostgreSQL
Web Servers IIS (for ASP.NET), Apache, Nginx
IDE/Editors Visual Studio, Visual Studio Code, JetBrains Rider
Version Control Git, GitHub, GitLab
Hosting Azure, AWS, IIS, Netlify
Tools for Debugging Browser DevTools, Postman, Fiddler, Swagger
Part 2: ASP.NET Web Application Example Using C
Goal: Create a simple Student Info Form using ASP.NET
Web Forms with C#
1. Frontend – StudentForm.aspx
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="StudentForm.aspx.cs"
Inherits="StudentForm" %>
<!DOCTYPE html>
<html>
<head runat="server">
<title>Student Info Form</title>
<style>
body { font-family: Arial; padding: 20px; }
.form-group { margin-bottom: 10px; }
</style>
</head>
<body>
<form id="form1" runat="server">
<h2>Student Registration Form</h2>
<div class="form-group">
<asp:Label ID="Label1" runat="server" Text="Full Name: " />
<asp:TextBox ID="txtName" runat="server" />
</div>
<div class="form-group">
<asp:Label ID="Label2" runat="server" Text="Email: " />
<asp:TextBox ID="txtEmail" runat="server" TextMode="Email" />
</div>
<div class="form-group">
<asp:Label ID="Label3" runat="server" Text="Course: " />
<asp:DropDownList ID="ddlCourse" runat="server">
<asp:ListItem Text="-- Select Course --" Value="" />
<asp:ListItem Text="Computer Science" Value="CS" />
<asp:ListItem Text="Information Technology" Value="IT" />
<asp:ListItem Text="Electronics" Value="ECE" />
</asp:DropDownList>
</div>
<div class="form-group">
<asp:Button ID="btnSubmit" runat="server" Text="Register"
OnClick="btnSubmit_Click" />
</div>
<div class="form-group">
<asp:Label ID="lblResult" runat="server" Font-Bold="true"
ForeColor="Green" />
</div>
</form>
</body>
</html>
2. Backend – StudentForm.aspx.cs
using System;
public partial class StudentForm : System.Web.UI.Page
{
protected void btnSubmit_Click(object sender, EventArgs e)
{
string name = txtName.Text.Trim();
string email = txtEmail.Text.Trim();
string course = ddlCourse.SelectedItem.Text;
if (string.IsNullOrEmpty(name) || string.IsNullOrEmpty(email) ||
ddlCourse.SelectedIndex == 0)
{
lblResult.ForeColor = System.Drawing.Color.Red;
lblResult.Text = "Please fill all fields correctly.";
}
else
{
lblResult.ForeColor = System.Drawing.Color.Green;
lblResult.Text = $"Student {name} ({email}) has registered for
{course}.";
}
}
}
How to Run This Web App
1. Open Visual Studio
2. Create a new project: ASP.NET Web Forms App (.NET Framework)
3. Replace the Default.aspx and Default.aspx.cs files with StudentForm.aspx and
StudentForm.aspx.cs
4. Press F5 to run the app