DotNet

Fancy Checkboxes and Toggle Switches

This allows you to replace default checkboxes with a nicer-looking custom font alternative. This example uses Font Awesome 4 icons, but the CSS could easily be modified to use any [...]

2021-01-12T11:18:11-04:00April 5, 2019|

Prevent Link/Button Event or Post

Preventing a Link or Button from moving to the next URL (or triggering a post or postback in the case of ASP.Net) is easily accomplished using the very common method [...]

2019-03-28T15:37:49-03:00March 28, 2019|

CSS Files and Bundling in ASP.Net WebForms

CSS File Bundling Basics To add custom CSS to an ASP.Net project, add the CSS files to /content and include them in a bundle in Bundle.config. A style bundle can [...]

2019-03-08T15:36:02-04:00March 8, 2019|

Add New Entity (or Copy Entity) with Entity Framework

To add a new entity to your model, simply add it using <context>.<models>.Add(newEntity) and then call <context>.SaveChanges(). If you want to copy an existing entity and insert the copied item [...]

2019-03-08T10:06:18-04:00March 8, 2019|

Relationships in Entity Framework 6

This demonstrates how to configure one-to-many and many-to-many relationships in a code-first Entity Framework ASP.Net MVC application. The sample application is a blog containing posts, post categories (one-to-many), and post [...]

2020-10-16T19:00:52-03:00February 22, 2019|

Bind Drop-Down List in MVC View in ASP.Net

In order for a drop-down list in an MVC View to be populated with data from the model, one method is to add the data to a model (or to [...]

2019-03-09T22:17:37-04:00February 21, 2019|
Go to Top