MVC Question and Answer

  • Explain the difference between layers and tiers ?

    asked on 18th Dec, 2017 by Ahtesham - Category : MVC Q & A
    by Ahtesham on 18th Dec, 2017
    In both things code is physically separated in to different modules. In layer all the modules run the same machine while in tiers they run on different machines and they communicate using networking technologies like WCF / WebAPI.
    1 Answers. Know better answer... Answer Now

  • Can I create MVC project using just pure HTML, Angular and WebAPI without using controller?

    asked on 9th Nov, 2017 by Amit - Category : MVC Q & A
    by Kunal Randhawa on 9th Nov, 2017
    If it is a big project you will end up with the MVC, Angular and WebAPI by default. You can not make UI in pure HTML. If you make in pure HTML you will not be able to get authentication authorization and many server side coding on UI. Think about it you make invoice.html every body can just see it. You need to make invoice.cshtml so that it goes through MVC windows/forms/oauth authentication process. You will need razor for server side coding.
    1 Answers. Know better answer... Answer Now

  • Why is my ASP.NET MVC data annotation validation is not working?

    asked on 13th Jul, 2017 by Ahtesham - Category : MVC Q & A
    by Imran on 13th Jul, 2017
    Data annotation validation will not fire when you use model binder as you are creating the objects manually using new keyword. Only and only if the objects come autommapped , i mean get automatically filled in the MVC action method input parameter then only ModelState validation will execute. For firing validation model binder code you need to manually invoke the validation. I would suggest you to watch this C# data annotation which explains how to use data annotation with simple C# video https://www.youtube.com/watch?v=Gft64NdIx3k So in the action method you need to invoke the "tryValidate" method and perform validations. Thanks
    1 Answers. Know better answer... Answer Now

We are on Social

Follow us on Twitter

See Hashtag #Questpond on Twitter
to see what others have posted.

Like us on Facebook

See Hashtag #Questpond on Facebook
to see what others have posted.

Follow us on G+

See Hashtag #Questpond on Google Plus
to see what others have posted.

Follow us on Linkedin

See Hashtag #Questpond on Linkedin
to see what others have posted.