Tips for working with strings in C# 2.0

Apr 27, 2006
Working with strings is something all developers do all the time. It’s probably the thing we spend more time with above anything else. In C# 2.0 many new features for string manipulation has been added, so I’ll dig into some of those. String.ToLowerInvariant/String.ToUpperInvariant These are two new ways of turning a string into pure lowercased or uppercased characters, but add an invariant culture as IFormatProvider. If you are used to ToLower and ToUpper then you sho... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

XHTML strict in ASP.NET 2.0

Apr 24, 2006
If you ever tried to validate a web page to the W3C standards you might have experienced some differences between the code that is generated to your browser and the code that the validators see. That's because ASP.NET renders the page differently for newer browsers and older browser. The validator is considered an old browser and is therefore presented with legacy code from the server controls. An ImageButton control renders a border attribute (border="0") when in legacy/... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Health monitoring in ASP.NET 2.0

Apr 24, 2006
The new ASP.NET 2.0 provider model has once again amazed me. It lets you write to the EventLog, Sql Server and WMI as standard and lets you write your own provider that monitors the different events that occurs in a web application or ones you raise yourself. Read more on MSDN about using health monitoring in ASP.NET 2.0. It also lets you send an email when an error occurs with writing anything but some lines in the web.config. This is amazing. I don’t ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

XML language list

Apr 24, 2006
Yesterday, I wrote about an XML country list that I couldn’t find on the Internet, so I generated one myself. That was possible because I had a list of countries in a database. But what about languages? Countries and languages are both commonly used on websites and I do have a list of both. So I decided that I would generate an XML language file similar to the country list and share it with you. Each language is represented by its 2 letter code and the... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

XML country list

Apr 23, 2006
Today, I had to bind a list of countries to a drop down list in ASP.NET 2.0. I wanted to use an XML file to store the countries. There are more than 200 so there was not way I was going to hard code them in the HTML. I have done this many times before, but never from an XML file. Normally I store the countries in a database, because other database tables would reference it. Today, I just wanted a list of countries with no relation to any data at all. My plan was ... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Make the GridView control accessible

Apr 21, 2006
The GridView is a new web control in ASP.NET 2.0 and is an improvement of the old DataGrid. One of the biggest issues with the DataGrid was the lack of standard compliance and accessibility. This has been fixed in the new GridView along with a lot of other things as well. When setting the property UseAccessibleHeader = true, it replaces the <td> elements of the header row with the correct <th> which means table header. It also adds the scope property of t... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Firefox has an ”Almost Standards” mode

Apr 19, 2006
In the world of web developing there are many uncertain elements, but one thing you can always count on is the different rendering of HTML and CSS in the various browsers. A serious web craftsman tests for inconsistencies in Firefox, IE, Safari and Opera and makes the appropriate adjustments. That’s just something you have to do, even if your mark-up is W3C standards compliant. Today, I came across an article describing the Gecko’s “Almost Standards” mode, which in es... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Resize the browser window from the toolbar

Apr 18, 2006
How to resize the browser without using a toolbar [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

Old ASP is easier to manage

Apr 17, 2006
For the past six months or so, I’ve been working on a really cool website in ASP.NET 2.0. As soon as the last bugs and design tweaks have been dealt with, we are releasing it to the world – we’re almost there. Yesterday, the webmaster wanted to do some changes to the website himself. He knows a little HTML and has managed sites before - including the old version of the site we’re building. So, I gave him the FTP login information and he connected from Dreamweaver as h... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

AJAX and search engines – Do's and Don'ts

Apr 13, 2006
In the light of the immense popularity AJAX has received the last couple of months and the emerging tools like Atlas and AJAX.NET, I thought it was the right time to talk about the implications on search engine behaviour on AJAX enabled websites. In this post I’ll split websites into two categories – the public and the protected. A public website is accessible to all people and does not require login of any kind. It’s the most common type of website out there. The pro... [More]* $4.95/month ASP.NET Hosting with FREE SQL 2012 DB! – Click Here!

About the author

Mads Kristensen

Mads Kristensen
Program Manager at the Microsoft Web Platform team and founder of BlogEngine.NET.

More...

Month List

Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer’s view in any way.