开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜