Archive of ASP.NET
-
ASP.NET ListView and GroupTemplate
Posted on August 31, 2010 by Frederik Vig in ASP.NET, Code SnippetThe other day I was building a mega menu for a customer - one of the requirements was to let the editor choose the number of columns of links to display. This turned out be quite easy with ASP.NET's...
Continue reading this entry → -
EPiServer Dropdown CheckList Property
Posted on August 28, 2010 by Frederik Vig in ASP.NET, EPiServerToday I wanted to create a custom property in EPiServer that uses a dropdown list where the user can select multiple options. In HTML you have the select element which when having the attribute multiple="multiple" actually does what I want,...
Continue reading this entry → -
CSS and JavaScript compression and bundling
Posted on June 20, 2010 by Frederik Vig in ASP.NET, CSS, JavaScriptIn 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...
Continue reading this entry → -
Creating a contact form with ASP.NET MVC
Posted on May 13, 2010 by Frederik Vig in ASP.NET, JavaScriptWe'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...
Continue reading this entry → -
ListControl AppendDataBoundItems and DataBind
Posted on April 19, 2010 by Frederik Vig in ASP.NETBy default when using code like this, the list item will be cleared when data binding is performed. Please choose protected override void OnLoad(EventArgs e) { base.OnLoad(e); string { "C#", "ASP.NET", "EPiServer", "Umbraco", "jQuery" }; ddlCategories.DataSource = categories; ddlCategories.DataBind(); } Will give us. C# ASP.NET EPiServer Umbraco jQuery As you...
Continue reading this entry → -
Detecting Ajax requests on the server
Posted on April 6, 2010 by Frederik Vig in ASP.NET, JavaScriptIf 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...
Continue reading this entry → -
Getting the Page and EPiServer CurrentPage object from HttpContext
Posted on February 20, 2010 by Frederik Vig in ASP.NET, EPiServerJust a little quick tip when needing to use either the Page object or the EPiServer CurrentPage object from a class file. HttpContext.Current will give you access to the current request, what we can do is cast HttpContext.Current.Handler (since Page...
Continue reading this entry → -
Visual Studio 2010 EPiServer Snippets
Posted on February 11, 2010 by Frederik Vig in ASP.NET, EPiServer, Visual StudioI finally got my hands on a copy of Visual Studio 2010 RC1! After playing around a bit, I stumbled across the new snippet functionality in Visual Studio 2010. You can now use snippets in the markup files as well...
Continue reading this entry → -
EPiServer code walkthrough #1 – 404 handler
Posted on January 29, 2010 by Frederik Vig in ASP.NET, C#, EPiServerThis is the first post in a new series called "EPiServer code walkthrough". What I'll do is go through one new EPiServer module in each post. Writing a little about what it does, learn by reading its code, and...
Continue reading this entry → -
Html Helpers vs Server controls
Posted on December 8, 2009 by Frederik Vig in ASP.NETI received some very good comments on my post Extending PageData with some cool Html Helpers. Which made me want to explain my thoughts on the subject a bit more :). For me, most of the server controls...
Continue reading this entry →
