April 2006 - Posts

One of the little things that they changed in VS2005 by default that has always annoyed me is the way the backspace key works. When you use tab to move a line of code over and decide you went to far, in VS2003, if you hit delete, it will go back a tab. In Visual Studio 2005, it will just delete a single space.

Luckily this is easy enough to fix. Simply open options, and expand Text Editor -> C# (Basic for Marcus) -> Tabs. In the Tab group change from Insert Spaces to Keep tabs.

Keep Tabs

This will make it tab backwards when you hit delete instead of just deleting a single space.

By now, you may have used the gridview to display some sort of data. Often in a gridview, you may want to display a hyperlink that links to another page and include a parameter such as an id. At first, you may be tempted to use a TemplateField and render the hyperlink yourself and use a Bind expression to craft a querystring with your custom paramters. Although that way will work, the HyperLinkField column actually handles this very well.

The HyperLinkField contains two properties to handle this DataNavigateUrlFields and DataNavigateUrlFormatString. Simply specify what fields you want to use and then build a format string like any other.

Here is an example.

<asp:HyperLinkField DataTextField="LastName" DataNavigateUrlFields="Id" 
DataNavigateUrlFormatString="/page.aspx?id={0}" />

If you have an issue with IE7 Beta 2 that you would like fixed (Marcus), there is a new way of registering bugs through Microsoft Connect. You just have to join the IE Feedback program (it's really simple to join). Previously you could just send an e-mail to ietell@microsoft.com, but that address has been retired.

Microsoft Connect

The CSS Control Adapters are finally back up. Be sure and get the update if you downloaded them earlier.

These are really cool. Some of the problems a lot of people have had with controls such as DetailsView, FormView, CheckBoxList, Menu, TreeView, etc. is that they don't produce web standards compliant html. These new CSS control adapters allow for much cleaner looking code to be output by these useful controls.

The site below is really cool because it shows you the visual difference between using the CSS adapters and without them. On top of them it shows you the HTML is renders with the adapters on and off. This is a great step forward.

CSS Friendly Control Adapters

I posted about this quite some time ago. There was supposed to be 101 samples posted and for the longest time (prior to RTM), they only had 50 posted and it said "check back soon". Apparently soon is about 6 months.

Anyhow, the samples have been updated and there are samples in there for everything form encrypting data and Office integration. It even has Table PC and Compact Framework stuff if that is your bag.

101 .NET Framework 2.0 Samples

I had somehow thought IE7 was in official Beta 2 for a few months now, but I guess not. There were a couple of Beta 2 previews. So far I can't tell any bit of difference and I am still unable to view Page History for anything but today. Also the issue affecting the header on Thrifty.com has still not been fixed. Oh well, FI.

If you want to install, be sure and remove any previous versions of IE7. You have to click show updates in Add/Remove programs to find it.

On another note, it seems to have fixed the issue that I was having only on my computer here on this site where all the text was in Italics. The strange thing is it didn't happen on any other computer, but it did happen on Firefox. Quite strange.

Internet Explorer 7 Beta 2

I had suspected this would be the case. Originally when the express products were released last Novemeber, they stated that they would only be free for the first year. Now they have revised this and stated that they will be free indefinitely.

Although you may not use any of the Visual C#, Visual Basic (Marcus), or Visual Web Developer because you have MSDN subscriptions, the key one being free is SQL Server Express . This will be used more and more on systems and is a great way for any application that needs to do simple data storage.

If you haven't downloaded any of them yet, you can at the url below.

Express Editions

Ok, it has been a while since I have posted. I don't have quite the free time I did before to look for things to post. Anyhow, this is nothing new, but I have seen it on some tests and stuff.

When using the authorization element in the web.config, you may want to deny particular users.

This line will deny all anonymous users.

<deny users="?" />

This line will deny all users.

<deny users="*" />

Most of you probably know that by now, but I thought I would point it out any way.