Unable to update the DB values
<p>I have two registration pages at first page i insert mandatory fields and after that i update some other details using the userid...userid is a identity column in DB so my update stored proc</p>

<pre><code>  ALTER procedure [dbo].[sp_update]

(@id int,@FormFiledBy varchar (50),@MaritalStatus varchar (50),@Height varchar (50),
@Religion varchar (50),@Caste varchar (100),
 @MotherTongue varchar(50),@Education varchar (100),@Occupation varchar(50),
 @CountryofResidence varchar (50),@EducationDetails varchar (100),@AnnualIncome varchar(50),
@CountryOfBirth varchar(50),@BirthPlace varchar(50),@TimeOfBirth nchar(10),@StarSign varchar (100),
@Gothram varchar (50),@Rassi varchar(50),@HavinChildren varchar(10),@PhysicalStatus varchar (100))

as
begin

update Profile_Master
 set FormFiledBy=@FormFiledBy,MaritalStatus=@MaritalStatus,Height=@Height,
Religion=@Religion,Caste=@Caste,MotherTongue=@MotherTongue,
Education=@Education,Occupation=@Occupation,CountryofResidence=@CountryofResidence,EducationDetails=@EducationDetails,
AnnualIncome=@AnnualIncome,CountryOfBirth=@CountryOfBirth,BirthPlace=@BirthPlace,TimeOfBirth=@TimeOfBirth,
StarSign=@StarSign,Gothram=@Gothram,Rassi=@Rassi,HavinChildren=@HavinChildren,PhysicalStatus=@PhysicalStatus

where UserId=@id
return
end
</code></pre>

<p>in my DAL</p>

<pre><code> public static int update(ProfileMasterBLL profileMasterBLL)
    {
        string userid = ProfileMasterDAL.GetUserIdByEmailID(profileMasterBLL.EmailID);

        SqlConnection conn = Generic.DBConnection.OpenConnection();
        try
        {
            SqlCommand cmdd = new SqlCommand("sp_update", conn);
            cmdd.CommandType = CommandType.StoredProcedure;
            cmdd.Parameters.AddWithValue("@FormFiledBy", profileMasterBLL.FormFiledBy);
            cmdd.Parameters.AddWithValue("@MaritalStatus", profileMasterBLL.MaritalStatus);
            cmdd.Parameters.AddWithValue("@Height", profileMasterBLL.Height);
            cmdd.Parameters.AddWithValue("@Religion", profileMasterBLL.Religion);
            cmdd.Parameters.AddWithValue("@Caste", profileMasterBLL.Caste);
            cmdd.Parameters.AddWithValue("@Education", profileMasterBLL.Education);
            cmdd.Parameters.AddWithValue("@Occupation", profileMasterBLL.Occupation);
            cmdd.Parameters.AddWithValue("@CountryofResidence", profileMasterBLL.CountryofResidence);
            cmdd.Parameters.AddWithValue("@EducationDetails", profileMasterBLL.EducationDetails);
            cmdd.Parameters.AddWithValue("@CountryOfBirth", profileMasterBLL.CountryOfBirth);
            cmdd.Parameters.AddWithValue("@BirthPlace", profileMasterBLL.BirthPlace);
</code></pre>

<p>in my UI</p>

<pre><code>protected void Button1_Click(object sender, EventArgs e)
    {
        // Get User ID from DAL
        int chk = 0;
        if (Session["EmailID"] != null)
        {
            emailID = Session["EmailID"].ToString();
        }
        ProfileMasterBLL prfbll = new ProfileMasterBLL();
        string userid = ProfileMasterDAL.GetUserIdByEmailID(emailID);
</code></pre>

<p>i am able to get the userid here but after this </p>

<pre><code>     chk = ProfileMasterDAL.update(prfbll);
</code></pre>

<p>at here breakpoint jumps to update method and i am getting emailid as null and so i amgetting userid also null any help on this? </p>

<p>in my BAL</p>

<pre><code>public class ProfileMasterBLL
{
    public int UserId { get; set; }
    public string FormFiledBy { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
    public string Gender { get; set; }
    public string MaritalStatus { get; set; }
    public string HavinChildren { get; set; }
    public string EmailID { get; set; }
 }
</code></pre>

<p>in my first page i am catching the session value</p>

<pre><code>  Session["EmailID"] = TextBox8.Text;
</code></pre>
