A Design Multiform Web Project With Following Menus: Home Courses, Departments, Staff 1. Home Page (Default - Aspx)
A Design Multiform Web Project With Following Menus: Home Courses, Departments, Staff 1. Home Page (Default - Aspx)
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Home Page</title>
</head>
<body>
<div>
<ul>
<li><a href="Courses.aspx">Courses</a></li>
<li><a href="Departments.aspx">Departments</a></li>
<li><a href="Alumni.aspx">Alumni</a></li>
<li><a href="Downloads.aspx">Downloads</a></li>
</ul>
</div>
</form>
</body>
</html>
2. Courses Page (Courses.aspx):
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Courses.aspx.cs"
Inherits="YourNamespace.Courses" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Courses</title>
</head>
<body>
<div>
<h1>Courses</h1>
<Columns>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Web.UI;
if (!IsPostBack)
BindCourses();
try
if (coursesTable.Rows.Count > 0)
GridViewCourses.DataSource = coursesTable;
GridViewCourses.DataBind();
else
Response.Write($"Error: {ex.Message}");
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Departments</title>
</head>
<body>
<div>
<h1>Departments</h1>
<Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Web.UI;
if (!IsPostBack)
BindDepartments();
try
GridViewDepartments.DataSource = departmentsTable;
GridViewDepartments.DataBind();
else
Response.Write($"Error: {ex.Message}");
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Staff Profile</title>
</head>
<body>
<h1>Staff Profile</h1>
<Columns>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Web.UI;
if (!IsPostBack)
{
BindStaffProfiles();
try
if (staffTable.Rows.Count > 0)
GridViewStaff.DataSource = staffTable;
GridViewStaff.DataBind();
else
Response.Write($"Error: {ex.Message}");
}
Alumni Page (Alumni.aspx)
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Alumni.aspx.cs"
Inherits="YourNamespace.Alumni" %>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Alumni</title>
</head>
<body>
<div>
<h1>Alumni</h1>
<Columns>
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Web.UI;
if (!IsPostBack)
BindAlumni();
try
if (alumniTable.Rows.Count > 0)
GridViewAlumni.DataSource = alumniTable;
GridViewAlumni.DataBind();
else
Response.Write($"Error: {ex.Message}");
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Downloads</title>
</head>
<body>
<div>
<h1>Downloads</h1>
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="FilePath"
DataNavigateUrlFormatString="~/Downloads/{0}" HeaderText="Download" Text="Download" />
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>
using System;
using System.Data;
using System.Web.UI;
if (!IsPostBack)
BindDownloads();
try
GridViewDownloads.DataSource = downloadsTable;
GridViewDownloads.DataBind();
else
Response.Write($"Error: {ex.Message}");
using System.Data.SqlClient;
connection.Open();
adapter.Fill(dataTable);
return dataTable;
using System.Web.UI;
if (!IsPostBack)
BindCourses();
}
private void BindCourses()
// YourGridView.DataSource = coursesTable;
// YourGridView.DataBind();