Contact
 

 Wednesday, July 07, 2004
ASP.NET Version Switcher on MSDN Magazine

James Avery was kind enough to include my ASP.NET Version Switcher in his list of the "Ten Must-Have Tools Every Developer Should Download Now" that is published in the current edition of MSDN Magazine July 2004.

Yesterday, I've checked the current version with the Beta1 of Visual Web Developer Express and it worked. Please note that it does seem to have problems running from a network share but once locally installed everything was fine. Let me know if you have difficulties.

Version Switcher
7/7/2004 8:25:00 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [1] 


 Monday, July 05, 2004
A day in the life of a Microsoft security patch

Interesting article I stumbled over while reading an internal DL about the work of the Microsoft Security Response Center (MSRC).

Windows
7/5/2004 6:47:23 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, June 29, 2004
Visual Studio 2005 Beta 1 has shipped

Today at Teched Europe 2004, Visual Studio 2005 Beta 1 (formerly code-named Whidbey) is announced. On the new Developer Center site you can download two sets of products:

  • The full Visual Studio 2005 Beta, available to MSDN Subscribers initially; and by order for non-subscribers for a small fee in the near future.
  • The Visual Studio 2005 Express Beta Products, available for free public download. "The Express products are lightweight, easy to use, easy to learn tools for hobbyists, enthusiasts, and students who want to build dynamic Windows applications and Web sites."

The other interesting site when developing with Whidbey is the MSDN Product Feedback Center, where you can submit Feature Requests and Bugs directly to the product teams, get notified of fixes, rate on the importance etc.

The MSDN documentation is available here.

.NET Framework
6/29/2004 11:16:01 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


FileDisassembler versioning and Reflector 4.0.9.0

The new reflector build 4.0.9.0 is available vie Help|Check for updates.

As I am receiving many emails asking "Where is FileDisassembler for Reflector version X.X.X.X?" I wanted to point out, that not for each new Reflector build there needs to be a new FileDisassembler build.

Lutz changes the assembly version number only when breaking changes affect add-in writers. Therefore, a FileDisassembler build should work with a couple of different Reflector builds. Whenever he includes breaking changes, I am notified before and try to get a new version of FileDisassembler out simultaneously.

So please ask me only for new version, if you get the error message: "The following add-in(s) failed to load. Please check if you have the correct version installed."

FileDisassembler
6/29/2004 10:27:21 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Thursday, June 24, 2004
Excellent MSDN article on ASP.NET Viewstate

Scott Mitchell wrote an excellent MSDN article on the inner workings of the ASP.NET ViewState. That's cool because now I can answer half of the emails I receive about my DynamicControlsPlaceholder and dynamic controls samples by sending them the link to this article :)

It consolidates much of the information that is contained in numerous ASP.NET forum posts and extends Paul Wilson's ASPAlliance article.

Good job, Scott!

ASP.NET
6/24/2004 5:43:31 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Sunday, June 20, 2004
Updated FileDisassembler for Reflector 4.0.6.0

The update can be found here.

FileDisassembler
6/20/2004 10:53:21 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Thursday, June 17, 2004
Cryptographic failure when recompiling the HierarGrid, DCP, FileDisassembler etc.

I've been asked twice in the last 24h about the following error when trying to create your own build of the HierarGrid or any other of my components:

error CS1548: Cryptographic failure while signing assembly 'DBauer.Web.UI.WebControls.HierarGrid.dll'
-- 'Error reading key file '..\..\..\DBauer.Web.UI.WebControls.snk' -- The system cannot find the file specified. '

This happens because all builds that I compile are strong named and signed with my private key. The reference to my private key is located in the AssemblyInfo.cs file. Therefore, if you want to recompile the HierarGrid please either remove the reference to my keyfile in the AssemblyInfo.cs or create your own private key and use it to sign the assembly.

Further information on creating a key and strong named assemblies can be found here:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpconStrong-NamedAssemblies.asp

FileDisassembler | DynamicCtrlPlh | HierarGrid
6/17/2004 10:12:05 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [3] 


 Tuesday, June 01, 2004
New FileDisassembler page

Reflector.FileDisassembler now has its own page and of course RSS Category Feed.

FileDisassembler
6/1/2004 1:36:15 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Sunday, May 30, 2004
New HierarGrid version 1.6

The new minor release 1.6 of the HierarGrid contains the following changes:

  • Bugfix: corrected problem with non-unique IDs that were generated for "ChildTemplate" panel in a DataMode=Table HierarGrid
  • Bugfix: child templates were inserted into first column when PagerStyle was set to "Top"
  • Bugfix: resetting the DataItem after inserting the child templates for further custom processing
  • Bugfix: copying selected state for <select> tags

Download here.

With the first bugfix, the FindControl call to access a child template changes to Control c=HierarGrid1.Items[i].Cells[1].FindControl("DCP").FindControl("Panel").FindControl("Panel_[PanelId]").FindControl("ChildTemplate_[PanelId]").FindControl("[InnerControlId]");

HierarGrid
5/30/2004 9:00:33 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Wednesday, May 26, 2004
Demos of Visual Studio 2005 Team System

There are a couple of interesting demo videos of some parts of Visual Studio 2005 Team System (code-named Burton)

http://www.activewin.com/awin/comments.asp?HeadlineIndex=24465

.NET Framework
5/26/2004 10:23:18 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [1] 


 Saturday, May 22, 2004
New FileDisassembler version for Reflector 4.0.3.0

The new version of FileDisassembler, an add-in for Lutz Roeder's Reflector 4.0.3.0 that allows to dump an assembly to source code files, contains the following new features:

  • Assemblyinfo.cs is generated
  • Reflector supports IL code as another language => FileDisassembler can now dump assembly in IL code
  • (Custom) Attributes are written to the file (no matter what the reflector settings are)

FileDisassembler
5/22/2004 1:26:16 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [1] 


 Wednesday, May 05, 2004
FileDisassembler for Reflector 4.0

I've created a little add-in called FileDisassembler for the new version of Lutz Roeder's .NET Reflector that you can use to dump the decompiler output to files of any Reflector supported language (C#, VB.NET, Delphi). This is extremely useful if you are searching for a specific line of code as you can use VS.NET's "Find in Files" or want to convert a class from one language to another.

FileDisassembler
5/5/2004 4:10:42 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [9] 


 Tuesday, May 04, 2004
Interesting article about the future of Microsoft from a business perspective

BusinessWeek has a very interesting yet critical article about the future of Microsoft called "Microsoft's Midlife Crisis". Interesting to see the company more from a business analyst and less technical point of view.

Technology
5/4/2004 6:12:17 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, May 03, 2004
Advanced HierarGrid demo application

Nigel Parham was kind enough to create and let me publish a simplified version of his business application that uses the HierarGrid. Included in the app are samples for:

- sorting, filtering
- paging with variable page size and customized style
- row highlighting
- export to Excel
- keyboard support

Please note that due to simplifying the original application, data access code was moved into the code-behind files thus resulting in methods that exceed a screen page. Of course, that should not be considered a best practice :)
Furthermore, as any code on my site it is provided as-is with no warranties, and confers no rights - please consider this as a quick tutorial or proof-of-concept.

The sample app can be downloaded here ("How to get started") and there is also a separate word document that describes installing it.
Thanks Nigel!

HierarGrid
5/3/2004 3:44:26 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Thursday, April 29, 2004
Interesting Forbes article about the commercialization of linux

This article talks about the trend of linux distributors to commercialize the OS and cites Rick Carey, a former proponent of OSS who was Chief Technology Architect at Merril Lynch and now Bank One: "The companies that are trying to treat Linux like it's regular software and have a business model based on per-CPU or per-desktop licensing worry the heck out of me. For us, that makes Linux prohibitively expensive. And it makes a stronger case for us to go Windows".

Technology
4/29/2004 1:38:33 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, March 30, 2004
Article on ASPAlliance about LoadControl vs LoadTemplate

While developing the HierarGrid I noticed that there are some subtle differences between loading UserControls with Page.LoadControl and Page.LoadTemplate. Without digging deeper into that I decided to add a property “TemplateControlMode” to the HierarGrid so that the developer can choose which way to load the template.

After some users asked what the "right" setting for the property is or reported exceptions that were related to choosing the "wrong" setting, I decided to take a look at the two implementations to find the differences. My new article on ASPAlliance explains what I've found.

ASP.NET | HierarGrid
3/30/2004 2:55:27 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Friday, February 20, 2004
News about the HierarGrid

I've found an interesting page on CodeProject that references the HierarGrid: Tony Truong wrote an article about the ExDataGrid, which has the ability to expand and contract datagrid columns rather than datagrid rows as the HierarGrid does. Unfortunately, he decided not to build his own custom control instead of extending the HierarGrid to support both requirements. But it looks like he did a good job anyway.

Furthermore, I got an email from Ariel Dolan who pointed me to his homepage which integrates the HierarGrid with filtering, sorting and paging. Enter "555" into the textbox and hit search. Then click on the "Filter Sort/Hit table" and see the hierarchical grid in action.

Didier Depretz sent me a snapshot of his application which also shows the possibilites of the HierarGrid.

HierarGrid
2/20/2004 6:22:48 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, February 02, 2004
Xen, formerly X#, in the news

"Xen, a new programming language coming out of Microsoft Research and developed in conjunction with the University of Cambridge, promises to bring together three disparate but integral components of programming, wrapping them together in .Net."

http://www.extremetech.com/article2/0,3973,1441099,00.asp

.NET Framework
2/2/2004 12:51:00 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


"Behind the scenes of ASPX files"

A nice article called Behind the scenes of ASPX files by Natty Gur describes how dynamic compilation in ASP.NET works and extends the last paragraph of Dino's article The ASP.NET HTTP Runtime I wrote about a couple of months ago.

Still, I am missing an article that explains how dynamic code generation in ASP.NET works from an ASPX page with a couple of markup tags through the PageParser into a .cs file that is then compiled into a .NET assembly.

ASP.NET
2/2/2004 12:42:20 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, January 06, 2004
Watch MediaCenter Recorded TV on Other Microsoft Windows XP-Based PCs

The following document explains how to watch dvr-ms files on a standard Windows XP machine:

http://www.microsoft.com/windowsxp/mediacenter/using/tips/recordedTV.asp

MCE
1/6/2004 4:20:29 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Saturday, January 03, 2004
Using the Hauppauge remote control with MCE

Another MCE related post:

On a thread on TheGreenButton.com I found a nice enhancement to the Irremote.ini file that makes the Hauppauge remote control work with MCE. I do have some problems with the shortcuts that include special keys like Ctrl, Alt etc. (I have to press several times until it recognizes it) but it works.

Link is here and search for "IR.exe". One additional comment: delete the remarks like "; Up arrow" from Kenzos listing.

Update: updated the link

MCE
1/3/2004 12:11:26 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [9] 


 Wednesday, December 31, 2003
IT-Outsourcing on Red Herring

Interesting take on IT outsourcing in Red Herring.

Bottom line:
"How much does outsourcing really save companies? According to a November 2003 report by People 3, only 21.1 percent of companies surveyed reported a cost savings of greater than 20 percent due to IT outsourcing, while 18.4 percent did not achieve any cost reductions, and 9.2 percent actually had an increase in costs from outsourcing contracts."

“Many companies often neglect to factor in all costs associated with managing outsourcing engagements, which average 4.5 percent of the total contract value and can be as high as 15 percent,...”

Technology
12/31/2003 11:12:40 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, December 30, 2003
Media Center 2004 Community Sites

Now, that I've set up Windows XP Media Center Edition 2004 on my brand new Dell Dimension 8300 with ATI Radeon 9800XT and Hauppauge WinTV PVR350, I wanted to know how to burn the recorded dvr-ms files to a DVD so that my standard DVD player is capable of displaying them.

During my Google search I came across these three cool MCE community sites:

  • TheGreenButton.com: informative forum, good FAQ and download section
  • xpMCE:good forum and FAQ as well
  • shspvr.com: which is mostly related to the Hauppauge WinTV card

The answer to my question is:

The dvr-ms format is a MPEG-2 stream extended by some metadata. For further reference see this MSDN article. Sonic MyDVD and Nero's newest version 6.3 are able to import these files and burn them onto DVD.

However, when I try to import a recorded TV show using either program, it suddenly locks up with a Watson screen. Anyone aware of what's wrong?

MCE
12/30/2003 11:30:23 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, December 29, 2003
Cultural differences between Unix and Windows developers

Joel Spolsky has a very nice article on his homepage that talks about the cultural clash between Unix and Windows developers. Absolutely worth a reading.

Guten Rutsch ("have a good slide" as we say in German) into a happy new year!

Technology
12/29/2003 3:52:57 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, December 08, 2003
Tracing HTTP requests with ieHttpHeaders

Jon points to this nice tool called ieHttpHeaders which I haven't heard of previously.

ASP.NET
12/8/2003 4:06:35 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Friday, December 05, 2003
How to convert your Windows Server 2003... to a Workstation!

In case you are using WS2003 as your primary, every day OS the following site may be helpful. It consolidates many of the tips to deactivate features directed to a "real" server (like shutdown tracker etc.) and reactivate features for a consumer OS (like theming, DirectX, etc.)

How to convert your Windows Server 2003... to a Workstation!

Windows
12/5/2003 10:36:49 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Sunday, November 23, 2003
PDC Sessions Available Online

I've just read that the session videos from the PDC are all available online at http://microsoft.sitestream.com/PDC2003/Default.htm

PDC 2003 | Longhorn
11/23/2003 11:42:38 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Wednesday, November 19, 2003
Talking about codenames...

... I may not forget a link to this cool page: Microsoft Codename compilation

Software | Windows
11/19/2003 2:21:46 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, November 17, 2003
Codenames, Technologies and Waves: Which technology ships when?

I've heard a couple of times that people - especially who have not been to the PDC - are a bit confused about all the new codenames and the technologies behind them. While it seems easy to google for more information about each it is also important to know which technology wave they belong to.

The first upcoming technology wave is made up of Yukon, the next version of SQL Server and Whidbey, the 2.0 version of the .NET Framework and Visual Studio (currently the version number is still 1.2 which is expected to be changed prior to the release). They are supposed to ship simultaneously in late 2004 (I think that's what I've heard at PDC - correct me if I'm wrong).

The second one is the "Longhorn wave", where Longhorn is the codename for the next version of the Windows operating system. The .NET FX is then included in the OS and the whole set of APIs is called WinFX. According to the Microsoft Developer Roadmap a new version of Visual Studio, code-named Orcas will be released at the same time (Currently, you can use the Whidbey version to develop Longhorn applications). A server version of Windows called "Longhorn Server" is expected to be shipped shortly after the client.

Yukon/Whidbey wave:

  • ClickOnce (no-touch deployment)
  • MSBuild (new build system)
  • ObjectSpaces (O/R mapper)
  • Whitehorse
  • parts of System.Transactions (according to Don Box's session at the PDC)

Longhorn/WinFX/Orcas wave:

  • Avalon (new graphic subsystem)
  • WinFS (new storage system)
  • Indigo (communication, good FAQ here, perhaps separately before Longhorn for WS2003 and WINXP)
  • Monad (command shell)
  • SuperFetch
  • NGSCB

PDC 2003 | Software | .NET Framework | Longhorn | Windows
11/17/2003 5:04:34 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [2] 


 Wednesday, November 05, 2003
Mono roadmap covering Whidbey and WinFX

Miguel announces the Mono roadmap and the Hacking roadmap that contains plans about the upcoming Whidbey features and even about implementing Indigo and Avalon.

Technology
11/5/2003 1:14:12 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, November 04, 2003
Unofficial Tweak guide for Longhorn 4051

Just noticed the nice tweak guide for the PDC build of Longhorn:
http://69.50.228.116/Chris123NT/PDC_4051/LHGuide.html

Thanks to Bill Evjen.

PDC | Longhorn
11/4/2003 4:44:31 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


Yet another real-life sample of the HierarGrid

Nigel Parham sent me a snapshot of his application that uses the HierarGrid to display nested tables. It looks like he also implemented editing, deleting, filtering, sorting and paging - really amazing!

Thanks Nigel for letting me publish this.

HierarGrid
11/4/2003 3:03:45 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


German .NET Community Conference

For the German .NET Community:
Just noticed the announcement of the .NET Community Conference in Karlsruhe in Alex's blog. It's free and covers an exclusive preview of ASP.NET 2.0. Patrick A. Lorenz, the writer of ASP.NET 2.0 Revealed is speaking.

UPDATE: Unfortunately, the conference is cancelled but a replacement is planned.

Technology
11/4/2003 2:20:38 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


PDC bits supported by ASP.NET Version Switcher

I was asked if the ASP.NET Version Switcher works with the bits from the PDC (Whidbey Alpha and Longhorn).

Actually, I've tested it with

  • IIS 5.0 (Win2k)
  • IIS 5.1 (WinXP)
  • IIS 6.0 (WS2003)
  • IIS 7.0 (Longhorn)

and Framework 1.0, 1.1 and 1.2.30703.*. It should all work. If you notice any problems please let me know.

Download

PDC | Version Switcher
11/4/2003 12:05:08 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, November 03, 2003
Content from the PDC

There are numerous sites with content of the PDC:

Videos:

Session Slides:

And of course:

PDC
11/3/2003 6:17:36 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


Updated: Microsoft Developer Tools Roadmap 2004-2005

An updated version of the Developer Tools Roadmap can be found here:
http://msdn.microsoft.com/vstudio/productinfo/roadmap.aspx

Technology
11/3/2003 6:02:27 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Wednesday, October 29, 2003
INFO: WinInet Limits Connections Per Server

Always searching for this, each time I setup a new machine:
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B183110

Windows
10/29/2003 2:46:03 AM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, October 21, 2003
New ASP.NET Version Switcher 1.1

I've released a new version of the ASP.NET Version Switcher which contains the following minor changes:

V1.1.0.0 (published 2003-10-17)

  • Bugfix: initial display of Framework version was wrong
  • Bugfix: VRoots with space in the name caused an exception (thanks to David Hartman)
  • Bugfix: if only one scriptmap existed on any VRoot an exception occurred (Tom Connors)

You can download it here.

Version Switcher
10/21/2003 9:55:00 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Friday, October 17, 2003
New HierarGrid version 1.5

The new HierarGrid version 1.5 contains the following features and bugfixes:

  • Feature: nested HierarGrids now possibly with more than 3 levels (thanks to Matt Petteys)
  • Bugfix: RowExpanded[x] = false was ignored
  • Bugfix: excluded RowExpanded property from Designer's Property view
  • Bugfix: changed Namespace for internal DynamicControlsPlaceholder to avoid conflicts when using both HierarGrid and DCP in one solution (thanks to Matt Bornstein)

Download here.

HierarGrid
10/17/2003 2:39:39 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, October 14, 2003
Visual Studio .NET Framework Bootstrapper Plug-in

Setup projects in Visual Studio .NET 2003 can be used to install the .NET Framework with your application, but only if you have installed the optional Visual Studio .NET Framework Bootstrapper Plug-in on your development computer. The Visual Studio .NET Framework Bootstrapper Plug-in modifies the behavior of the Setup project's Bootstrapper property to include the .NET Framework bootstrapper as well as the Windows Installer bootstrapper. The .NET Framework redistributable is then packaged with your application; when the user runs the bootstrapper setup.exe, it checks for the correct version of the .NET Framework at install time and if necessary, installs it before installing your application.

Thanks to Duncan Mackenzie for the link.

.NET Framework
10/14/2003 3:43:04 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Thursday, October 09, 2003
Make Adobe Acrobat 6 Load Faster

Here's how to do it:

  1. Go to C:\Program Files\Adobe\Acrobat 6.0\Reader (replace the C if you installed on another drive, like I did).
  2. Create a new folder called plug_ins_disabled.
  3. Move all files from the plug_ins folder to the plug_ins_disabled folder except EWH32.api, printme.api, and search.api. There should only be these 3 files in the plug_ins folder.
  4. You're done.
- Darrell Norton [via Vasanth Dharmaraj]

Found here. Thanks Robert!

Software
10/9/2003 11:55:24 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Saturday, September 27, 2003
Out for vacation

I am out on vacation for the next 10 days. We'll be travelling to Tenerife South and I am leaving me notebook at home. But if you notice a geek lying at the beach reading some 100 pages about a new operating system code-named "Longhorn", that's me! ;)

86° F/30° C, we are coming...

Private
9/27/2003 7:48:15 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


nGallery v1.0 Released!

That sounds pretty cool though I haven't tried it out (from Jason Alexander):

nGallery v1.0 Released!

Visit the nGallery site at http://www.ngallery.org to download!

nGallery is a FREEWARE, OPEN SOURCE implementation of a image gallery written purely in managed .NET and C#.

nGallery provides a solution to store and display your image galleries on your own Web site, as well as providing means for customizing and extending nGallery to your own personal likings.

ASP.NET
9/27/2003 3:03:07 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Wednesday, September 24, 2003
New DynamicControlsPlaceholder version 1.1 and a VB.NET sample application

Due to the "issue" Ben and I have found with the CheckBoxList I've created a new version of the DynamicControlPlaceholder that excludes the CheckBoxList's child controls from being persisted.

Furthermore I've translated the simple DynamicControlPlaceholder demo application to VB.NET.

You can find all the files here.

P.S.: In case you don't know about the DCP: It is a placeholder control which you can add controls to using Placeholder.Controls.Add(myControl) and they are automatically recreated after a postback.

DynamicCtrlPlh
9/24/2003 6:17:05 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [1] 


Why the CheckBoxList always has one child control

Today Ben Feist emailed me pointing out a problem with the DynamicControlsPlaceholder (DCP) and the CheckBoxList (CBL). He always receives a "Multiple controls with the same ID" exception when putting a CBL onto the placeholder.

So I took a look at the implementation of the CheckBoxList and noticed that like the DropDownList and the RadioButtonList (RBL) it is derived from ListControl which contains a ListItemCollection. This collection implements IStateManager and is saved in ViewState. So no need for the DCP to save the single ListItems. Why does it work with the RBL but not with the CBL?

Examining the RBL I noticed that when it comes to the render phase for each ListItem a RadioButton instance is created and written to the output TextWriter directly (see RBL.RenderItem for reference). So the ListItems/RadioButtons are never contained in the Controls collection which is used by the DCP. No problem for the DCP!

However the CBL works a bit differently: In the constructor a CheckBox control is created, added to the child collection (!) and stored in the internal member controlToRepeat. In the render phase for each ListItem the controlToRepeat is modified to reflect the text and checked state and then written to the output stream.

That's the problem for the DCP. At the end of the first request, it loops over the Controls collection noticing the CheckBox and persisting it. After the postback, the CBL constructor creates a new CheckBox again and then the DCP recreation algorithm restores the "same" CheckBox (ID="0" is hardcoded). This causes the duplicate control ID exception.

I wondered why the CBL constructor creates this special CheckBox and to find out I created a MyCheckBoxList with a "this.Controls.Clear()" constructor ;) That solved the duplicate ID problem. 

However, Ben pointed out that the MyCheckBoxList does not pick up the SelectedIndex and a quick look at LoadPostData and the HTML source revealed that the NamingContainer was incorrect.

To make a long story short, the CheckBox is added to the child collection so that the NamingContainer of the parent CBL is automatically prefixed to the ListItem index ("[CBLID]_0"). The RBL achieves the same thing manually in the RenderItem method (button1.ID = string.Concat(this.ClientID, "_", repeatIndex.ToString());)

Elegant but not very intuitive - I would expect to find either all ListItems in the control collection or none at all. So, if you ever wondered why the CBL always has exactly one child control no matter how many ListItems there are in your Items collection, you know now.

ASP.NET
9/24/2003 6:07:43 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Tuesday, September 23, 2003
Another real life sample of the HierarGrid

I've received a snapshot that shows the HierarGrid in action integrated into a Support request application. Looks pretty cool and complex ;)

Thanks to Daniel Rush for sending me this.

HierarGrid
9/23/2003 7:36:23 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


Microsoft's web strategy and Sun's take on Linux

I stumbled over two interesting articles about Microsoft's web strategy. The first one on linux universe headlined "How Netscape beat Microsoft". The bottom line (of the first half) is that while MS defeated Netscape in the browser war it couldn't stop webapps taking over classical Windows client apps.
The second article "Why Microsoft's All About the Web" considers Microsoft's position slightly different but also points out: "Even so, the Internet remains a great threat to Microsoft [...]. Most of what I do could be done on a much simpler computer; no Windows required."

I'm pretty much looking forward to the PDC to learn how MS is going to regain momentum for windows apps with technologies like "ClickOnce" (no-touch deployment) and "Avalon". Thanks to Scoble for the links.

Another interesting competitive article containing an interview with Jonathan Schwartz, Sun's executive vice president for software can be found here. Thanks to Don.

Technology
9/23/2003 2:21:56 PM (W. Europe Standard Time, UTC+01:00)  #  Comments [0] 


 Monday, September 22, 2003
Article: Creating Custom Columns for the ASP.NET Datagrid

In case you haven't already noticed Marcie's article on custom DataGridColumns. It's worth taking a look at not only if you want to understand how the HierarGrid works. There, I created the so-called HierarColumn that acts as the container for the child templates and is filled during the ItemDataBound event.

Good job, Marcie!

ASP.NET
9/22/2003 3:09:53 PM (W. Europe Standard Time, UTC+01:00)  #