@manhnguyenv

Welcome to my blog!

Enums to JavaScript & Best Resources ASP.NET MVC

July 11, 2019 17:06

Enums to JavaScript (edit)

https://gunnarpeipman.com/aspnet/enums-to-javascript/

Helper class

https://github.com/microsoft/referencesource/blob/master/mscorlib/system/reflection/CustomAttributeExtensions.cs

Custom Validation Data Annotation Attribute

https://www.c-sharpcorner.com/UploadFile/rahul4_saxena/mvc-4-custom-validation-data-annotation-attribute/

https://www.dotnetcurry.com/aspnet-mvc/687/create-custom-attributes-meta-data

ASP.NET & MVC Guide

https://www.dotnetexpertguide.com/2013/11/updated-aspnet-web-optimization-framework-and-cookieless-domain.html (Optimization)

https://www.dotnetexpertguide.com/2012/10/aspnet-mvc-4-cookieless-domain-for-bundling-and-static-resources.html (Security)

http://www.binaryintellect.net/articles/8b993a74-a84a-42bd-9127-e701a03f5885.aspx (Using Custom Data Attributes To Store JSON Data In ASP.NET MVC)

https://haacked.com/archive/2010/04/15/sending-json-to-an-asp-net-mvc-action-method-argument.aspx/ (Send JSON to Action)

http://johnatten.com/2013/12/22/asp-net-mvc-show-busy-indicator-on-form-submit-using-jquery-and-ajax/ (Ajax loading)

https://www.researchgate.net/publication/240611007_ASPNET_MVC_y_jQuery_mas_poder_mas_control_mas_esfuerzo (autocomplete js)

https://www.c-sharpcorner.com/resources/1387/building-mobile-friends-html-5-using-jquery-and-asp-net-mvc.aspx (MVC & Mobile Friendly)

https://gunnarpeipman.com/aspnet/asp-net-mvchow-to-show-asterisk-after-required-field-label/ (required field)

Checkboxlist

https://gunnarpeipman.com/aspnet/asp-net-mvc-getting-selected-values-from-checkboxlist/

https://gunnarpeipman.com/aspnet/asp-net-mvc-implementing-checkboxlist/

https://blogs.msdn.microsoft.com/miah/2008/11/10/checkboxlist-helper-for-mvc/

http://www.compilemode.com/2015/10/how-to-get-checkboxlist-checked-values-in-asp-net-mvc-controller.html

https://stackoverflow.com/questions/220020/how-to-handle-checkboxes-in-asp-net-mvc-forms/220073

JavaScript

https://css-tricks.com/everything-you-need-to-know-about-date-in-javascript/ (Date & Time in JavaScript)

ASP.NET Route

https://gunnarpeipman.com/aspnet/creating-tag-cloud-using-asp-net-mvc-and-entity-framework/

Shortening URL of About page

As all ASP.NET MVC applications get by default also page called default we can use it to analyze its default URL and create shorter URL after that. By default, About page has the following URL:

http://yourhost/Home/About

As Home controller is all about “default” pages as activities that happen on root level of site we don’t have any good reason to keep word Home in URL. In SEO terms it increases the distance of page title and in some cases shorter URL-s perform better in search engines.

To get short URL like this:

http://yourhost/about

add the following route definition to previously shown method, right before last route definition.

routes.MapRoute(
    "ShortAbout",
    "about",
    new { controller = "Home", action="about" }
);

When you run your application you can see that ASP.NET MVC generates short URL for About page automatically.

Best Resources

https://17path.wordpress.com/2015/10/20/50-best-mvc-tutorial-resources/ (Best Resource)

https://odetocode.com/home/archives

Categories