Hello readers In this tutorial we are going to see what is the difference between ViewResult() and ActionResult() in ASP.NET MVC. This is a very interesting topic for interview point of view.
Difference between ViewResult() and ActionResult() in ASP.NET MVC:
| View Result | ActionResult |
---|---|---|
1- | ViewResult can return only view result type. | Action Result can return many types of results like PartialViewResult, JSONResult. |
2- | ViewResult class is derived from the base class ActionResult. | ActionResult is a base class for ViewResult. |
3- | It is a concrete class. | It is an abstract class. |
4- | It is a concrete class so no subtypes available. | ActionResult has many subtypes available:
|
5- | If we are sure that our action method will return the only view we can go with ViewResult. For Example: | If our action method may return view or redirect to some URL we should go with ActionResult. For Example: public ActionResult DynamicView(bool IsHtmlView) |
View More:
- ASP.NET Web API Interview Questions.
- SQL Interview Questions and Answers.
- Interview Questions & Answers on .NET.
- Difference Between MVC Controller and Web API Controller.
Conclusion:
I hope you understand the Difference between VieweResult() and ActionResult() in ASP.NET MVC. Your Feedback and comments are welcome to me.
Thank You,
Very good post. I’m facing a few of these issues as
well..
whoah this blog is excellent i like studying your posts. Keep up the good work!
You realize, many people are searching around for this information, you can aid
them greatly.
Greetings! I’ve been following your web site for a while now and finally got the courage to go ahead and give you a shout out from New Caney Texas! Just wanted to mention keep up the great job!
I’ve been exploring for a little for any high-quality articles or weblog posts in this sort
of house . Exploring in Yahoo I at last stumbled upon this site.
Studying this information So i am satisfied to convey that I’ve a
very just right uncanny feeling I came upon exactly what I needed.
I such a lot for sure will make sure to do not omit this site and provides it a glance on a constant basis.
If some one wants to be updated with most recent technologies after that
he must be pay a visit this web page and be up to date every day.
Pretty! This was an extremely wonderful post. Thank you for providing these details.
Wow that was unusual. I just wrote an very long comment but after I clicked submit
my comment didn’t appear. Grrrr… well I’m not writing all that over again. Anyhow, just wanted to say wonderful
blog!
Why users still use to read news papers when in this technological globe everything is existing on net?
Hurrah! At last I got a weblog from where I be capable of actually obtain valuable information regarding my study and knowledge.
Admiring the time and effort you put into your website and in depth information you offer.
It’s nice to come across a blog every once in a while that isn’t the same unwanted rehashed material.
Wonderful read! I’ve bookmarked your site and I’m adding your RSS feeds to my
Google account.
If you want to increase your know-how simply keep visiting this site and be updated with the most up-to-date news update posted here.
Thank you, I have just been looking for information about this subject for a while and yours
is the best I’ve discovered so far. But, what in regards to the bottom line?
Are you certain concerning the supply?
Have you ever thought about creating an ebook
or guest authoring on other websites? I have a blog based
upon on the same ideas you discuss and would really like to
have you share some stories/information. I know my audience would appreciate your work.
If you’re even remotely interested, feel free to send me an email.
When I initially commented I clicked the “Notify me when new comments are added” checkbox and
now each time a comment is added I get several e-mails with the same
comment. Is there any way you can remove people from that service?
Thanks!
I was very pleased to uncover this website.
I need to to thank you for your time for this particularly fantastic read!!
I definitely appreciated every bit of it and
I have you book marked to see new stuff on your site.
Nice post. I learn something new and challenging on websites I stumbleupon on a daily basis.
It’s always helpful to read content from other authors
and use something from other web sites.
Wow, awesome weblog format! How long have you been blogging for?
you make running a blog glance easy. The entire glance of your site is wonderful, as neatly as the content material!
Wow that was odd. I just wrote an really long comment but after I clicked submit my comment didn’t
appear. Grrrr… well I’m not writing all that over again. Regardless, just wanted to say wonderful blog!
Howdy! Would you mind if I share your blog with my facebook group?
There’s a lot of folks that I think would really enjoy your content.
Please let me know. Many thanks
Hey there superb website! Does running a blog similar to this require a great
deal of work? I have no knowledge of programming however I was hoping to start my own blog
in the near future. Anyways, if you have any recommendations or tips for
new blog owners please share. I know this is off topic nevertheless I simply wanted to ask.
Thanks!
Very rapidly this web site will be famous among all blogging and site-building
people, due to it’s fastidious content
Right away I am going away to do my breakfast, later than having my breakfast coming again to read
further news.
Ahaa, its nice discussion on the topic of this article at this
place at this website, I have read all that, so now me also commenting here.
Hello! Someone in my Myspace group shared this website with
us so I came to give it a look. I’m definitely loving the information.
I’m bookmarking and will be tweeting this to my followers!
Excellent blog and excellent style and design.
I’ve learn some excellent stuff here. Definitely value bookmarking for
revisiting. I wonder how much effort you put to make this sort of great informative web
site.
Great blog! Is your theme custom made or did you download
it from somewhere? A design like yours with a few simple tweeks would really make my blog jump out.
Please let me know where you got your design. Thank you
Howdy, i read your blog occasionally and i own a similar one and
i was just curious if you get a lot of spam responses?
If so how do you stop it, any plugin or anything you can recommend?
I get so much lately it’s driving me insane so any support is very much appreciated.
Hi there to every one, the contents present at this site are actually amazing for people knowledge,
well, keep up the nice work fellows.
I like reading an article that can make people think.
Also, thank you for allowing me to comment!
It’s a shame you don’t have a donate button! I’d without a doubt donate to
this brilliant blog! I suppose for now i’ll settle for book-marking and adding your RSS feed to my Google account.
I look forward to brand new updates and will talk about this site with my Facebook group.
Chat soon!
Hi there, I read your blog like every week. Your writing style is
awesome, keep it up!