Click here to Skip to main content
15,902,749 members
Home / Discussions / C#
   

C#

 
AnswerRe: Web-Api in Mvc5.net Pin
Dave Kreskowiak25-Aug-15 5:24
mveDave Kreskowiak25-Aug-15 5:24 
You seem to have some serious misconceptions about what an ApiController is compared to a normal Controller.

ApiControllers handle data only. They return data only. There is no View in a ApiController.


1) Yeah, since there is no View when using an ApiController, there is no TempData, no ViewBag and no ViewData.

2) ApiControllers don't return views, they return data.

3) A method can only return ONE type of object. What that is depends on your requirements. If you want to return data in different formats you'll have to write different methods to call to support each format type.

4) Your question doesn't make sense.

5) Again, ApiControllers have nothing to do with Views, so this question is moot.
A guide to posting questions on CodeProject

Click this: Asking questions is a skill.
Seriously, do it.

Dave Kreskowiak

Questionuse ready made form in another form Pin
mattlas24-Aug-15 22:46
mattlas24-Aug-15 22:46 
AnswerRe: use ready made form in another form Pin
OriginalGriff24-Aug-15 22:56
mveOriginalGriff24-Aug-15 22:56 
GeneralRe: use ready made form in another form Pin
mattlas24-Aug-15 23:43
mattlas24-Aug-15 23:43 
GeneralRe: use ready made form in another form Pin
OriginalGriff24-Aug-15 23:48
mveOriginalGriff24-Aug-15 23:48 
GeneralRe: use ready made form in another form Pin
mattlas25-Aug-15 0:51
mattlas25-Aug-15 0:51 
GeneralRe: use ready made form in another form Pin
OriginalGriff25-Aug-15 1:04
mveOriginalGriff25-Aug-15 1:04 
GeneralRe: use ready made form in another form Pin
Dave Kreskowiak25-Aug-15 1:30
mveDave Kreskowiak25-Aug-15 1:30 
QuestionHow to check a catalog file is signed and get certificate details Pin
Member 1193329524-Aug-15 21:06
Member 1193329524-Aug-15 21:06 
AnswerRe: How to check a catalog file is signed and get certificate details Pin
Richard MacCutchan24-Aug-15 21:35
mveRichard MacCutchan24-Aug-15 21:35 
Questioncontrolling device remotely Pin
amitcoded14324-Aug-15 0:42
amitcoded14324-Aug-15 0:42 
AnswerRe: controlling device remotely Pin
Eddy Vluggen24-Aug-15 1:57
professionalEddy Vluggen24-Aug-15 1:57 
QuestionWindowsInstaller 4.5 on Windows XP error processor type Pin
DPaul199423-Aug-15 7:31
DPaul199423-Aug-15 7:31 
AnswerRe: WindowsInstaller 4.5 on Windows XP error processor type Pin
Dave Kreskowiak23-Aug-15 15:49
mveDave Kreskowiak23-Aug-15 15:49 
AnswerRe: WindowsInstaller 4.5 on Windows XP error processor type Pin
Pete O'Hanlon23-Aug-15 19:35
mvePete O'Hanlon23-Aug-15 19:35 
GeneralRe: WindowsInstaller 4.5 on Windows XP error processor type Pin
DPaul199423-Aug-15 21:47
DPaul199423-Aug-15 21:47 
QuestionProblem with Paper Orientation Pin
Thahir Pattanathel23-Aug-15 7:20
Thahir Pattanathel23-Aug-15 7:20 
QuestionHow update Records in Sql Pin
M.Balakrishna22-Aug-15 22:59
M.Balakrishna22-Aug-15 22:59 
AnswerRe: How update Records in Sql Pin
OriginalGriff22-Aug-15 23:16
mveOriginalGriff22-Aug-15 23:16 
Questionhow to turn on CFG in C#? Pin
morglorf22-Aug-15 15:00
morglorf22-Aug-15 15:00 
AnswerRe: how to turn on CFG in C#? Pin
Dave Kreskowiak22-Aug-15 16:43
mveDave Kreskowiak22-Aug-15 16:43 
QuestionCannot run setup project on Windows XP Pin
DPaul199421-Aug-15 9:36
DPaul199421-Aug-15 9:36 
AnswerRe: Cannot run setup project on Windows XP Pin
Pete O'Hanlon21-Aug-15 10:01
mvePete O'Hanlon21-Aug-15 10:01 
GeneralRe: Cannot run setup project on Windows XP Pin
DPaul199421-Aug-15 12:37
DPaul199421-Aug-15 12:37 
GeneralRe: Cannot run setup project on Windows XP Pin
Dave Kreskowiak21-Aug-15 14:59
mveDave Kreskowiak21-Aug-15 14:59 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.