Attention: We are retiring the ASP.NET Community Blogs. Learn more >

Tales from the Evil Empire

Bertrand Le Roy's blog

  • How to output HTML at the end of a WebForm from code?

    With all this client-side activity that's going on lately, there's one particular need I've seen arise repeatedly. It is often useful to output contents at the end of a page (or at the end of the form, at least). The reasons why you would want to render contents not in the current position in the stream of the rendering page but at the end are diverse. One reason could be that you want only one instance of that contents on the page no matter how many controls require it. Another could be that you want controls to be able to add to a big chunk of data that you want to output in one piece at the end (that's a need we had in Atlas).

  • How to put a DIV over a SELECT in IE6?

    Everybody who tried to implement an HTML menu knows it: in Internet Explorer 6, there are some elements like SELECT that always appear in front of all other elements no matter what z-index you apply to them. Other elements that present the same problem are ActiveX controls (including Flash movies), OBJECT tags, plug-ins and iFrames. That's because these elements are implemented as windows whereas other elements are just drawn on the existing background window.

  • Finished Jade Empire

    Wow, what a great game! I just finished Jade Empire in "evil mode". I'm very likely to do it again in "boy scout" mode. The immersion and richness of the universe are just amazing. The only thing I disliked is the tendancy Bioware has to explain to us that the evil path is somewhat as honorable as the virtuous one. I enjoy playing an evil character (I know the subtle difference between game and reality as almost every other gamer on the planet), but don't try to tell me that he's not evil. Some of the things they make you do in this mode are actually quite disturbing. I'm still waiting for the (good) game that will let you play a Dr. Evil-like character: evil, but in a funny way. Yes, Dungeon Keeper did that in a way, but that was a long time ago.

  • Atlas project announced

    Scott Guthrie announced the Atlas project in a recent blog post. The Atlas project aims at considerably simplifying and enriching the client script development experience. It includes but is not limited to AJAX/callbacks and cross-browser client-side declarative binding of elements and behaviors. One of our goals is to leverage the experience of client-side programming that exists inside Microsoft (see Outlook Web Access, MSN Spaces, MSN Virtual Earth, etc.) and give easy access to that technology to developers.

  • Fun with callbacks Part 4: what about postback events?

    One thing that's certainly not that clear enough about callbacks is what happens with regular postback events and control state. During a callback, we reconstruct the state of the page as it was during the last postback. The reason we are doing this is that we want the logic in the callback method to be able to access the rest of the page with controls in the right state.

  • Die, marker! Die!

    Did you ever notice how people can't ever throw a marker away? How many times have you seen this scene?

  • Fun with callbacks Part 3: Strongly-typed callbacks

    I got a lot of feedback after the first two posts in this series pointing out the need for a more strongly-typed communication than just strings. Several comments also pointed me to the great AJAX.NET library. I like the AJAX.NET approach because it looks very much like Web Service proxying. It's a real accomplishment as it succeeds in reproducing a reasonable part of the .NET type system in JavaScript. On the downside, it's really oriented at client-side script writing, and it suffers from the same drawbacks as Web Service proxying, namely that it gives the illusion of a local object whereas a service-oriented approach should be taken, trying to mutualize the communications with the server as much as possible. At least, the asynchronousness of callbacks makes it more obvious that you're dealing with networked resources.