I noticed today that both namespaces System.Web.Mvc
and System.Web.WebPages.Html
have a SelectListItem. What is the difference between the too and is there times you should use one over the other?
System.Web.Mvc
is specific to the MVC framework.
System.Web.WebPages.Html
is for use with Web Pages that use Razor.
To be honest I've never used them in Web Pages but the examples I have seen they look identical, I just remember to never select the WebPages namespace.
There is an example available here:
http://www.mikesdotnetting.com/Article/184/HTML-Helpers-For-Forms-In-Razor-Web-Pages
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With