Every ASP.Net developer knows about this setting, or at least should. But what happens when you forget about this setting and simply install your web application in a production environment.
At Tess's MSDN blog, you will find an article explaining why you should set Debug=False on production servers. There's also a link to Scott Guthrie's weblog which describes the same subject. Both mention the deployment retail setting, which is new in ASP.Net 2.0. It will tell IIS to ignore the Debug=true setting for production servers, simply by placing the following in the machine.config:
<configuration>
<system.web>
<deployment retail=”true”/>
</system.web>
</configuration>
Using this setting, IIS will simply ignore the debug= setting. So you will you never forget to change it when you move your new web application to the production server.
When Visual Studio 2005 was launched last year, Microsoft announced that the Express editions would be free-of-charge for the first year. Apparently they changed their minds, because on Aaron Stebners blog I bumped into a link to this press anouncement saying that the Visual Studio Express Editions will remain free of charge.
“Software has the potential to transform everyday lives. By making the Visual Studio 2005 Express editions available free of charge, we’re putting the power of programming into the hands of an exploding community of recreational programmers,” said S. Somasegar, corporate vice president of the Developer Division at Microsoft. “This community has asked for it, and we are excited to provide it.”
Coupled with Microsoft SQL Server Express, the Visual Studio Express editions provide a tool that meets the needs of a wide range of software enthusiasts, including beginning Windows® developers, hobbyist Web developers, amateur game developers and even hardware developers. All the editions of Visual Studio Express will be offered as free downloads: Visual Web Developer™ Express, Visual Basic® Express, Visual C#® Express, Visual C++® Express and Visual J#® Express.
From: Microsoft PressPass
Dan Fernandez has posted some more specific details about this announcement and also about some new Express Edition Starter Kits, training videos and other resources that were released.
This is certainly not brain surgery (or rocket science), but I needed some code as an example for my CSS overrides to add code in my blog. These overrides rely on code being copied using the CopySourceAsHTML add-in. So there you go.
When you want to set the selected item in a DropDownList, you will find the index for the item you wish to select. This is pretty straight forward using the FindUsingValue (or FindUsingText) and the IndexOf methods. But you will need to handle situations where items just don't exist. So for my current web application I created a small method to do this. It's probably useless, but I like it:
/// <summary>
/// Sets the selected item in the drop down list to the specified value in a
/// safe manner. When no matching item could be found, the methed will select
/// the first item in the list.
/// </summary>
/// <param name="listControl">The list control in which to select the value.</param>
/// <param name="value">The value to select in the items list</param>
public static void SetSelectedItem(ListControl listControl, string value)
{ if (listControl == null) throw new ArgumentNullException("listControl"); if (listControl.Items.Count == 0) throw new ArgumentOutOfRangeException("listControl", "The list must contain items.");
// Get the currently selected item, or the first item in the list
// when no item was selected.
ListItem selectedItem = (listControl.SelectedItem != null ? listControl.SelectedItem : listControl.Items[0]);
// Try to find the item for the specified value doesn't match the value
// for the current selected item.
if (!selectedItem.Value.Equals(value))
{ // A value is specified, so try to find it.
if ((value != null) && (value.Length > 0))
{ ListItem valueItem = listControl.Items.FindByValue(value);
if (valueItem != null)
{ // Deselect the current item and assign the new value item
// as the selected item.
selectedItem.Selected = false;
selectedItem = valueItem;
}
}
}
// Set the selected item
selectedItem.Selected = true;
}
If you havent' heard of Atlas, then you've probably been sleeping for the last couple of months. Atlas is the Microsoft approach to Ajax development and from what I've seen sofar, it offers really cool features to make web applications with a really great user experience.
This morning I stumbled upon the Atlas control toolkit while browsing the MSDN blogs. The Atlas control toolkit contains a number of controls that offer really great functionality for your web application. And even better, it comes with all the source code. The following is a list of controls currently in the toolkit:
- CascadingDropDown: Easily link drop downs, complete with asynchronous population and no postbacks!
- CollaspiblePanel: This extender allows panels on your page to collapse and expand with no code.
- ConfirmButton: This extender adds a confirm dialog to any Button, LinkButton, or ImageButton control.
- DragPanel: Makes any panel into an object that you can drag around the page.
- HoverMenu: Allows UI to pop up next to a control when the user hovers over it.
- PopupControl: This extender turns any panel into a popup.
- ReorderList: This control is a full-featured data-bound control that allows its elements to be reordered on the client via drag and drop.
- TextBoxWatermark: This extender adds "watermark" prompt text to TextBoxes on the page.
- ToggleButton: This extender turns an ASP.NET CheckBox into an image checkbox.
The Managed Code Analysis (FxCop) team are working with other teams around Microsoft to ensure that any customer facing code released in Orcas (the new version of Visual Studio!) is Code Analysis clean:
We’re also asking for your help. If you’ve ever come across code that hasn’t passed Code Analysis whether that be generated by custom tools, compilers, MSDN Library examples, sample applications, templates, designers, articles or any other Microsoft produced code, we want to hear about it.
Blog about it, tell your colleagues, managers, friends, spouses (if they write code), mailing lists, forums and any other medium that you can think of that if they have ever come across code that made them say ‘Damn Microsoft, I wish they would follow their own guidelines’ - that the Code Analysis wants to hear from them.
From: Visual Studio Managed Code Analysis (FxCop)
So if you have things you'd like to see improved in FxCop, check out the link and help Microsoft build a better FxCop.
Well, at least I think so.
I received an email this morning from Mads Kristensen about some stuff he found interesting on my weblog. It included a link to his weblog so I checked it out. And there's enough there to keep me interested. Some example posts:
Some time ago, James Avery wrote an excellent MSDN item about tools every .Net developer should know about. He has now written an equally great article about Must Have Add-Ins. I knew about some of them already, and you may already know them as well, but he's pointed me to some others which I will be testdriving soon!
The article discusses the following Add-Ins:
- TestDriven.NET. Allows you to run NUnit tests from inside the VS IDE.
- GhostDoc. Generates XML comments for methods better than typing /// in your code.
- Smart Paster. Allows you to paste a string as a comment, stringbuilder code, etc..
- CodeKeep. Search for code-snippets on the web.
- PInvoke.NET. Uses a Wiki to help you add method signatures for Win 32 API calls.
- VSWindowManager PowerToy. Define window lay-outs for the VS IDE .
- WSContractFirst. WSContractFirst makes it easier to write your WSDL file, and will generate client-side and server-side code for you, based on that WSDL file.
- VSMouseBindings.The VSMouseBindings power toy provides an easy to use interface that lets you assign each of your mouse buttons to a Visual Studio command
- CopySourceAsHTML. Helps you copy code, including color formatting, to your weblog.
- Cache Visualizer. Allows you to view objects in the ASP.Net cache while you're debugging.
Apple is working on a major new release of their Mac Os X to allow it to run Windows XP on an Intel based Mac. Mac OS users can already download a public beta called Bootcamp. You can read all about it here.