Empowering The World Through Technology

Asp.net Job Application Form Creation

0

Asp.net Job Application Form Creation. Creation of a job application form for any project in asp.net is an essential part. This procedure contain different elements of asp.net for a purposeful page in asp.net 2010 project or in a website.

Here you will find complete coding for a useful and and validated job application creation form in asp.net 2010. Coding of designing side and as well as verified coding for the backend file.

You will get Compiled Coding of

  1. How to Create a Label for Conformation Message?
  2. Creation of TextBox for Employee Name?
  3. How Create TextBox for Employee email?
  4. Coding for Email Validation Code?
  5. Dropdown box for different areas of Job Application?
  6. Use of File uploader for employees Documents?
  7. Implementation of RequiredFieldValidator for file uploader?
  8. Submit Button Coding for Application?
  9. Reset Button Creation for Application?

Designing Side Coding and Creation of Different Asp.net Elements.

Label for Conformation Message

<asp:Label ID=”Label2″ runat=”server” Font-Bold=”True” Font-Names=”Times New Roman” Font-Size=”11pt” ForeColor=”#3366CC”></asp:Label>

TextBox for Employee Name

<asp:TextBox ID=”txt_name” runat=”server” class=”input-xlarge” BorderStyle=”Groove” Font-Bold=”True” Font-Names=”Times New Roman” Font-Size=”11pt” Height=”30px” Width=”250px” placeholder=”Enter Name”></asp:TextBox>

TextBox for Employee email

<asp:TextBox ID=”txt_mail” runat=”server” class=”input-xlarge” BorderStyle=”Groove” Font-Bold=”True” placeholder=”Enter Email” Font-Names=”Times New Roman” Font-Size=”11pt” Height=”30px” Width=”250px”></asp:TextBox>

Email Validation Code

<asp:RegularExpressionValidator ID=”RegularExpressionValidator1″ runat=”server” ControlToValidate=”txt_mail” ErrorMessage=”Formate error” ValidationExpression=”w+([-+.’]w+)*@w+([-.]w+)*.w+([-.]w+)*”></asp:RegularExpressionValidator>

Dropdown box for different of Job Applications

<asp:DropDownList ID=”drp_domain” runat=”server” Width=”250px”>
<asp:ListItem Value=”DotNet”>DotNet</asp:ListItem>
<asp:ListItem Value=”Java”>Java</asp:ListItem>
<asp:ListItem Value=”J2EE”>J2EE</asp:ListItem>
<asp:ListItem Value=”Embedded Systems”>Embedded Systems
</asp:ListItem>
</asp:DropDownList>

File uploader for employees Documents

<asp:FileUpload ID=”FileUploader” class=”input-xlarge” runat=”server” Width=”250px” />

RequiredFieldValidator for file uploader

<asp:RequiredFieldValidator ID=”RequiredFieldValidator3″ runat=”server” ErrorMessage=”*” ControlToValidate=”FileUploader”></asp:RequiredFieldValidator>

Submit Button Creation for Application

<asp:Button ID=”btn_Upload” runat=”server” onclick=”btn_Upload_Click” class=”btn” Text=”Upload” Width=”100px” Font-Bold=”True” Font-Names=”Times New Roman” />

Reset Button Creation for Application

<asp:Button ID=”btn_reset” runat=”server” onclick=”btn_reset_Click” Text=”Reset” class=”btn” Width=”100px” Font-Bold=”True” Font-Names=”Times New Roman” />

Job Application Form
Job Application Form VS Asp.net 2010

Backend Coding for Employee Job Application Form

using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.HtmlControls;
using System.Data.SqlClient;

public partial class apply4job : System.Web.UI.Page
{
SqlConnection con = new SqlConnection
(System.Configuration.ConfigurationManager.
ConnectionStrings[“con_str”].ConnectionString);

protected void Page_Load(object sender, EventArgs e)
{
       }
protected void btn_Upload_Click(object sender, EventArgs e)
    {
       if (FileUploader.HasFile)
        {
            string extension = System.IO.Path.GetExtension(FileUploader.FileName);
if (extension == “.jpg” || extension == “.gif” || extension == “.png” ||
extension == “.doc” || extension == “.pdf”)
{
String fileName = FileUploader.FileName;
FileUploader.SaveAs(Request.PhysicalApplicationPath
+”Resumes/”+fileName);
            }
        }

string str;
con.Open();
str = “insert into Resumes (candidate , email , mobno , resumefilename , domain ) values(‘” + txt_name.Text + “‘,'” + txt_mail.Text + “‘,” + txt_mobileNo.Text +”,'” + drp_domain.SelectedValue + “‘ , ‘” + FileUploader.FileName + “‘)”;

SqlCommand cmd = new SqlCommand(str, con);        cmd.ExecuteNonQuery();
        Label2.Text = “<b>Applied Sucessfully…!</b>”;
        Label2.Visible = true;
        txt_name.Text = “”;
        txt_mail.Text = “”;
        txt_mobileNo.Text = “”;
        con.Close();
    }

    protected void btn_reset_Click(object sender, EventArgs e)
    {
        txt_name.Text = “”;
        txt_mail.Text = “”;
        txt_mobileNo.Text = “”;
        Response.Redirect(“applyjobs.aspx”);
    }
}

Leave A Reply

Your email address will not be published.