Add two columns to your table StudentRecs (UserID,EntryDate)
Store the UserID in session at login time Session["UserID"]=UserID
then modify you query like this
SqlCommand cmd = new SqlCommand("INSERT into StudentRecs (StudentName,RollNo,FatherName,Location,UserID,EntryDate) VALUES ('" + TxtStudentName .Text + "','" + TxtRollNo.Text + "','" + TxtFatherName.Text + "','" + TxtLocation.Text + "','"+Session[UserID].ToString()+"',getdate())", con);
hope this will fix your problem