Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 259
  • Last Modified:

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.
0
katrinyDesertrat
Asked:
katrinyDesertrat
  • 4
  • 3
  • 2
1 Solution
 
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
 
girionisCommented:
Where is the attachment?
0
NFR key for Veeam Agent for Linux

Veeam is happy to provide a free NFR license for one year.  It allows for the non‑production use and valid for five workstations and two servers. Veeam Agent for Linux is a simple backup tool for your Linux installations, both on‑premises and in the public cloud.

 
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
 
girionisCommented:
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'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

Featured Post

Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

  • 4
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now