Got solution
check the id of hiddenfield by viewing page source.
document.getElementById("ctl00_cphMain_gvJobs_ctl05_hfID").value;
This is what actual id I have given to hidden filed:
hfID
This is added by asp.net:
ctl00_cphMain_gvJobs_ctl05_
So if you try to use
document.getElementById("hfID").value;
it gives u error saying:
document.getElementById("hfID").value is null
So, final solution is
document.getElementById("ctl00_cphMain_gvJobs_ctl05_hfID").value;