0% found this document useful (0 votes)
48 views4 pages

Mehul Imp File

hg

Uploaded by

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

Mehul Imp File

hg

Uploaded by

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

using System;

using System.Data.SqlClient;
using System.Web.UI;

namespace AWP_resume_builder_promax_
{
public partial class webawp : System.Web.UI.Page
{
protected void SaveResume(object sender, EventArgs e)
{
string name = Name.Value;
string email = Email.Value;
string phone = Phone.Value;
string address = Address.Value;
string skills = Skills.Value;
string experience = Experience.Value;

// Database connection string from Web.config


string connectionString =
System.Configuration.ConfigurationManager.ConnectionStrings["ResumeDB"].ConnectionS
tring;

// Insert the data into the database


using (SqlConnection conn = new SqlConnection(connectionString))
{
conn.Open();
SqlCommand cmd = new SqlCommand("INSERT INTO Resumes (Name, Email,
Phone, Address, Skills, Experience) VALUES (@Name, @Email, @Phone, @Address,
@Skills, @Experience)", conn);
cmd.Parameters.AddWithValue("@Name", name);
cmd.Parameters.AddWithValue("@Email", email);
cmd.Parameters.AddWithValue("@Phone", phone);
cmd.Parameters.AddWithValue("@Address", address);
cmd.Parameters.AddWithValue("@Skills", skills);
cmd.Parameters.AddWithValue("@Experience", experience);
cmd.ExecuteNonQuery();
}

// Hide the form after submission


formcontainer.Visible = false;

// Show the submitted data in the result container


lblName.InnerText = name;
lblEmail.InnerText = email;
lblPhone.InnerText = phone;
lblAddress.InnerText = address;
lblSkills.InnerText = skills;
lblExperience.InnerText = experience;

resultContainer.Visible = true;
}
}
}
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="webawp.aspx.cs"
Inherits="AWP_resume_builder_promax_.webawp" %>

<!DOCTYPE html>

<html>
<head runat="server">
<title>Resume Builder</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: cyan;
margin: 0;
padding: 0;
min-height: 100vh;
display: flex;
justify-content:left;
align-items: flex-start;
overflow-y: auto;
}

#form-container {
background-color:white ;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
max-width: 500px;
width: 100%;
margin-top: 50px;
}

h1 {
text-align: center;
}

label {
display: block;
font-weight: bold;
margin-top: 10px;
}

input[type="text"], input[type="email"], textarea {


width: 100%;
padding: 10px;
margin-top: 5px;
border: 1px solid #ccc;
border-radius: 5px;
font-size: 16px;
}

textarea {
resize: none;
height: 100px;
}

button {
width: 100%;
padding: 10px;
background-color: #007bff;
color: white;
border: none;
border-radius: 5px;
font-size: 18px;
cursor: pointer;
margin-top: 15px;
}

button:hover {
background-color: #0056b3;
}

#result-container {
display: none;
background-color: white;
border-radius: 10px;
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
padding: 20px;
max-width: 600px;
margin-top: 50px;
font-family: 'Georgia', serif;
}

#result-container h2 {
text-align: center;
font-size: 24px;
font-weight: bold;
margin-bottom: 20px;
}

.resume-section {
margin-bottom: 15px;
}

.resume-section h3 {
margin: 0;
font-size: 20px;
font-weight: bold;
color: #007bff;
border-bottom: 1px solid #ccc;
padding-bottom: 5px;
}

.resume-section p {
font-size: 16px;
margin: 5px 0;
}

#form-container.hidden, h1.hidden {
display: none;
}
</style>
</head>
<body>
<!-- Form Section -->
<div id="formcontainer" runat="server" visible="true">
<h1 id="formTitle" >Resume Builder</h1>
<form id="form1" runat="server">
<label for="Name">Name:</label>
<input type="text" id="Name" runat="server" /><br/><br/>

<label for="Email">Email:</label>
<input type="email" id="Email" runat="server" /><br/><br/>

<label for="Phone">Phone:</label>
<input type="text" id="Phone" runat="server" /><br/><br/>

<label for="Address">Address:</label>
<input type="text" id="Address" runat="server" /><br/><br/>

<label for="Skills">Skills:</label>
<textarea id="Skills" runat="server"></textarea><br/><br/>

<label for="Experience">Experience:</label>
<textarea id="Experience" runat="server"></textarea><br/><br/>

<button type="submit" runat="server"


onserverclick="SaveResume">Submit</button>
</form>
</div>

<!-- Result Section (Resume View) -->


<div id="resultContainer" runat="server" visible="false">
<h2>Your Resume</h2>

<div class="resume-section">
<h3>Name</h3>
<p id="lblName" runat="server"></p>
</div>
<div class="resume-section">
<h3>Email</h3>
<p id="lblEmail" runat="server"></p>
</div>

<div class="resume-section">
<h3>Phone</h3>
<p id="lblPhone" runat="server"></p>
</div>

<div class="resume-section">
<h3>Address</h3>
<p id="lblAddress" runat="server"></p>
</div>

<div class="resume-section">
<h3>Skills</h3>
<p id="lblSkills" runat="server"></p>
</div>

<div class="resume-section">
<h3>Experience</h3>
<p id="lblExperience" runat="server"></p>
</div>
</div>

<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="True"


Visible="False"></asp:GridView>
</body>
</html>

You might also like