MVC using stored procedures with the view

I am passing an object from the controller to a view from a stored procedure.  This is the error I receive (attached). I don't know what I am doing wrong.
katrinyDesertratAsked:
Who is Participating?
 
girionisConnect With a Mentor Commented:
This is a class cast error. You are expecting an object of type x but you are passing an object of type y. Check that you pass the correct object.
0
 
katrinyDesertratAuthor Commented:
I am passing an object from the controller to a view from a stored procedure.  This is the error I receive (attached). I don't know what I am doing wrong.
0
 
katrinyDesertratAuthor Commented:
?
0
Cloud Class® Course: Certified Penetration Testing

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

 
girionisCommented:
Where is the attachment?
0
 
Marco GasiFreelancerCommented:
@katrinyDesertrat there is no attachement in your question: after you have browse for the file you have to click orange Upload button and then wait for upload finish.
If, as I think, your attachement is a screenshot, you can also use the Insert Image command in the toolbar (is the last icon at the right), browse for the image and embed it i your question.
0
 
katrinyDesertratAuthor Commented:
Sorry.  Here is the attachment
Need-Help.docx
0
 
katrinyDesertratAuthor Commented:
I've requested that this question be deleted for the following reason:

No good answer
0
 
girionisCommented:
My answer is valid, the problem is that a wrong type of object is passed.
0
 
Marco GasiFreelancerCommented:
Technically, the girionis comment ID 39713771 is correct and points should be awarded to it.

@katrinyDesertrat: if you are not satisfied with an expert comment/answer, you shouldn't shut up. On the contrary, you should ask for more comments, provide more code and interact with experts to help them to help you. We're not mind-readers: if our replies are unsatisfying, probably this is due to the fact we don't have enough information to give a better help.

As a side note, when you post code, use the code tag provided by EE, please: the image in your docx file is practically unreadable, but all details about the error iare in that image.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.