The hr tag has been around for quite some time to provide a nice horizontal line to visually separate content. To achieve a vertical line, it’s typically been accomplished via border-left or border-right. However, this is when you can get into height issues or columns that don’t extend the whole way, etc… Instead CSS3 allows for the rotation of elements and allow for vertical or diagonal lines to be created with some basic CSS. This is accomplished with the transform property.
Author: Jamie
-
Posting form variables that are not strongly typed with MVC
In a lot of the MVC 3 examples that are available on the Internet today, they are quite typically strongly typed to a model, e.g. public ActionResult LogOn(LogOnModel model, string returnUrl).
This is extremely useful for the validation abilities and many other aspects; however, there are times when some or all of the data is not strongly typed; then what do you do? Read on for two different approaches.
-
Creating Your Own jQuery Selector
By default, the jQuery selectors are pretty advanced. You can select items by classes, ids, attributes, the first, the last, etc… But why stop there? By simply extending jQuery, we can add our own custom selectors to further enhance how we use jQuery. In this example, I will create an extended function called widthOver300 leveraging jQuery’s $.extend
-
Implementing a trigger callback with jQuery
As we move into a more and more interactive era of website development, more of the JavaScript array work is being done asynchronously and not “top-down”. This can provide some interesting challenges, for example, executing a specific action after a specific process has been completed – also known as a callback. Thankfully, jQuery provides some useful functions to help with this process. This article will explore using $(window).trigger();.
-
Pass Model or Form Data with MVC when redirecting
Have you ever wanted to pass form data or perhaps even a full model from one action to another through a RedirectToAction? By adding a new library package from NuGet, this can be accomplished with a few small changes to your controllers.
The first thing that needs to be done is to install the package through the NuGet package manager. Inside of Visual Studio, with the your MVC project selected select Tools -> Library Package Manager -> Add Library Package Reference… On the left hand side, select the Online button. Then, in the search field, type MvcContrib and install the base package and you can explore how to truncate string with C#.