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.
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: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.
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.