MVC: Passing Query String Values in a View

Please see my other MVC articles. Building Links from Model Data This article illustrates how to build a link within an MVC view which passes model data as a query string variable. First, I begin with my “model” statement exposing my RaveUser model’s properties. Next, I provide an ActionLink() statement with text for the link (“Reload All…

MVC: Parsing a URL

Please see my other MVC articles. Using URL Properties in a page MVC, ASP.NET, and IIS provide a very easy and effective way to interpret data contained within the current URL.By simply creating a method with the appropriately named parameters (order doesn’t matter), that method may parse data contained within the URL.

MVC: Conditionally Display View link

Please see my other MVC articles. Displaying Links Based on IF Logic This article illustrates how to conditionally display a link within an MVC based on the results of an IF statement. As you can see in my View’s HTML, I am displaying a “Home” link and then, if the current user is part of the Administrator…

MVC: Conditional Redirect to View

Please see my other MVC articles. Redirecting Users to a New Page Based on IF Logic Similar to the article (link) MVC: Conditionally Display View link, this article illustrates how to use condition logic to change the user experience by using the controller’s default function to test if the current user is part of the Administrator role,…

MVC: Action Name Attribute

Please see my other MVC articles. Define a Custom Action & URL When a Controller’s Action method is invoked, the URL reflects the name of the method.However, it you need the URL to look different without changing the Action method name, assign an ActionName attribute to that method.First, I’ll begin with a new test Action…

MVC: Custom Model Validation

Please see my other MVC articles. Using Custom Validation on Model Properties While ASP.NET MVC provides powerful native validation, some requirements require custom routines to ensure certain model data is valid. In this artilce I’ll demonstrate how to configure a model for custom validation and provide a simple example function. First, I’ll decorate the model…

MVC: Links to External Sites

Please see my other MVC articles. Display External Links within a View Sometimes within a View, a requirement dictates the use of links to sites external to the current project. Since Html.ActionLink() doesn’t allow for a target to an external site, I satisfied the requirement using the following approach. First, I stored with each record…

Telerik: Display Dynamic Instructions

Please see my other Telerik articles. Displaying instructions dynamically to save space In this article I’ll demonstrate how to use Telerik’s Window control to dynamically display instructions in a popup window. Using a dynamically-displayed windows allows the instructions to remain hidden until the user requires them, saving valuable screen real estate. First, I’ll define my…

AJAX: Dropdown Update Table

Please see my other AJAX articles. Using AJAX to update a table from a dropdown In this article I’ll demonstrate using AJAX to update an HTML table based on a dropdown selection. First I’ll define the ViewModel to contain data for this exercise. Next, I’ll define the dropdown to be populated. Now, I’ll populate the…