Posts
All the articles I've posted.
-
LINQ for PHP (Language Integrated Query for PHP)
Perhaps you have already heard of C# 3.5's "LINQ" component. LINQ, or Language Integrated Query, is a component inside the .NET framework which enables you to perform queries on a variety of data sources like arrays, XML, SQL server, ... These queries are defined using a syntax which is very similar to SQL. There is a problem with LINQ though... If you start using this, you don't want to access data sources differently anymore. Since I'm also a PHP developer, I thought of creating a similar concept for PHP. So here's the result of a few days coding: PHPLinq - LINQ for PHP - Language Integrated Query Let's say we have an array of strings and want to select only the strings whose length is < 5. The PHPLinq way of achieving this would be the following: [code:c#]
-
Preview Word files (docx) in HTML using ASP.NET, OpenXML and LINQ to XML
Since an image (or even an example) tells more than any text will ever do, here's what I've created in the past few evening hours: Live examples: Want the source code? Download it here: WordVisualizer.zip (357.01 kb) If you want to know how I did this, let me first tell you why I created this. After searching Google for something similar, I found a Sharepoint blogger who did the same using a Sharepoint XSL transformation document called DocX2Html.xsl. Great, but this document can not be distributed without a Sharepoint license. The only option for me was to do something similar myself.
-
ASP.NET MVC framework - Security
Some posts ago, I started playing with the ASP.NET MVC framework. In an example I'm creating, I'm trying to add Forms-based security. "Classic" ASP.NET offers a nice and easy way to set security on different pages in a web application, trough Web.config. In the example I'm building, I wanted to allow access to "/Entry/Delete/" only to users with the role "Administrator". So I gave the following snip a try: [code:c#] <location path="/Entry/Delete"> <system.web> <authorization> <allow roles="Administrators"/> <deny users="*"/> </authorization> </system.web> </location> [/code]
-
ASP.NET DataPager not paging after first PostBack?
A few posts ago, I mentioned that I am currently giving a classroom training on ASP.NET. People attending are currently working on a project I gave them, and today one of them came up to me with a strange problem... Here's the situation: in VS 2008, a web page was created containing 2 controls: a DataList and a DataPager. This DataPager serves as the paging control for the DataList. Databinding is done in the codebehind: [code:c#] protected void Page_Load(object sender, EventArgs e) { ListView1.DataSource = NorthwindDataSource; ListView1.DataBind(); } [/code]
-
Thank you, ISP!
Living in Belgium sometimes feels like living in the desert. Over the past few years, my ISP has always offered the same: a cable modem subscription with 10Mbit downstream speed, and 256Kbit upstream speed. Great! Except for that data transfer limit of 12 GB per month and the ridiculous price of 42 EUR (that is 61 US$). And no, there are few better alternatives in this center of Europe...
-
ASP.NET MVC Framework - Basic sample application
You might have noticed that I'm quite enhousiast about the new ASP.NET MVC framework. Basically, this new ASP.NET MVC framework is an alternative to standard ASP.NET webforms, with some advantages: For more information and a step-by-step tutorial, check Scott Guthrie's blog: For an article I'm working on, I am writing a sample application using this framework. This sample application is a very basic photo album website, listing some albums and photo's. Anyone who's interested in a sample MVC application (no data entry yet!) can download it.
-
ASP.NET 3.5 Extensions CTP preview released
Just over the weekend, Microsoft has released the ASP.NET 3.5 Extensions CTP. This download includes several additions to ASP.NET 3.5: I'll be doing some testing during the week, and keep you all informed.
-
LINQ to filesystem
The past few hours, I've been experimenting with LINQ. As a sample application, I'm trying to create a small photo album website, which shows me all images in a specific folder on my webserver. What does LINQ have to do with that? Everyone has used a loop over all files in a folder, and I decided to try LINQ for that matter. Here's how: [code:c#]
-
ASP.NET MVC framework preview to be released next week
Half the world has been focussing on the release of the new Visual Studio 2008 and .NET 3.5 last week. That is good, as .NET 3.5 offers lots of nice new features and improvements. In the blogosphere, I haven't read much about an extension I've been waiting for anxiously: the new ASP.NET MVC framework. Luckily, Scott Guthrie posted some examples on it, and I can't wait for a preview to be released next week. I'll keep you informed!
-
ASP.NET load balancing and ASP.NET state server (aspnet_state)
At one of our clients, we used to have only one server for ASP.NET applications (including web services). Since this machine is actually business-critical and load is constantly growing, the need for a second machine is higher than ever. This morning I was asked to set up a simple demo of a load-balanced ASP.NET environment. I already did this in PHP a couple of times, but in ASP.NET, this question was totally new to me. Things should not be very different, I thought. And this thought proved right! A bit later, we had a load balancer in front of 2 web server machines. We got everything configured, fired up our webbrowser and saw a different page on each refresh (stating the server's hostname). Load balancing mission succeeded!