Development – Leet 4 Life

Software Development Code Samples and More

Skip to: Content | Sidebar | Footer

Category: ASP.NET

Global Exception Handling and Logging in ASP.NET or MVC

19 April, 2012 | ASP.NET, C#. NET | By: Michael Merrell

Global Error Handling and Logging is something that I feel no production ready application should be without. The last thing you want your end users to see is a server exception page when something drastically goes wrong. As with most coding practices this shouldn’t be a replacement for localized error handling but more of an addition to ensure that the end user’s experience is the best that it can be. To add Global Error handling and logging you need to go into the Global.asax.cs file in the root of your ASP.NET or MVC Application. If the Global.asax file does not [Read More…]

Modifying the ASP.NET GridView Paging Control

29 March, 2012 | ASP.NET, C#. NET | By: Michael Merrell

The paging control that is built into the ASP.NET grid view is very handy indeed, however the template controls for the grid view leave some to be desired. If you need to add something or get more control over how the paging control is displayed it can cause a great deal of head ache trying to figure out the best way to do so. In my case I needed to add a simple text value before the paging numbers to show that they were page indicators. Below you will find the code I used to add a ‘Page’ label to [Read More…]

Looping Through Multiple/Nested Repeaters

15 February, 2012 | ASP.NET, C#. NET | By: Michael Merrell

Have you ever needed to loop through multiple repeater objects to find a set of controls within or loop through a repeater nested within another repeater? It’s gotten to a point now where there have been multiple instances of each scenario now that I have had to use either a repeater nested within a repeater or two nearly-identical repeaters that I had needed to loop through both in order to find specific identical controls within each one. Below you will find my code example on how to loop through multiple repeaters as well as how to loop through a repeater [Read More…]