This code is error
Private void GetData(){ using (SPWeb ospWeb = SPContext.Current.Web) { //code here }}
Replace code here
Private void GetData(){ using(SPSite spSite=new SPSite(SPContext.Current.Web.Url)) { using (SPWeb spWeb = spSite.OpenWeb()) { //code...