X

ASP.NET

ASP.NET 4.0 SEO features: Response.RedirectPermanent()

ASP.NET 4.0 introduces some SEO improvements. Response has now new method calledRedirectPermanent(). This method performs same redirect as Response.Redirect() but it uses response code 301. You can find more information about HTTP response codes from HTTP 1.1 specification, chapter 10. Status Code Definitions.

Invalid postback or callback argument. Event validation is enabled using in configuration

I wrote web part that uses Repeater control to create some repeating blocks of output. Each of these blocks has Button control in it. When I ran web part under SharePoint I got the following error: Invalid postback or callback argument. Event validation is enabled using in configuration or in a page. For security purposes, this feature verifies that arguments to postback or callback events originate from the server control that originally rendered them. If the data is valid and expected, use the ClientScriptManager.RegisterForEventValidation method in order to register the postback or callback data for validation. Here is the solution.

Removing SPAN-tags around server control

I had to write some ASP.NET server controls for our current SharePoint portal project. We have very nice DIV-based layout and using standard components that generate table and a lot of JavaScript seems to me like an bad idea. I found out that server controls put container tags around their mark-up. I needed my own tags around output and I found a way how to achieve it.

Resizing uploaded image

One of my readers asked for example about my image resizing routine. Here you can find example and also some notes about my code design solution.

The view ‘Index’ or its master could not be found. The following locations were searched

One of ASP.NET MVC errors wasted one hour of my life today (of course, it is many times less than this season’s leader SharePoint) but this is still one hour. “The view 'Index' or its master could not be found. The following locations were searched” error raised suddenly and I was not able to get over it. Well, this time solution was simple.

ASP.NET MVC: Ignore requests to favicon.ico

One problem I faced when writing my example pet portal on ASP.NET MVC was Google Chrome’s request to favicon.ico that doesn’t exist. IE8 that I use (8.0.7000.0) doesn’t make these blind requests to discover that favicon.ico is not there. Solution to my problem was very simple.

Starting with ASP.NET MVC

About a week ago I started learning ASP.NET MVC framework. It is pretty cool entertainment for cold winter nights as I found out. Here you can find how I got started and what resources I used.

<asp:Chart>

Scott Guthrie had some good news almost week ago - there is new charting component for ASP.NET available now. Component is made by Microsoft and it is free to download. This component fills one important hole in ASP.NET components gallery. We have now very powerful charting component that is highly customizable and configurable. There is also available chart control add-on for Visual Studio 2008.

ASP.NET Dynamic Data

ASP.NET Dynamic Data is one of those technologies I have been keeping eye on. With .Net 3.5 and Visual Studio 2008 SP1 is fully available. Let's see how it works and how we can use it.

GridView or Repeater?

What is the difference between GridView and Repeater? This is one of the most common questions that beginners ask when they are trying to get familiar with data bound controls. Both of these controls have their own using context and I try to explain when one should use GridView and when it is okay to use Repeater.