parameter '@Qualification_name', which was not supplied

Jun 21 2014 4:27 AM

Procedure or function 'SP_Qualification_insert' expects parameter '@Qualification_name', which was not supplied.

I am trying to add Qualification name from my Qualification_add page to Candidate_add bt data binding. but i unable to creat. please help me to complete my pages.  All  pages are given below....please give me solution as soon as possible
 
CANDIDATE_ADD PAGE 
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Candidate_Add.aspx.cs" Inherits="Candidate_Candidate_Add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
Candidate Name :
</td>
<td>
<asp:TextBox ID="txt_Candidate_Name" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Profile :
</td>
<td>
<asp:DropDownList ID="ddl_Profile" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
E-mail :
</td>
<td>
<asp:TextBox ID="txt_Email" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Gender :
</td>
<td>
<asp:RadioButtonList ID="rdb_Gender" runat="server" RepeatColumns="2">
<asp:ListItem Text="Male" Value="1"></asp:ListItem>
<asp:ListItem Text="Female" Value="2"></asp:ListItem>
</asp:RadioButtonList>
</td>
</tr>
<tr>
<td>
Qualification :
</td>
<td>
<asp:DropDownList ID="ddl_Qualification" runat="server">
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
DOB :
</td>
<td>
<asp:TextBox ID="txt_dob" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Mobile No. :
</td>
<td>
<asp:TextBox ID="txt_Mobile" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Current Salary :
</td>
<td>
<asp:TextBox ID="txt_CurrentSalary" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Current Company :
</td>
<td>
<asp:TextBox ID="txt_CurrentCompany" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Experience :
</td>
<td>
<asp:DropDownList ID="ddl_year" runat="server">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
<asp:ListItem Text="4" Value="4"></asp:ListItem>
<asp:ListItem Text="5" Value="5"></asp:ListItem>
</asp:DropDownList>
<asp:DropDownList ID="ddl_months" runat="server">
<asp:ListItem Text="1" Value="1"></asp:ListItem>
<asp:ListItem Text="2" Value="2"></asp:ListItem>
<asp:ListItem Text="3" Value="3"></asp:ListItem>
<asp:ListItem Text="4" Value="4"></asp:ListItem>
<asp:ListItem Text="5" Value="5"></asp:ListItem>
<asp:ListItem Text="6" Value="6"></asp:ListItem>
<asp:ListItem Text="7" Value="7"></asp:ListItem>
<asp:ListItem Text="8" Value="8"></asp:ListItem>
<asp:ListItem Text="9" Value="9"></asp:ListItem>
<asp:ListItem Text="10" Value="10"></asp:ListItem>
<asp:ListItem Text="11" Value="11"></asp:ListItem>
<asp:ListItem Text="12" Value="12"></asp:ListItem>
</asp:DropDownList>
</td>
</tr>
<tr>
<td>
Reference Name :
</td>
<td>
<asp:TextBox ID="txt_referenceName" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
Resume Upload :
</td>
<td>
<asp:FileUpload ID="fu_resume" runat="server" />
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="btn_Submit" runat="server" Text="Save" OnClick="btn_Submit_Click" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
.............................................................................
  CANDIDATE_ADD.ASPX.CS PAGE
 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using System.IO;
using System.Data.SqlClient;
using System.Configuration;
public partial class Candidate_Candidate_Add : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["connection"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
Fill_Qualification();
Fill_Profile();
}
public void Fill_Profile()
{
con.Open();
SqlCommand cmd = new SqlCommand("SP_profile_insert", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
DataSet ds = new DataSet();
da.Fill(ds);
ddl_Profile.DataTextField = "profile_name";
ddl_Profile.DataTextField = "profile_id";
ddl_Profile.DataBind();
con.Close();
}
public void Fill_Qualification()
{
con.Open();
SqlCommand CMD = new SqlCommand("SP_Qualification_insert", con);
CMD.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(CMD);
DataSet ds = new DataSet();
da.Fill(ds);
ddl_Qualification.DataTextField = "Qualification_name";
ddl_Qualification.DataTextField = "Qualification_id";
ddl_Qualification.DataSource = ds;
ddl_Qualification.DataBind();
con.Close();
}
protected void btn_Submit_Click(object sender, EventArgs e)
{
con.Open();
int Exp = int.Parse(ddl_year.SelectedValue) * 12 + int.Parse(ddl_months.SelectedValue);
string fileName = Path.GetFileName(fu_resume.PostedFile.FileName);
string Location = Server.MapPath("Resume" + "\\" + fileName);
fu_resume.SaveAs(Location);
SqlCommand CMD = new SqlCommand("SP_Candidate_insert", con);
CMD.CommandType = CommandType.StoredProcedure;
CMD.Parameters.AddWithValue("@CandidateName", txt_Candidate_Name.Text);
CMD.Parameters.AddWithValue("@CandidateProfile", ddl_Profile.SelectedValue);
CMD.Parameters.AddWithValue("@Email", txt_Email.Text);
CMD.Parameters.AddWithValue("@Gender", rdb_Gender.SelectedValue);
CMD.Parameters.AddWithValue("@Qualification", ddl_Qualification.SelectedValue);
CMD.Parameters.AddWithValue("@DOB", txt_dob.Text);
CMD.Parameters.AddWithValue("@MobileNo", txt_Mobile.Text);
CMD.Parameters.AddWithValue("@CurrentSalary", txt_CurrentSalary.Text);
CMD.Parameters.AddWithValue("@CurrentCompany", txt_CurrentCompany.Text);
CMD.Parameters.AddWithValue("@Experience", Exp);
CMD.Parameters.AddWithValue("@ReferenceName", txt_referenceName.Text);
CMD.Parameters.AddWithValue("@FileUpload", fileName);
CMD.ExecuteNonQuery();
con.Close();
}
}
..........................................................
WEB CONFIG 
 
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<connectionStrings>
<add name="connection" connectionString="Data Source=BABAI_BONY-PC\SQLEXPRESS;Initial catalog=CONSULTANCY;Integrated Security=True"/>
</connectionStrings>
<system.web>
<compilation debug="true" targetFramework="4.0"/>
<authentication mode="Forms">
<forms loginUrl="~/Account/Login.aspx" timeout="2880"/>
</authentication>
<membership>
<providers>
<clear/>
<add name="AspNetSqlMembershipProvider" type="System.Web.Security.SqlMembershipProvider" connectionStringName="ApplicationServices" enablePasswordRetrieval="false" enablePasswordReset="true" requiresQuestionAndAnswer="false" requiresUniqueEmail="false" maxInvalidPasswordAttempts="5" minRequiredPasswordLength="6" minRequiredNonalphanumericCharacters="0" passwordAttemptWindow="10" applicationName="/"/>
</providers>
</membership>
<profile>
<providers>
<clear/>
<add name="AspNetSqlProfileProvider" type="System.Web.Profile.SqlProfileProvider" connectionStringName="ApplicationServices" applicationName="/"/>
</providers>
</profile>
<roleManager enabled="false">
<providers>
<clear/>
<add name="AspNetSqlRoleProvider" type="System.Web.Security.SqlRoleProvider" connectionStringName="ApplicationServices" applicationName="/"/>
<add name="AspNetWindowsTokenRoleProvider" type="System.Web.Security.WindowsTokenRoleProvider" applicationName="/"/>
</providers>
</roleManager>
</system.web>
<system.webServer>
<modules runAllManagedModulesForAllRequests="true"/>
</system.webServer>
</configuration>
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
DATABASE FOR CANDIDATE PAGE 
 
CREATE DATABASE CONSULTANCY
USE CONSULTANCY
Create Table Candidate
(
Candidate_ID int primary key identity(1,1),
CandidateName nvarchar(50),
CandidateProfile int,
Email nvarchar(50),
Gender int,
Qualification int,
DOB nvarchar(50),
MobileNo nvarchar(50),
CurrentSalary nvarchar(50),
CurrentCompany nvarchar(50),
Experience int,
ReferenceName nvarchar(50),
QualityRate int,
ClosingRate int,
IsDelete int default 0,
FileUpload nvarchar(max)
)
create proc SP_Candidate_insert
(
@CandidateName nvarchar(50),
@CandidateProfile int,
@Email nvarchar(50),
@Gender int,
@Qualification int,
@DOB nvarchar(50),
@MobileNo nvarchar(50),
@CurrentSalary nvarchar(50),
@CurrentCompany nvarchar(50),
@Experience int,
@ReferenceName nvarchar(50),
@FileUpload nvarchar(max)
)
as
begin
insert into Candidate( CandidateName, CandidateProfile, Email, Gender, Qualification, DOB, MobileNo, CurrentSalary, CurrentCompany, Experience, ReferenceName, FileUpload )
values(@CandidateName,@CandidateProfile, @Email, @Gender, @Qualification, @DOB, @MobileNo, @CurrentSalary, @CurrentCompany, @Experience, @ReferenceName, @FileUpload )
end
select * from Candidate
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,........................,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,......................
 QUALIFICATION_ADD PAGE 
 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Qualification_Add.aspx.cs" Inherits="Admin_Qualification_Add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
Qualification :
</td>
<td>
<asp:TextBox ID="txt_Qualification" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="btn_save" runat="server" Text="SAVE" OnClick="btn_save_Click" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
,,,,,,,,,,,,,,,,,,.......................................,,,,,,,,,,,,,,,,,,,,,,,..........................
 QUALIFICATION_ADD.ASPX.CS PAGE
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
public partial class Admin_Qualification_Add : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["connection"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_save_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("SP_Qualification_insert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@Qualification_name", txt_Qualification.Text);
cmd.ExecuteNonQuery();
con.Close();
}
}
DATABASE FOR QUALIFICATION 
 
create table Qualification
( Qualification_id int primary key identity(1,1),
Qualification_name nvarchar(50),
IsDelete int default 0
)
create proc SP_Qualification_insert
(
@Qualification_name nvarchar(50)
)
as
begin
insert into Qualification (Qualification_name) values (@Qualification_name)
end
select * from Qualification
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,............................................
PROFILE_ADD PAGE 
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Profile_Add.aspx.cs" Inherits="Admin_Profile_Add" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table>
<tr>
<td>
Profile Name :
</td>
<td>
<asp:TextBox ID="txt_profile" runat="server"></asp:TextBox>
</td>
</tr>
<tr>
<td>
</td>
<td>
<asp:Button ID="btn_save" runat="server" Text="SAVE" OnClick="btn_save_Click"
ondatabinding="btn_save_DataBinding" />
</td>
</tr>
</table>
</div>
</form>
</body>
</html>
,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,,
PROFILE_ADD.ASPX.CS 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Configuration;
using System.Data;
using System.IO;
public partial class Admin_Profile_Add : System.Web.UI.Page
{
SqlConnection con = new SqlConnection(ConfigurationManager.ConnectionStrings["connection"].ConnectionString);
protected void Page_Load(object sender, EventArgs e)
{
}
protected void btn_save_Click(object sender, EventArgs e)
{
con.Open();
SqlCommand cmd = new SqlCommand("SP_profile_insert", con);
cmd.CommandType = CommandType.StoredProcedure;
cmd.Parameters.AddWithValue("@profile_name ", txt_profile.Text);
cmd.ExecuteNonQuery();
con.Close();
}
protected void btn_save_DataBinding(object sender, EventArgs e)
{
}
}
........................................DATABASE 
use CONSULTANCY
create table profile
( profile_id int primary key identity(1,1),
profile_name nvarchar(50),
IsDelete int default 0
)
create proc SP_profile_insert
(
@profile_name nvarchar(50)
)
as
begin
insert into profile (profile_name) values (@profile_name)
end
select * from profile
 
 

Answers (4)