0% found this document useful (0 votes)
7 views43 pages

Journal

The document outlines the design of a hostel information form and a registration page using ASP.NET. It includes the structure of the HTML forms, server-side code for handling submissions, and validation scripts. The forms collect various personal and guardian details, and upon submission, redirect to a results page displaying the entered information.

Uploaded by

mr.mungara0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
7 views43 pages

Journal

The document outlines the design of a hostel information form and a registration page using ASP.NET. It includes the structure of the HTML forms, server-side code for handling submissions, and validation scripts. The forms collect various personal and guardian details, and upon submission, redirect to a results page displaying the entered information.

Uploaded by

mr.mungara0003
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 43

Q – 1 Design the below table and display the data on submit click in the below table row.

Ans :

Default.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"
Inherits="Hostel._Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Hostel Information Form</title>
<link href ="Styles.css" rel ="stylesheet" type ="text/css" />
<script src ="Validation.js" type ="text/javascript" /> </script>
</head>

<body>
<form id="form1" runat="server">
<div>
<h2>Personal Profile</h2>
<table>
<tr>
<td>Hosteler ID:</td>
<td><asp:TextBox ID="txtHostelerID"
runat="server"></asp:TextBox></td>
<td>DOB:</td>
<td><asp:TextBox ID="txtDOB" runat="server"></asp:TextBox></td>
</tr>
<tr>

Dhaval Mungara Page 1


<td>Hosteler Name:</td>
<td><asp:TextBox ID="txtHostelerName"
runat="server"></asp:TextBox></td>
<td>Room No.:</td>
<td><asp:TextBox ID="txtRoomNo" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Hostel Name:</td>
<td><asp:TextBox ID="txtHostelName"
runat="server"></asp:TextBox></td>
<td>Room Type:</td>
<td><asp:TextBox ID="txtRoomType"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Date of Joining:</td>
<td><asp:TextBox ID="txtDateOfJoining"
runat="server"></asp:TextBox></td>
<td>Gender:</td>
<td><asp:TextBox ID="txtGender" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Father's Name:</td>
<td><asp:TextBox ID="txtFathersName"
runat="server"></asp:TextBox></td>
<td>Phone:</td>
<td><asp:TextBox ID="txtPhone" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Mother's Name:</td>
<td><asp:TextBox ID="txtMothersName"
runat="server"></asp:TextBox></td>
<td>Mobile No.:</td>
<td><asp:TextBox ID="txtMobileNo"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Purpose:</td>
<td><asp:TextBox ID="txtPurpose"
runat="server"></asp:TextBox></td>
<td>Email ID:</td>
<td><asp:TextBox ID="txtEmail" runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>City:</td>
<td><asp:TextBox ID="txtCity" runat="server"></asp:TextBox></td>
<td>Address:</td>
<td><asp:TextBox ID="txtAddress"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Inst./Office Details:</td>
<td><asp:TextBox ID="txtOfficeDetails"
runat="server"></asp:TextBox></td>
<td>Contact No.:</td>
<td><asp:TextBox ID="txtContactNo"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Agreement (in months):</td>
<td><asp:TextBox ID="txtAgreement"
runat="server"></asp:TextBox></td>

Dhaval Mungara Page 2


<td>Completion Date:</td>
<td><asp:TextBox ID="txtCompletionDate"
runat="server"></asp:TextBox></td>
</tr>
</table>

<h3>Guardian Information</h3>
<table>
<tr>
<td>Guardian Name:</td>
<td><asp:TextBox ID="txtGuardianName"
runat="server"></asp:TextBox></td>
<td>Phone:</td>
<td><asp:TextBox ID="txtGuardianPhone"
runat="server"></asp:TextBox></td>
</tr>
<tr>
<td>Address:</td>
<td><asp:TextBox ID="txtGuardianAddress"
runat="server"></asp:TextBox></td>
</tr>
</table>

<asp:Button ID="btnSubmit" runat="server" Text="Submit"


OnClick="btnSubmit_Click" />
</div>
</form>
</body>
</html>

 Default.aspx.vb
Public Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles


btnSubmit.Click
' Collect form data
Dim queryString As String = "HostelerID=" &
Server.UrlEncode(txtHostelerID.Text) & _
"&HostelerName=" &
Server.UrlEncode(txtHostelerName.Text) & _
"&DOB=" & Server.UrlEncode(txtDOB.Text) & _
"&RoomNo=" & Server.UrlEncode(txtRoomNo.Text)
& _
"&HostelName=" &
Server.UrlEncode(txtHostelName.Text) & _
"&RoomType=" &
Server.UrlEncode(txtRoomType.Text) & _
"&DateOfJoining=" &
Server.UrlEncode(txtDateOfJoining.Text) & _
"&Gender=" & Server.UrlEncode(txtGender.Text)
& _

Dhaval Mungara Page 3


"&FathersName=" &
Server.UrlEncode(txtFathersName.Text) & _
"&Phone=" & Server.UrlEncode(txtPhone.Text) &
_
"&MothersName=" &
Server.UrlEncode(txtMothersName.Text) & _
"&MobileNo=" &
Server.UrlEncode(txtMobileNo.Text) & _
"&Purpose=" &
Server.UrlEncode(txtPurpose.Text) & _
"&Email=" & Server.UrlEncode(txtEmail.Text) &
_
"&City=" & Server.UrlEncode(txtCity.Text) & _
"&Address=" &
Server.UrlEncode(txtAddress.Text) & _
"&OfficeDetails=" &
Server.UrlEncode(txtOfficeDetails.Text) & _
"&ContactNo=" &
Server.UrlEncode(txtContactNo.Text) & _
"&Agreement=" &
Server.UrlEncode(txtAgreement.Text) & _
"&CompletionDate=" &
Server.UrlEncode(txtCompletionDate.Text) & _
"&GuardianName=" &
Server.UrlEncode(txtGuardianName.Text) & _
"&GuardianPhone=" &
Server.UrlEncode(txtGuardianPhone.Text) & _
"&GuardianAddress=" &
Server.UrlEncode(txtGuardianAddress.Text)

' Redirect to Result.aspx with the form data


Response.Redirect("Result.aspx?" & queryString)
End Sub
End Class

 Result.aspx
Public Class _Default
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub btnSubmit_Click(sender As Object, e As EventArgs) Handles


btnSubmit.Click
' Collect form data
Dim queryString As String = "HostelerID=" &
Server.UrlEncode(txtHostelerID.Text) & _
"&HostelerName=" &
Server.UrlEncode(txtHostelerName.Text) & _
"&DOB=" & Server.UrlEncode(txtDOB.Text) & _
"&RoomNo=" & Server.UrlEncode(txtRoomNo.Text)
& _
"&HostelName=" &
Server.UrlEncode(txtHostelName.Text) & _
"&RoomType=" &
Server.UrlEncode(txtRoomType.Text) & _

Dhaval Mungara Page 4


"&DateOfJoining=" &
Server.UrlEncode(txtDateOfJoining.Text) & _
"&Gender=" & Server.UrlEncode(txtGender.Text)
& _
"&FathersName=" &
Server.UrlEncode(txtFathersName.Text) & _
"&Phone=" & Server.UrlEncode(txtPhone.Text) &
_
"&MothersName=" &
Server.UrlEncode(txtMothersName.Text) & _
"&MobileNo=" &
Server.UrlEncode(txtMobileNo.Text) & _
"&Purpose=" &
Server.UrlEncode(txtPurpose.Text) & _
"&Email=" & Server.UrlEncode(txtEmail.Text) &
_
"&City=" & Server.UrlEncode(txtCity.Text) & _
"&Address=" &
Server.UrlEncode(txtAddress.Text) & _
"&OfficeDetails=" &
Server.UrlEncode(txtOfficeDetails.Text) & _
"&ContactNo=" &
Server.UrlEncode(txtContactNo.Text) & _
"&Agreement=" &
Server.UrlEncode(txtAgreement.Text) & _
"&CompletionDate=" &
Server.UrlEncode(txtCompletionDate.Text) & _
"&GuardianName=" &
Server.UrlEncode(txtGuardianName.Text) & _
"&GuardianPhone=" &
Server.UrlEncode(txtGuardianPhone.Text) & _
"&GuardianAddress=" &
Server.UrlEncode(txtGuardianAddress.Text)

' Redirect to Result.aspx with the form data


Response.Redirect("Result.aspx?" & queryString)
End Sub
End Class

 Result.aspx.vb
Public Class Result
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
' Display the submitted data
litHostelerID.Text = Request.QueryString("HostelerID")
litHostelerName.Text = Request.QueryString("HostelerName")
litDOB.Text = Request.QueryString("DOB")
litRoomNo.Text = Request.QueryString("RoomNo")
litHostelName.Text = Request.QueryString("HostelName")
litRoomType.Text = Request.QueryString("RoomType")
litDateOfJoining.Text = Request.QueryString("DateOfJoining")
litGender.Text = Request.QueryString("Gender")
litFathersName.Text = Request.QueryString("FathersName")
litPhone.Text = Request.QueryString("Phone")

Dhaval Mungara Page 5


litMothersName.Text = Request.QueryString("MothersName")
litMobileNo.Text = Request.QueryString("MobileNo")
litPurpose.Text = Request.QueryString("Purpose")
litEmail.Text = Request.QueryString("Email")
litCity.Text = Request.QueryString("City")
litAddress.Text = Request.QueryString("Address")
litOfficeDetails.Text = Request.QueryString("OfficeDetails")
litContactNo.Text = Request.QueryString("ContactNo")
litAgreement.Text = Request.QueryString("Agreement")
litCompletionDate.Text = Request.QueryString("CompletionDate")
litGuardianName.Text = Request.QueryString("GuardianName")
litGuardianPhone.Text = Request.QueryString("GuardianPhone")
litGuardianAddress.Text = Request.QueryString("GuardianAddress")
End Sub

End Class

 Validation.js
// Validation.js
function validateForm() {
var isValid = true;

// Clear previous error messages


var errors = document.getElementsByClassName("error");
for (var i = 0; i < errors.length; i++) {
errors[i].innerHTML = "";
}

// Hosteler ID
var hostelerID = document.getElementById("txtHostelerID").value;
if (hostelerID == "") {
document.getElementById("errorHostelerID").innerHTML = "Hosteler ID is
required";
isValid = false;
}

// Hosteler Name
var hostelerName = document.getElementById("txtHostelerName").value;
if (hostelerName == "") {
document.getElementById("errorHostelerName").innerHTML = "Hosteler Name is
required";
isValid = false;
}

// Email validation
var email = document.getElementById("txtEmail").value;
var emailPattern = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
if (email == "" || !emailPattern.test(email)) {
document.getElementById("errorEmail").innerHTML = "Valid Email is
required";
isValid = false;
}

// Phone validation
var phone = document.getElementById("txtPhone").value;
var phonePattern = /^[0-9]{10}$/;
if (phone == "" || !phonePattern.test(phone)) {

Dhaval Mungara Page 6


document.getElementById("errorPhone").innerHTML = "Valid Phone number is
required (10 digits)";
isValid = false;
}

return isValid;
}

OUTPUT :

Dhaval Mungara Page 7


Dhaval Mungara Page 8
Q – 2 Design a registration page with proper validation as shown below. If the inputted
data is proper and valid then redirect user to next page which is a login page. Login page
should contain fields like username and password and a submit button with validation
and if the login details is valid then redirect user to welcome page.

Ans :

 Register
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Register.aspx.vb"
Inherits="WebApplication4.Register" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Registration Page</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<div class="form-container">
<h2>Registration Page</h2>

<label for="txtRegistrationId">Registration Id:</label>


<asp:TextBox ID="txtRegistrationId" runat="server"></asp:TextBox>

<label for="txtUserName">User Name:</label>


<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>

<label for="txtPassword">Password:</label>
<asp:TextBox ID="txtPassword" runat="server"
TextMode="Password"></asp:TextBox>

<label for="txtFirstName">First Name:</label>


<asp:TextBox ID="txtFirstName" runat="server"></asp:TextBox>

<label for="txtLastName">Last Name:</label>


<asp:TextBox ID="txtLastName" runat="server"></asp:TextBox>

<label>Gender:</label>
<asp:RadioButton ID="rbtnMale" runat="server" GroupName="Gender"
Text="Male" />
<asp:RadioButton ID="rbtnFemale" runat="server" GroupName="Gender"
Text="Female" />

<label>Date of Birth:</label>
<asp:TextBox ID="txtDOB" runat="server" TextMode="Date"></asp:TextBox>

<label for="txtAddress">Address:</label>
<asp:TextBox ID="txtAddress" runat="server"
TextMode="MultiLine"></asp:TextBox>

<label for="ddlCountry">Country:</label>
<asp:DropDownList ID="ddlCountry" runat="server">
<asp:ListItem>India</asp:ListItem>
<asp:ListItem>USA</asp:ListItem>
<asp:ListItem>UK</asp:ListItem>
</asp:DropDownList>

Dhaval Mungara Page 9


<label>Hobbies:</label>
<asp:CheckBox ID="chkReading" runat="server" Text="Reading" />
<asp:CheckBox ID="chkWriting" runat="server" Text="Writing" />
<asp:CheckBox ID="chkSinging" runat="server" Text="Singing" />

<label for="txtMobileNo">Mobile No:</label>


<asp:TextBox ID="txtMobileNo" runat="server"></asp:TextBox>

<div class="form-buttons">
<asp:Button ID="btnSubmit" runat="server" Text="Submit"
OnClick="Submit_Click" />
<asp:Button ID="btnReset" runat="server" Text="Reset" />
</div>
</div>
</form>
</body>
</html>

 Behind Register
Partial Class Register
Inherits System.Web.UI.Page

Protected Sub Submit_Click(sender As Object, e As EventArgs) Handles


btnSubmit.Click
' Perform backend validation (if required)
' For simplicity, after registration redirect to login
If Page.IsValid Then
' Logic to store user data in the database can be added here.
Response.Redirect("Login.aspx")
End If

End Sub

Protected Sub Reset_Click(sender As Object, e As EventArgs) Handles


btnReset.Click
' Clear all input fields on reset
txtRegistrationId.Text = String.Empty
txtUserName.Text = String.Empty
txtPassword.Text = String.Empty
txtFirstName.Text = String.Empty
txtLastName.Text = String.Empty
rbtnMale.Checked = False
rbtnFemale.Checked = False
txtDOB.Text = String.Empty
txtAddress.Text = String.Empty
ddlCountry.SelectedIndex = 0
chkReading.Checked = False
chkWriting.Checked = False
chkSinging.Checked = False
txtMobileNo.Text = String.Empty
End Sub
End Class

Dhaval Mungara Page 10


 Login
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb"
Inherits="WebApplication4.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Login Page</title>
<link rel="stylesheet" type="text/css" href="styles.css" />
</head>
<body>
<form id="form1" runat="server">
<div class="form-container">
<h2>Login Page</h2>

<label for="txtUserName">User Name:</label>


<asp:TextBox ID="txtUserName" runat="server"></asp:TextBox>

<label for="txtPassword">Password:</label>
<asp:TextBox ID="txtPassword" runat="server"
TextMode="Password"></asp:TextBox>

<div class="form-buttons">
<asp:Button ID="btnLogin" runat="server" Text="Login"
OnClick="Login_Click" />
</div>
</div>
</form>
</body>
</html>

 Behind login
Public Class Login
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load

End Sub

Protected Sub Login_Click(sender As Object, e As EventArgs) Handles


btnLogin.Click
' Simple validation
If txtUserName.Text = "admin" And txtPassword.Text = "admin" Then
' If valid, redirect to welcome page
Response.Redirect("Welcome.aspx")
Else
' Invalid credentials message
Response.Write("<script>alert('Invalid Username or
Password');</script>")
End If
End Sub
End Class

Dhaval Mungara Page 11


 Welcome

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Welcome.aspx.vb"


Inherits="Journal_2.Welcome" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Welcome Page</title>

<style>
body {
font-family: Arial, sans-serif;
margin: 0;
padding: 0;

}
.navbar {
background-color: #333;
overflow: hidden;
}
.navbar a {
float: left;
display: block;
color: #f2f2f2;
text-align: center;
padding: 14px 20px;
text-decoration: none;
}
.navbar a:hover {
background-color: #ddd;
color: black;
}
.header {
padding: 30px;
text-align: center;
background-color: lightgray;
}
.header h1 {
font-size: 50px;
}
.footer {
padding: 20px;
text-align: center;
background: #333;
color: white;
position: fixed;
width: 100%;
bottom: 0;
}

</style>
</head>
<body>

<div class="navbar">
<a href="#home">Home</a>
<a href="#services">Services</a>
<a href="#about">About</a>
<a href="#contact">Contact</a>
</div>

Dhaval Mungara Page 12


<div class="header">
<h1>Welcome to Our Website</h1>
<h3><i><p>We are glad to have you here.</p></i></h3>
</div>

<div class="content">
<p><h3>This is where your main content will go.</h3></p>
</div>

<div class="footer">
<p>Footer Content Here</p>
</div>

</body>
</html>

OUTPUT :

Dhaval Mungara Page 13


Dhaval Mungara Page 14
Q – 3 Create an application to generate Employee Salary Slip. Input fields are Employee
No., Employee Name, Designation, Basic Salary and deductions.

Gross salary = Basic Salary + DA + HRA + Medical

DA= 80% of basic

HRA = 20% of basic

Medical = 1% of basic

Net salary = Gross Salary – (PF + Deductions)

PF = 12% of basic

Deductions can be any from (LIC, Medi Claim, Mutual Funds)

Output should be in proper format with detailed salary slip

Ans :

 Default.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Default.aspx.vb"
Inherits="_3._Default" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Employee Salary Slip Generator</title>
<style type="text/css">
/* Global Styles */
body {
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
background-color: #f7f9fc;
margin: 0;
padding: 0;
color: #333;
}

/* Container */
.container {
max-width: 600px;
margin: 60px auto;
background-color: #fff;
padding: 40px;
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
border-radius: 12px;
border: 1px solid #e0e0e0;
}

/* Header */
h2 {

Dhaval Mungara Page 15


text-align: center;
color: #3498db;
font-size: 30px;
font-weight: 700;
margin-bottom: 40px;
border-bottom: 3px solid #3498db;
padding-bottom: 10px;
text-transform: uppercase;
}

/* Table Styles */
table {
width: 100%;
border-collapse: separate;
border-spacing: 0 15px;
}

th, td {
padding: 15px 20px;
text-align: left;
font-size: 16px;
}

th {
font-size: 18px;
color: #555;
}

td {
background-color: #f7f9fc;
border-radius: 8px;
box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
}

/* Form Control Styles */


.form-control {
width: 100%;
padding: 12px 18px;
margin: 5px 0 20px;
border: 1px solid #ccd1d9;
border-radius: 8px;
font-size: 16px;
box-sizing: border-box;
transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-control:focus {
border-color: #3498db;
outline: none;
box-shadow: 0 0 8px rgba(52, 152, 219, 0.3);
}

/* Button Styles */
.btn-primary {
display: block;
width: 100%;
padding: 15px;
background-color: #3498db;
color: white;
font-size: 18px;
font-weight: 600;
border: none;

Dhaval Mungara Page 16


border-radius: 8px;
cursor: pointer;
text-align: center;
transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-primary:hover {
background-color: #2980b9;
transform: translateY(-2px);
}

/* Note Section */
.note {
margin-top: 30px;
font-size: 14px;
color: #888;
text-align: center;
background-color: #eef2f5;
padding: 15px;
border-radius: 8px;
border: 1px solid #ccd1d9;
}

/* Responsive Design */
@media (max-width: 600px) {
.container {
padding: 20px;
}

h2 {
font-size: 24px;
}

th, td {
padding: 10px 15px;
font-size: 14px;
}

.btn-primary {
padding: 12px;
font-size: 16px;
}

.form-control {
padding: 10px 15px;
}
}
</style>
</head>
<body>
<form id="form1" runat="server">
<div class="container">
<h2>Employee Salary Slip Generator</h2>
<table>
<tr>
<td><asp:Label ID="lblEmpNo" runat="server" Text="Employee
No:" /></td>
<td><asp:TextBox ID="txtEmpNo" runat="server" CssClass="form-
control" /></td>
</tr>
<tr>

Dhaval Mungara Page 17


<td><asp:Label ID="lblEmpName" runat="server" Text="Employee
Name:" /></td>
<td><asp:TextBox ID="txtEmpName" runat="server"
CssClass="form-control" /></td>
</tr>
<tr>
<td><asp:Label ID="lblDesignation" runat="server"
Text="Designation:" /></td>
<td><asp:TextBox ID="txtDesignation" runat="server"
CssClass="form-control" /></td>
</tr>
<tr>
<td><asp:Label ID="lblBasicSalary" runat="server" Text="Basic
Salary:" /></td>
<td><asp:TextBox ID="txtBasicSalary" runat="server"
CssClass="form-control" /></td>
</tr>
<tr>
<td><asp:Label ID="lblDeductions" runat="server"
Text="Deductions (comma-separated LIC, Medi Claim, Mutual Funds):" /></td>
<td><asp:TextBox ID="txtDeductions" runat="server"
CssClass="form-control" /></td>
</tr>
<tr>
<td colspan="2">
<asp:Button ID="btnGenerateSlip" runat="server"
Text="Generate Salary Slip" CssClass="btn-primary" OnClick="btnGenerateSlip_Click"
/>
</td>
</tr>
</table>
<div class="note">
Ensure that all fields are filled out correctly before generating
the salary slip.
</div>
</div>
</form>
</body>
</html>

 SalarySlip.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="SalarySlip.aspx.vb"
Inherits="_3.SalarySlip" %>

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Employee Salary Slip</title>
<style>
/* Global Styles */
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: sans-serif; /* Fallback for 'Segoe UI' */
}

body {
background-color: #f5f5f5;

Dhaval Mungara Page 18


color: #333;
display: flex;
justify-content: center;
align-items: center;
min-height: 100vh; /* Ensures viewport height */
transition: background-color 0.3s ease-in-out;
}

/* Form Styles */
#form1 {
background-color: #fff;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
border-radius: 5px;
padding: 25px;
max-width: 600px;
width: 100%;
animation: fadeIn 1s ease-out;
transition: transform 0.3s ease;
}

#form1:hover {
transform: translateY(-3px);
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
}

h2 {
text-align: center;
font-size: 20px; /* Adjusted for better scaling */
font-weight: 600;
margin-bottom: 20px;
}

/* Table Styles */
table {
width: 100%;
border-collapse: collapse;
margin-bottom: 20px;
}

th,
td {
padding: 12px 18px; /* Adjusted padding for better spacing */
border-bottom: 1px solid #ddd;
font-size: 16px;
}

th {
background-color: #f0f4f8;
color: #555;
font-weight: 500;
text-transform: uppercase;
letter-spacing: 0.05em;
}

td {
color: #666; /* Slightly lighter for readability */
font-weight: 400;
}

tr:nth-child(even) {
background-color: #fafafa; /* Alternate row background */
}

Dhaval Mungara Page 19


tr:hover {
background-color: #ececec;
}

/* Responsive Design */
@media (max-width: 768px) {
#form1 {
padding: 20px;
}

th,
td {
font-size: 14px;
padding: 10px 15px;
}

h2 {
font-size: 18px;
}
}

/* Keyframes for subtle animations */


@keyframes fadeIn {
from {
opacity: 0;
transform: scale(0.95);
}
to {
opacity: 1;
transform: scale(1);
}
}
</style>

</head>
<body>
<form id="form1" runat="server">
<div>
<h2>Employee Salary Slip</h2>
<table>
<tr>
<th>Employee No</th>
<td><asp:Label ID="lblEmpNo" runat="server" /></td>
</tr>
<tr>
<th>Employee Name</th>
<td><asp:Label ID="lblEmpName" runat="server" /></td>
</tr>
<tr>
<th>Designation</th>
<td><asp:Label ID="lblDesignation" runat="server" /></td>
</tr>
<tr>
<th>Basic Salary</th>
<td><asp:Label ID="lblBasicSalary" runat="server" /></td>
</tr>
<tr>
<th>DA (80%)</th>
<td><asp:Label ID="lblDA" runat="server" /></td>
</tr>
<tr>

Dhaval Mungara Page 20


<th>HRA (20%)</th>
<td><asp:Label ID="lblHRA" runat="server" /></td>
</tr>
<tr>
<th>Medical (1%)</th>
<td><asp:Label ID="lblMedical" runat="server" /></td>
</tr>
<tr>
<th>Gross Salary</th>
<td><asp:Label ID="lblGrossSalary" runat="server" /></td>
</tr>
<tr>
<th>PF (12%)</th>
<td><asp:Label ID="lblPF" runat="server" /></td>
</tr>
<tr>
<th>Total Deductions</th>
<td><asp:Label ID="lblTotalDeductions" runat="server" /></td>
</tr>
<tr>
<th>Net Salary</th>
<td><asp:Label ID="lblNetSalary" runat="server" /></td>
</tr>
</table>
</div>
</form>
</body>
</html>

 SalarySlip.aspx.vb
Public Class SalarySlip
Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs)


Handles Me.Load
' Retrieve values from session and display them
lblEmpNo.Text = Session("EmpNo").ToString()
lblEmpName.Text = Session("EmpName").ToString()
lblDesignation.Text = Session("Designation").ToString()
lblBasicSalary.Text = String.Format("{0:C}", Session("BasicSalary"))
lblDA.Text = String.Format("{0:C}", Session("DA"))
lblHRA.Text = String.Format("{0:C}", Session("HRA"))
lblMedical.Text = String.Format("{0:C}", Session("Medical"))
lblGrossSalary.Text = String.Format("{0:C}", Session("GrossSalary"))
lblPF.Text = String.Format("{0:C}", Session("PF"))
lblTotalDeductions.Text = String.Format("{0:C}",
Session("TotalDeductions"))
lblNetSalary.Text = String.Format("{0:C}", Session("NetSalary"))
End Sub

End Class

Dhaval Mungara Page 21


OUTPUT :

Dhaval Mungara Page 22


Q – 4 Develop a website for a courier service. Where user can perform login and inquire
status of his/her courier based on order number. Apply proper validation on user inputs.

Ans :

 Login
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Login.aspx.vb"

Inherits="WebApplication3.Login" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Login</title>

</head>

<body>

<form id="form1" runat="server">

<div>

<h2>Login</h2>

<asp:Label ID="lblUsername" runat="server" Text="Username:"

AssociatedControlID="txtUsername">

</asp:Label>

<asp:TextBox ID="txtUsername" runat="server"></asp:TextBox>

<br />

<asp:Label ID="lblPassword" runat="server" Text="Password:"

AssociatedControlID="txtPassword">

</asp:Label>

<asp:TextBox ID="txtPassword" runat="server" TextMode="Password"></asp:TextBox>

<br />

<asp:Label ID="lblError" runat="server" CssClass="error"></asp:Label>

<br />

Dhaval Mungara Page 23


<asp:Button ID="btnLogin" runat="server" CssClass="button" Text="Login" />

</div>

</form>

</body>

</html>

 Behind Login
Imports System.Data.SqlClient

Public Class Login

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub btnLogin_Click(sender As Object, e As EventArgs) Handles btnLogin.Click

If txtUsername.Text.Trim() = "" Then

lblError.Text = "Username is required."

Exit Sub

End If

If txtPassword.Text.Trim() = "" Then

lblError.Text = "Password is required."

Exit Sub

End If

Dim connString As String =

System.Configuration.ConfigurationManager.ConnectionStrings("CourierServiceConnectionString").C
on

nectionString

Using conn As New SqlConnection(connString)

Dim cmd As New SqlCommand("SELECT COUNT(*) FROM Users WHERE Username=@Username

AND Password=@Password", conn)

cmd.Parameters.AddWithValue("@Username", txtUsername.Text.Trim())

Dhaval Mungara Page 24


cmd.Parameters.AddWithValue("@Password", txtPassword.Text.Trim())

conn.Open()

Dim result As Integer = Convert.ToInt32(cmd.ExecuteScalar())

If result > 0 Then

Response.Redirect("Inquiry.aspx")

Else

lblError.Text = "Invalid username or password."

End If

End Using

End Sub

End Class

 Inquiry
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="Inquiry.aspx.vb"

Inherits="WebApplication3.Inquiry" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

<title>Courier Inquiry</title>

</head>

<body>

<form id="form1" runat="server">

<h2>Courier Status Inquiry</h2>

<asp:Label ID="lblOrderNumber" runat="server" Text="Order Number:"></asp:Label>

<br />

<br />

<asp:TextBox ID="txtOrderNumber" runat="server"></asp:TextBox>

<br />

Dhaval Mungara Page 25


&nbsp;&nbsp;

<asp:Label ID="lblStatus" runat="server"></asp:Label>

<br />

<br />

<asp:Button ID="btnInquire" runat="server" Text="Check Status" CssClass="button"

OnClick="btnInquire_Click" />

</form>

<div id="statusPopup" class="popup hidden">

<span id="popupMessage"></span>

</div>

</body>

</html>

 Behind Inquiry
Imports System.Data.SqlClient

Public Class Inquiry

Inherits System.Web.UI.Page

Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load

End Sub

Protected Sub btnInquire_Click(sender As Object, e As EventArgs) Handles btnInquire.Click

If txtOrderNumber.Text.Trim() = "" Then

lblStatus.Text = "Order number is required."

lblStatus.ForeColor = Drawing.Color.Red

Exit Sub

End If

Dim connString As String =

System.Configuration.ConfigurationManager.ConnectionStrings("CourierServiceConnectionString").C
on

Dhaval Mungara Page 26


nectionString

Using conn As New SqlConnection(connString)

Dim cmd As New SqlCommand("SELECT Status FROM Couriers WHERE

OrderNumber=@OrderNumber", conn)

cmd.Parameters.AddWithValue("@OrderNumber", txtOrderNumber.Text.Trim())

conn.Open()

Dim status As String = Convert.ToString(cmd.ExecuteScalar())

If String.IsNullOrEmpty(status) Then

lblStatus.Text = "Order number not found."

lblStatus.ForeColor = Drawing.Color.Red

Else

lblStatus.Text = status

lblStatus.ForeColor = Drawing.Color.Green

End If

End Using

End Sub

End Class

Dhaval Mungara Page 27


OUTPUT :

Dhaval Mungara Page 28


Dhaval Mungara Page 29
Q – 5 Develop e-commerce website for purchasing shoes of different brand and size. User
can purchase shoes online using facilities like registration, login, and order any product.
Apply proper validation on user inputs.

Ans :

 Register.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm1.aspx.vb"
Inherits="WebApplication4.WebForm1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
margin: 0;

.login-container {
background-color: #ffffff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 0 10px;
width: 100%;
max-width: 400px;
text-align: center;

.login-container h2 {
margin-bottom: 20px;
color: #333333;
font-size: 24px;
font-weight: 600;
}

.input-group {
margin-bottom: 20px;

.input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #ddd;
border-radius: 5px;
box-sizing: border-box;
border-radius:20px;

Dhaval Mungara Page 30


}

.input:focus {
border-color: #007bff;
outline: none;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.btn {
width: 100%;
padding: 10px;
font-size: 18px;
background-color: #007bff;
border: none;
border-radius: 5px;
color: white;
cursor: pointer;
transition: background-color 0.3s ease;
border-radius:20px;
}

.btn:hover {
background-color: #0056b3;
}

.message {
margin-bottom: 15px;
color: red;
font-size: 14px;
}
.options-container {
display: flex;
justify-content:center;
align-items: center;
}

.remember-me {
margin-right:10px;
}

.remember-me input {
margin-right: 5px;
}

.forgot-password a {
color: #007bff;
text-decoration: none;
font-size: 14px;
}
.forgot-password {
margin-left: 20px; /* Adjust the space as needed */
}
.forgot-password a:hover {
text-decoration: underline;
}

</style>
</head>
<body>
<form id="form1" runat="server">
<div class="login-container">
<h2>Register</h2>

Dhaval Mungara Page 31


<asp:Label ID="lblMessage" runat="server" CssClass="message"></asp:Label>
<div class="input-group">
<asp:TextBox ID="txtUsername" runat="server" CssClass="input"
placeholder="Username"></asp:TextBox>
</div>
<div class="input-group">
<asp:TextBox ID="Email" runat="server" CssClass="input"
placeholder="Email"></asp:TextBox>
</div>
<div class="input-group">
<asp:TextBox ID="password" runat="server" CssClass="input"
placeholder="Password"></asp:TextBox>
</div>
<div class="input-group">
<asp:TextBox ID="txtPassword" runat="server" CssClass="input"
TextMode="Password" placeholder="Confirm Password"></asp:TextBox>
</div>

<div class="input-group">
<asp:Button ID="btnLogin" runat="server" CssClass="btn"
Text="Register"/>
</div>
<div class="options-container">
<div class="remember-me">
<label for="chkRememberMe">I already have an Acoount</label>
</div> <!-- Close the remember-me div here -->

<div class="forgot-password">
<asp:HyperLink ID="lnkForgotPassword" runat="server"
NavigateUrl="~/ForgotPassword.aspx">Login</asp:HyperLink>
</div>
</div>

</div>
</form>
</body>
</html>

 Login.aspx

<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm2.aspx.vb"


Inherits="WebApplication4.WebForm2" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f7f7f7;
display: flex;
justify-content: center;
align-items: center;

Dhaval Mungara Page 32


height: 100vh;
margin: 0;

.login-container {
background-color: #ffffff;
padding: 40px;
border-radius: 10px;
box-shadow: 0 0 10px;
width: 100%;
max-width: 400px;
text-align: center;

.login-container h2 {
margin-bottom: 20px;
color: #333333;
font-size: 24px;
font-weight: 600;
}

.input-group {
margin-bottom: 20px;

.input {
width: 100%;
padding: 10px;
font-size: 16px;
border: 1px solid #ddd;
border-radius: 5px;
box-sizing: border-box;
border-radius:20px;
}

.input:focus {
border-color: #007bff;
outline: none;
box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.btn {
width: 100%;
padding: 10px;
font-size: 18px;
background-color: #007bff;
border: none;
border-radius: 5px;
color: white;
cursor: pointer;
transition: background-color 0.3s ease;
margin-top:40px;
border-radius:20px;
}

.btn:hover {
background-color: #0056b3;
}

Dhaval Mungara Page 33


.message {
margin-bottom: 15px;
color: red;
font-size: 14px;
}
.options-container {
display: flex;
justify-content: space-between;
align-items: center;
}

.remember-me {
margin-right:10px;
}

.remember-me input {
margin-right: 5px;
}

.forgot-password a {
color: #007bff;
text-decoration: none;
font-size: 14px;
}
.forgot-password {
margin-left: 20px; /* Adjust the space as needed */
}
.forgot-password a:hover {
text-decoration: underline;
}

</style>
</head>
<body>
<form id="form1" runat="server">
<div class="login-container">
<h2>Login</h2>
<asp:Label ID="lblMessage" runat="server" CssClass="message"></asp:Label>
<div class="input-group">
<asp:TextBox ID="txtUsername" runat="server" CssClass="input"
placeholder="Username"></asp:TextBox>
</div>
<div class="input-group">
<asp:TextBox ID="txtPassword" runat="server" CssClass="input"
TextMode="Password" placeholder="Password"></asp:TextBox>
</div>

<div class="options-container">
<div class="remember-me">
<asp:CheckBox ID="chkRememberMe" runat="server" />
<label for="chkRememberMe">Remember Me</label>
</div> <!-- Close the remember-me div here -->

<div class="forgot-password">
<asp:HyperLink ID="lnkForgotPassword" runat="server"
NavigateUrl="~/ForgotPassword.aspx">Forgot your password?</asp:HyperLink>
</div>
</div>
<div class="input-group">
<asp:Button ID="btnLogin" runat="server" CssClass="btn" Text="Login"
/>
</div>

Dhaval Mungara Page 34


</div>
</form>
</body>
</html>

 Home.aspx
<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="WebForm4.aspx.vb"
Inherits="WebApplication4.WebForm4" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
<style>
body {
font-family: Arial, sans-serif;
background-color:lightgray;
margin: 0;
padding: 0;
display: flex; /* Use flexbox for horizontal arrangement */
justify-content: center; /* Center products horizontally */
align-items: center; /* Center products vertically */
overflow: auto;
height: 100vh;

align-items: flex-start;
min-height: 100vh;
}

.sidebar {
width: 250px;
background-color: #333;
color: #fff;
padding: 20px;
position: fixed;
top: 80px;
left: -250px; /* Initially hide the sidebar off-screen */
height: calc(100% - 80px);
box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
z-index: 999;
transition: left 0.3s ease; /* Smooth transition for sliding effect */
}

.sidebar.active {
left: 0; /* Move sidebar into view */
}

.sidebar h2 {
font-size: 1.5em;
margin-bottom: 20px;
border-bottom: 1px solid #444;
padding-bottom: 10px;
}

.sidebar ul {

Dhaval Mungara Page 35


list-style: none;
padding: 0;
margin: 0;
}

.sidebar ul li {
margin: 10px 0;
}

.sidebar ul li a {
color: #fff;
text-decoration: none;
font-size: 1.1em;
transition: color 0.3s ease;
}

.sidebar ul li a:hover {
color: #ff9800;
}

.content {
margin-left: 0; /* Adjust for toggling */
padding: 20px;
width: 100%; /* Adjust for toggling */
transition: margin-left 0.3s ease; /* Smooth transition for content shift */
}

.content.shifted {
margin-left: 270px; /* Adjust content when sidebar is active */
}

.product-container-wrapper {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: stretch;
margin-left:70px;
}

.product-image {
width: 300px;
border-radius: 20px;
}

.product-container {
background: linear-gradient(135deg, #ffffff, #f3f3f3);
padding: 20px;
box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
text-align: left;
border-radius: 15px;
width: 300px;
box-shadow: 0 0 10px;
margin: 15px;
transition: transform 0.3s ease, box-shadow 0.3s ease;
overflow: hidden;
position: relative;
margin-top: 120px;
}

.product-container:hover {
transform: translateY(-10px);
box-shadow: 0 12px 24px rgba(0, 0, 0, 0.2);

Dhaval Mungara Page 36


}

.product-container:hover .product-image {
transform: scale(1.1);
}

.product-title {
font-size: 1.5em;
margin: 15px 0;
text-align: center;
}

.product-description {
font-size: 1em;
margin: 10px 0;
text-align: center;
color: #666;
}

.product-price {
font-size: 1.2em;
color: #333;
text-align: center;
margin: 15px 0;
font-weight: bold;
}

.buy-button {
height: 40px;
width: 120px;
border-radius: 20px;
color: aliceblue;
background-color: Highlight;
display: block;
margin: 10px auto;
cursor: pointer;
border: none;
transition: background-color 0.3s ease, transform 0.3s ease;
}

.buy-button:hover {
background-color: #0056b3;
transform: scale(1.05);
}

.auto-style1 {
background-color: #fff;
padding: 20px;
box-shadow: 0 0 10px rgba(0,0,0,0.1);
text-align: center;
border-radius: 10px;
width: 300px;
box-shadow: 0 0 10px;
margin: 10px;
}

.auto-style2 {
text-align: center;
}

header {
width: 100%;

Dhaval Mungara Page 37


background-color: #333;
color: #fff;
padding: 10px 0;
text-align: center;
position: fixed;
top: 0;
left: 0;
z-index: 1000;
display: flex;
justify-content: space-between;
align-items: center;
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

nav a {
color: #fff;
margin: 0 15px;
text-decoration: none;
font-family: sans-serif;
position: relative;
transition: color 0.3s ease;
}

nav a::after {
content: '';
position: absolute;
width: 0;
height: 2px;
background-color: #ff9800;
left: 0;
bottom: -5px;
transition: width 0.3s ease-in-out;
}

nav a:hover {
color: #ff9800;
}

nav a:hover::after {
width: 100%;
}

.logo {
display: flex;
align-items: center;
margin-left: 50px;

.logo img {
height: 70px;
width:70px;

.auth-buttons {
display: flex;
align-items: center;
margin-right: 20px;
color:aliceblue;
}

Dhaval Mungara Page 38


.auth-buttons button {
margin-left: 15px;
padding: 8px 15px;
border: none;
border-radius: 20px;
color: #fff;
background-color: #555;
cursor: pointer;
transition: background-color 0.3s ease, transform 0.3s ease;
}

.auth-buttons button:hover {
background-color: #777;
transform: scale(1.1);
}

.toggle-button {
background-color: #333;
color: #fff;
padding: 10px;
border: none;
border-radius: 5px;
cursor: pointer;
position: fixed;
top: 10px;
left: 10px;
z-index: 1001;
}

.toggle-button:hover {
background-color: #555;
}

footer {
background-color: #333;
color: #fff;
padding: 20px;
text-align: center;
position: relative;
bottom: 0;
width: 100%;
box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

footer p {
margin: 10px 0;
}

footer a {
color: #ff9800;
text-decoration: none;
transition: color 0.3s ease;
}

footer a:hover {
color: #fff;
}
</style>
</head>
<body>
<header>
<div class="logo">

Dhaval Mungara Page 39


<img src="images-removebg-preview.png" alt="Logo">
</div>
<nav>
<a href="home.aspx">Home</a>
<a href="about.aspx">About</a>
<a href="blog.aspx">Blog</a>
<a href="contact.aspx">Contact</a>
</nav>
<div class="auth-buttons">
<button type="button">Login</button>
<button type="button">Sign Up</button>
</div>
</header>

<button class="toggle-button" onclick="toggleSidebar()">☰</button>

<div class="sidebar" id="sidebar">


<h2>Shoe Varieties</h2>
<ul>
<li><a href="#">Running Shoes</a></li>
<li><a href="#">Sneakers</a></li>
<li><a href="#">Formal Shoes</a></li>
<li><a href="#">Boots</a></li>
<li><a href="#">Sandals</a></li>
<li><a href="#">Slippers</a></li>
</ul>
</div>

<div class="content" id="content">


<div class="product-container-wrapper">
<div class="product-container">
<img
src="https://i.pinimg.com/736x/34/27/07/3427078fecf554d660612cad5ef2943c.jpg"
alt="Product Image" class="product-image">
<h1 class="product-title">Asic Gel Nimbus 23</h1>
<p class="product-description">Women's Wide D Running.</p>
<p class="product-price">₹650</p>
<button type="button" class="buy-button">Buy Now</button>
</div>

<div class="product-container">
<img src="https://img.freepik.com/premium-photo/running-shoes-white-
background_10541-635.jpg" alt="Product Image" class="product-image">
<h1 class="product-title">Nike E-Series</h1>
<p class="product-description">Everyday comfort gets a modern look..</p>
<p class="product-price">₹550</p>
<button type="button" class="buy-button">Buy Now</button>
</div>

<div class="product-container">
<img src="https://thumbs.dreamstime.com/b/sport-shoes-isolated-white-
background-running-training-116201104.jpg" alt="Product Image" class="product-
image">
<h1 class="product-title">Adidas GALAXY 6</h1>
<p class="product-description">Very GreateFull Product.</p>
<p class="product-price">₹890</p>
<button type="button" class="buy-button">Buy Now</button>
</div>

<div class="product-container">

Dhaval Mungara Page 40


<img
src="https://i.pinimg.com/736x/85/6f/60/856f601b906465f577a7b881a01367ec.jpg"
alt="Product Image" class="product-image">
<h1 class="product-title">BRUTON Sports Shoes</h1>
<p class="product-description">Great brand and awesome price.</p>
<p class="product-price">₹890</p>
<button type="button" class="buy-button">Buy Now</button>
</div>

<div class="product-container">
<img src="https://img.freepik.com/premium-photo/running-shoes-realistic-
4k-white-background_839182-6781.jpg" alt="Product Image" class="product-image">
<h1 class="product-title">CRUISER</h1>
<p class="product-description">This is a great product.</p>
<p class="product-price">₹650</p>
<button type="button" class="buy-button">Buy Now</button>
</div>

<div class="product-container">
<img
src="https://t3.ftcdn.net/jpg/00/82/88/66/360_F_82886619_a4xje5obM5bAajAjnx6ZzWb0I
s70kSQA.jpg" alt="Product Image" class="product-image">
<h1 class="product-title">FLYNCE Sneakers e</h1>
<p class="product-description">High Quality Synthetic Leather as upper
material and Airmax.</p>
<p class="product-price">₹1200</p>
<button type="button" class="buy-button">Buy Now</button>
</div>
<footer>
<p>&copy; 2024 Your Company Name. All rights reserved.</p>
<p><a href="#">Privacy Policy</a> | <a href="#">Terms of Service</a></p>
</footer>
</div>
</div>

<script>
function toggleSidebar() {
const sidebar = document.getElementById('sidebar');
const content = document.getElementById('content');
if (sidebar.classList.contains('active')) {
sidebar.classList.remove('active');
content.classList.remove('shifted');
} else {
sidebar.classList.add('active');
content.classList.add('shifted');
}
}
</script>
</body>
</html>

Dhaval Mungara Page 41


OUTPUT :-

Dhaval Mungara Page 42


Dhaval Mungara Page 43

You might also like