Browse: Home / Programming
By John Bubriski on January 4, 2012
This article applies to IIS6, but the concept applies to almost any public website. You should probably setup a 301 redirect from http://example.com to http://www.example.com (or the other way around). If you don’t, bad things can happen. Anyway, here is how you can do it in IIS6: Instructions Create a new website with the same [...]
Posted in Programming | Tagged HTTP 301 Redirect, IIS, IIS6 |
By John Bubriski on November 17, 2011
I’ve added a new page called Developer Resources. It’s going to be a repository of all of the blogs I read and podcasts I listen to. It’s a work in progress, but most of the podcasts I listen to regularly are up there now. Feel free to post suggestions! Most everything there will be programming/IT related.
Posted in Programming | Tagged Blogs, Podcasts, Resources |
By John Bubriski on November 9, 2011
If you’ve worked on an ASP.NET MVC site, you may have had to reference the ID in the current route. In a Razor view you can reference it via the following variable: @Url.ViewContext.RouteData.Values["id"] You may use this a lot if you have a lot of inter-action navigation. Why not throw it into an extension method!? [...]
Posted in Programming | Tagged .NET Framework, ASP.NET, ASP.NET MVC, C#, Code, Extension Method |
By John Bubriski on October 18, 2011
A few days ago I upgraded to TortoiseSVN 1.7.0. Apparently the format for the SVN files changed so existing working directories needed to be “upgraded”. With existing (old) working directories you’ll notice that you can’t perform your normal operations (commit, update, etc.). Instead, you’ll have a single context menu entry for “SVN Upgrade Working Copy”. [...]
Posted in Programming | Tagged SCC, Source Code Control, SVN, TortoiseSVN |
By John Bubriski on October 17, 2011
Ever need to inject some custom validation into a BizForm? Check it: Below I’ve provided a method you can drop into your BizForm code behind, or the code behind of a BizForm clone. Then, call this method from an event handle for the OnBeforeValidate event. If Field A has a value this validation method forces [...]
Posted in Kentico, Programming | Tagged .NET Framework, ASP.NET, C#, Code, Kentico API Programming, Kentico BizForms, Kentico CMS |
By John Bubriski on October 13, 2011
I just wanted to let you know that I have 2 new pages on the site! There is a new Kentico Resources page that contains a short list of some important resources. Feel free to let me know about any others Also, there is a new Kentico Tips and Tricks page that contains… you guessed it! Tips and Tricks! [...]
Posted in Kentico, Programming | Tagged Kentico API Programming, Kentico CMS |
By John Bubriski on September 12, 2011
Code Snippets Another great tip for cranking out the code, or in case you don’t remember the syntax of certain keywords. Just start typing the shortcut for a code snippet and hit tab twice, it’s that easy. prop ->tab tab For example, after you type “prop” you should see this: Then you will see this [...]
Posted in Programming | Tagged Productivity, Quick Tip, Shortcuts, Time Saver, Visual Studio |
By John Bubriski on August 31, 2011
Ever need to easily access a collection of items by their key? Exactly, you use a Dictionary! But how do you easily convert a List to a Dictionary? Just use a little LINQ. Let’s say you have a simple class: public class Stuff { public int Key { get; set; } public Stuff(int key) { [...]
Posted in Programming | Tagged LINQ, Quick Tip |
By John Bubriski on August 29, 2011
A little known feature in Kentico is the ability to have “Wildcard URL’s”. Wildcard URL’s are essentially the ability to route multiple URL’s to the same page. It’s similar to the routing features in ASP.NET MVC or ASP.NET 4.0. A Built In Example If you want to see a working example of Wildcard URL’s you [...]
Posted in Kentico, Programming | Tagged Kentico CMS, Mobile Site, URL Routing, WIlcard URLs |
By John Bubriski on April 19, 2011
In this article I’ll show you how to create a special type of BizForm that will allow each user to edit their specific form data over and over. When a user returns to a page that has the BizForm on it, their data will be automatically loaded from the BizForm table. This is a simple and easy way to store per user data, without mucking with the System Tables which aren’t intended to store this type of data. You also retain the benefits that a BizForm has over a System Table (A view of the data, Notifications, attachments, etc.)[...]
Posted in Kentico, Programming | Tagged .NET Framework, ASP.NET, C#, Code, Kentico API Programming, Kentico BizForms, Kentico CMS |