Fog Creek Software
Discussion Board

Leaky abstractions and the ASP.NET LinkButton 1.1

I now work for a client which haven't upgraded to the .Net Framework 1.1 for good reasons. The 1.1 has an HTML/Javascript rendering bug which causes the LinkButton in certain web forms not to work.

And the "funny" part is that in Netscape it still works. The bug is only visible in Internet Explorer and is caused by the combination on how the form tag is named and how the script is generated.

I can't understand why they changed the script generator. It did work. And when they do, how on earth did this bug escape qa?

Thomas Eyde
Wednesday, August 27, 2003

What's this have to do with leaky abstractions?  And can you elaborate a little bit on the bug?  Is it reproduceable?  (I'm using the linkbutton control now in 1.1 and haven't had any problems (so far))

Wednesday, August 27, 2003

It is leaky because the LinkButton isn't a button. Clicking it won't trigger the form's onSubmit event.

I have downgraded my .Net installation so I can't give excact data, but the bug is located in the __doPostback(). The 1.1 version checks for browser type, if it is IE then it uses the formname as the property to execute the submit() on, like:

    theForm = document.formname;

but if the formname has a colon in it, as it does if the form tag is located in a control in a control, then it fails with a javascript error:

    theForm = document.formname:_ctl0

A webform can have only one form tag, so why not just submit the first form in the forms collection?

Thomas Eyde
Wednesday, August 27, 2003

"A webform can have only one form tag, so why not just submit the first form in the forms collection?"

This isn't true. Although the GUI drag-and-drool tools give you a single server-side form into which you paint your canvas, this is a tool limitations rather than a technical one.

Also, it's a misnomer to call installing 1.1 an 'upgrade', since 1.0 and 1.1 can live side by side.

Brad Wilson (
Wednesday, August 27, 2003

You mean its some kind of better behaved sibling?

Will there be 1.01 versions divergent from 1.1? 

I think not.

Simon Lucy
Thursday, August 28, 2003

*  Recent Topics

*  Fog Creek Home