开发者

Unable to cast object of type 'system.data.datatable' to type 'lInqobj.tbl1'

开发者 https://www.devze.com 2023-04-01 13:30 出处:网络
i am getting this error in property.setAgent(((Agent)Session[FormContract.AGENT]).agent_id.ToString());

i am getting this error in

property.setAgent(((Agent)Session[FormContract.AGENT]).agent_id.ToString());

Unable to cast object of type 'system.data.datatable' to type 'lInqobj.Agent'

please help 开发者_Python百科me out


Clearly the object found at Session[FormContract.AGENT] is not actually an Agent, but a DataTable, so it cannot be cast to an Agent. Try figuring out what is putting that value there, and why it's putting a DataTable there rather than an Agent.

0

精彩评论

暂无评论...
验证码 换一张
取 消