When I click on job tittle it should be redirect to next page with job description,I don't know what is going wrong but after selecting the job tittle am getting the null value,I don't know what is going wrong?so can any one help me my code is like
In Stored Procedure:
create procedure USP_Getdetails
@RequirementID int
as
begin
select distinct PositionTittle,JobDescription from Tbl_RequirementModule where RequirementID=@RequirementID
end
In.DAL:
public DataSet GetDdata(int RequirementID)
{
SqlConnection con = dbcon.OpenCoonection();
SqlCommand cmd = new SqlCommand("USP_GetJobDescriptionGrid", con);
cmd.CommandType = CommandType.StoredProcedure;
SqlDataAdapter da = new SqlDataAdapter(cmd);
cmd.Parameters.AddWithValue("@RequirementID", RequirementID); // If I select position tittle also then am getting null value why??what mistke am doing??
DataSet ds = new DataSet();
da.Fill(ds);
dbcon.CloseConnection();
return ds;
}
In.cs:
public void GetData()
{
int ReqID = Convert.ToInt32(Session["RegId"]); // Am accessing session variable
JobAlpplingGrid.DataSource = objjob.GetDdata(ReqID);
JobAlpplingGrid.DataBind();
}
2 Replies
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Usha RajPosted Mar 10, 2015, 1:07 AM
Khargesh RajputPosted Mar 10, 2015, 12:48 AM