In what scenarios would you have a controller function that doesn't have an associated View? For example, it's possible in a controller to return anything (as opposed to what I would class as the default - an ActionResult for a View) so you could have:
And any call to the function would result in the current date being written out in the browser. However, as no View is involved, there obviously isn't any formatting or anything like that rendered so I'm wondering where it's best use is.
I've used MVC In our latest project to get a bit more up to speed on it, but I think all of our functions seem to return a View and so I just want to make sure I'm not missing a trick somewhere.
Thanks,
Mark,
Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks
Code:
Function GetDate() As DateTime
Return DateTime.Now.ToString
End Function
I've used MVC In our latest project to get a bit more up to speed on it, but I think all of our functions seem to return a View and so I just want to make sure I'm not missing a trick somewhere.
Thanks,
Mark,
Darlington Web Design[tab]|[tab]Experts, Information, Ideas & Knowledge[tab]|[tab]ASP.NET Tips & Tricks