On new projects where I use EPiCode.Extensions I always register the namespace EPiCode.Extensions in my web.config – that way I can use the extension methods in my .aspx and .ascx files without needing to register EPiCode.Extensions in every file. … <namespaces> … <add namespace="EPiCode.Extensions" /> </namespaces> </pages> … Sometimes this can cause some problems when [...]
When setting up new sites in IIS you specify which host names map to your site. Usually this is at least two: www.example.com and example.com, sometimes even more. One great new addition to IIS 7 is the URL Rewriting extension. This allows you to setup a few rules for your URLs. Let’s start by downloading [...]
In the last post in Create an EPiServer site from scratch I go through some optimization tips and tricks from YSlow. One of these are CSS and JavaScript compression and bundling of files to create fewer HTTP requests and to send the least amount of data back to the client as possible, removing whitespaces, comments [...]
Last updated 05.07.2010 Table of Contents Report Center Mobile Bugs and where to find help FAQ Subscription Categories Import / Export Content Channels URL rewriting / friendly URL TinyMCE / Editor XForms Globalization / localization File system / VPP Security, Membership and roles Events Oracle SEO Workflows Errors, Logging and debugging Logging Errors and Error [...]
I was brushing up on custom properties and came across Allan Thræn’s post Custom Property: Category Drop Down. The code is simple and works great, but one thing I didn’t like is that you need to give the property the same name as the root category that you use to populate the drop down. In [...]
We’re going to create a contact form in ASP.NET MVC 2.0, that uses Ajax to send the form data and that uses client side validation to improve the user experience for our users. Start by creating a new ASP.NET MVC 2.0 web application project in Visual Studio. This will create a new project with the [...]
In most of my project I load the jQuery library from a CDN, either Google or Microsoft. This ensures that my page will load faster for my visitors, since the jQuery file will get sent to them from their nearest location, gzipped and compressed. When the visitor visits another site that use the same jQuery [...]
By default when using code like this, the list item will be cleared when data binding is performed. <asp:DropDownList runat="server" ID="ddlCategories"> <asp:ListItem>Please choose</asp:ListItem> </asp:DropDownList> protected override void OnLoad(EventArgs e) { base.OnLoad(e); string[] categories = new[] { "C#", "ASP.NET", "EPiServer", "Umbraco", "jQuery" }; ddlCategories.DataSource = categories; ddlCategories.DataBind(); } Will give us. <select name="ctl00$MainContent$ddlCategories" id="MainContent_ddlCategories"> [...]
If you use jQuery or ASP.NET AJAX you can easily detect Ajax requests on the server by simply checking for the HTTP_X_REQUESTED_WITH HTTP Header. Both libraries automatically add this to the HTTP Header when they send a request. Here’s a little code snippet that returns true for Ajax requests. public static bool IsAjaxRequest() { return [...]
If you have visited sites like Smashing Magazine chances are high that you’ve seen articles with titles like “40 most used jQuery plugins”, or something similar to that. I find articles like that to be great for inspiration. You usually have a section for galleries/slideshows/carousels etc, I thought I’d implement one of those plugins in [...]