Hi
I think in case of update you should read the student master first rather than creating a new object.
so you should not do the following:
VDData.Student_Master studentmaster = new VDData.Student_Master();
Rather you should read it first from context like:
VDData.Student_Master studentmaster = Read from context using Student_ID ;
rest of your code may remain same.
Hope this will help you.