Tales from the Evil Empire

Bertrand Le Roy's blog

News


Bertrand Le Roy


Add to Technorati Favorites Tales from the Evil Empire - Blogged

Blogs I read

My other stuff

Posted: by

Comments

Tom said:

Thanks Alister and Betrand for this nice thread :).

Well lets me give you my point on this.

I think that most of the arguments presented here are a bit "off road", if I take the SQLDatasource comment, yes its bad to use sql statements inside a page but how many ASP.NET 1.0 books today are already presenting their samples with this bad technic ? ... Let's face the truth ... How many hobbysts or even developpers know or care about ntier, MVC etc ... architectures anyway ...

The real problem does not lies in the tools but how people use them ... I agree .... There is a lot new stuff in Whidbey some on which I am also very sceptical about like the code beside model for example or mixing again code & design on the same page even if its hidden by the IDE ... But still these are just new tools to add to your bag during your development road and you must only choose the right one at the right time.

One of the hardest part now is the richness of the framework which is getting so big that its becoming diffcult to have a big picture or to choose the right tools at the right time until you've gone through almost everything, which (can) takes some (lot) time. But I doubt that it was an easy path when you learned ASP.NET 1.0 for the first time also. New features / products take always some time to get through before you see and get all the benefits, but it seems to take more and more time for each release.

People, in particulary hobbyst, have a strange image of computing. The image of being an easy path that do not require any effort to do something and that everything will come together like magic. It's not and very far from being the case. Do I sit down in a car and drive down the highway without having my driving licence first ? Not until we invented a fully automated car that drive me where I want to go ... Everything needs time to learn ... Yes some things can be easier to learn than others but cluttering down features wont help, lets take a simple example there are tons of vb programmers who struggle learning the object model of .net. Should we go back to quick & dirty model of vb instead ? I don't think so ... So what's the solution ?

Microsoft is trying to address the needs of two kind of totally different people working on totally different projects with totally different technical backgrounds ... The hobbyst and the enterprise developpers ...

Two kind of people for one framework, that must be a big headache for them ... The only "exit" I see could come from two totally different IDE's. Visual Studio has become a great IDE, but it's just too much and too expensive for any hobbyst who wants to use it. So the weak point here is clearly webmatrix, don't get me wrong ... Its nice, its free but I believe it's not matching what hobbyst are waiting for, an easy , cheap and very visual tool with a low learning curve, with many default and easy to modify templates / tools and no code at all. Whidbey has all the inner working to do such a tool .. So where is it ?

Communication is also a huge problem, there are so many different features in products today targeting so many different people that it's almost impossible to communicate correctly. For whidbey in a sense there is too much communication about a product that won't ship till next year. For people who are interested like me in what's comming next its great to see where it goes but that might too much for others ... As a developper I percieve the whidey communication as if MS is already, in a way, cluttering down .net to attract hobbyst and promotes bad design which is exactly the opposite feeling of Alister's one ... Its not my opinion but its just how I perceive the MS communcation at first without hands on the product ...

About PHP ... Is it really because it's so easy to use and to understand that most people use it ? Probably there is some "marketing" truth about this statement but let's look closer, Apache has almost 70% of the hosting market ... That might be another good reason why it's so "popular" ... MS needs to work on an "hobbyst" targeted IDE but if they really want to hit their hobbyst target they will need to increase their web market shares among hosters ... If IIS had 70% of the market share I am quite sure that this, great btw, thread would never have existed.

Anyway many thanks to Alister for startic this interesting topic ...
# June 16, 2004 7:13 PM

Bertrand Le Roy said:

Thanks for the comments, Tom. Right to the point, as always.
Your points on a hobbyist IDE are well taken... You're absolutely right. WebMatrix was a good start, and we must not stop there. Especially with Eclipse on the "other side".
About PHP, you're absolutely right too, and to make ASP.NET as popular in the hobbyist market, we have to increase the number of cheap to free hosters. We also have to make it easy to host from home. We're working on that too.
# June 16, 2004 7:13 PM

Jeff said:

So where is it?
# June 17, 2004 12:21 AM

Bertrand Le Roy said:

Click on the title...
# June 17, 2004 1:10 PM

SomeNewKid said:

This thread has been reproduced in its entirety on Paschal's weblog:
http://weblogs.asp.net/pleloup/articles/155954.aspx

I wasn't too keen on the word "debate" but, other than that, the reproduction was introduced with a complimentary preface.

Thanks again, Bertrand, for the time you invested in answering the concerns I raised.
# June 18, 2004 12:13 AM

TrackBack said:

TheServerSide.NET
# June 18, 2004 7:33 PM

TrackBack said:

# June 23, 2004 3:56 AM

Erebuss said:

C'est pas drole si les VBistes ont notre using maintenant aussi ;)
Bon, bonne nouvelle, je connais un nouveau mot clé de Vb.net 2005 alors :D

/GP
# July 6, 2004 2:23 PM

Jerry Pisk said:

No it doesn't. The rule is "no business logic belongs to the view (an ASPX page in ASP.NET)", not "no code belongs to the view". There can be code in the view, but not business logic code (or anything else business logic). Database connections are business logic, not views, and as such they do not belong to the view, even if you wrap them so you don't actually have to put any code there.

But you're right in one point - ASP.NET is not layered. An ASPX page is all three layers in one, it's the controller, the business logic and the view. No separation there at all, no matter how much you and Microsoft keep repeating that there is.
# July 12, 2004 4:23 PM

masqued vengor said:

Hey Bertrand, move on blogs.dng ;-)
# July 12, 2004 5:40 PM

Bertrand Le Roy said:

Jerry, you just don't get it.
Data sources are NOT business logic.
No matter how you write your applications, your presentation layer will always have to communicate with the other layers. Data sources are just a declarative way of communicating with other layers.
Yes, there can be code in the view, but there should not be code in a declarative surface such as the CodeFront. But you're right in pointing out that it's not a matter of code or no code.
Data sources are NOT database connections, they are a way for the presentation layer to communicate with other layers.
The Page Controller is not business logic either. The only code you should have in there is the code that orchestrates the UI elements and the code that establishes the communication with the other layers.
My whole point is the the communication code has always been in the page (it has to be, there has to be a way for the data to get into the Template View), it just moved from procedural to declarative.

ASP.NET does NOT contain the business layer unless you want it to be there, and we all know this is not good architecture.
But many many people are doing multilayered architecture with ASP.NET and your statement is just a troll.
As many people, you're thinking in J2EE terms. It is not because ASP.NET adopts a different angle that it's wrong. And surprise, JSF adopts almost the same architecture. Why would that be??
# July 12, 2004 5:55 PM

TrackBack said:

# July 12, 2004 6:01 PM

SomeNewKid said:

From my extended mail conversation with you, Bertrand, I took away two concepts that I feel underscore ASP.NET's strength and beauty.

The first is the concept of the Page as an application surface, not a UI surface. It is a powerful concept, and I had already added it as an epilogue to Paschal's archive of our conversation:
http://weblogs.asp.net/pleloup/archive/2004/06/18/159085.aspx

The second is the concept of CodeFront and CodeBehind representing two sides of the same coin ... declarative and procedural programming respectively. The more logic we can represent declaratively, the more powerful and graceful ASP.NET becomes.

Now to see the Page as an application surface, one that does not invalidate n-tier development, requires that developers view their app from a different perspective.

Current literature always shows an application from a "side on" view. Here, we see a data store at the bottom, above that a data layer, above that a business layer, and above that the UI layer. Business and UI processes may represent additional layers.

To best understand the ASP.NET Page, we must swing our view from "side on" to "above". Having done so, we can understand the Page as a topographic map of the entire application. That "pool" of data on our map may be a shallow pool (perhaps drawing directly from an XML file), or it may be a deep pool (with data having risen from a different physical tier, through a data layer and business layer). This analogy illustrates the power of the SqlDataSource and ObjectDataSource respectively. Looking from "above" the application, they may look similar, but their depth is completely different.

Before I took this new "from above" perspective, I found Whidbey troubling. Now, having taken this new perspective, I find Whidbey beautiful. It may be a strange superlative to apply to a development environment, but I truly find ASP.NET's declarative model to be a thing of beauty. Powerful, graceful, beautiful.
# July 12, 2004 6:46 PM

Bertrand Le Roy said:

Thank you so much for this comment, Alister, I really appreciate. So, when are you getting a blog?
# July 12, 2004 6:50 PM

Kevin Dente said:

The data source stuff is very cool, and I'm looking forward to being able to take advantage of it. But why do data source controls appear on the visual portion of the page when they don't generate any visual representation? It sems like the component tray was originally intended to hold non-visual design elements, but ASP.NET never really took advantage of it the way WinForms did.
# July 12, 2004 11:30 PM

Bertrand Le Roy said:

Kevin: I personally am uneasy with the way non-visual elements like DataAdapters used to appear in this component tray whereas it's not part of the markup (ie, the declarative part of the page). Why DataAdapters and not any public property of the page, then? Of course, the answer is that only Components appear there, but for most users, it is not clear what a Component is, so it seems quite arbitrary.
Now, data source controls are part of the markup, so they appear on the design surface like any other control. If you see the design surface as the visual representation of the markup, there is no reason why it should behave any differently than other controls.
Another reason is that it is perfectly possible for example to put a data source control in a DataList template to do hierarchical binding. Of course, doing that with a SqlDataSource would most of the time give catastrophic performance, but doing it with an object data source could make perfect sense. Don't get me wrong, there are better ways to do that, but it is still a reasonable scenario and one that we're allowing. Well, in this case, the data source couldn't be in the component tray because its data container is important in this context, it's not directly under Page, and it is repeated.
ASP.NET is closer in its spirit to Avalon than to Windows Forms anyway (which is not a surprise when you know the people behind Avalon...)
# July 13, 2004 2:45 AM

TrackBack said:

See also http://techno-weenie.net/blog/code/95/net-20-datasource-controls
# July 13, 2004 1:53 PM

Kevin Dente said:

Bertrand: The way I see it, there's actually two separate issues here: 1) does the control persist as markup on the page, and 2) is the control displayed on the visual design surface, along with "visual" controls.

Personally, I think that the notion of a separate area where non-visual elements are displayed (even if they actually "live" as markup on the page) is a useful one. Putting them on the visual design surface strikes me as potentially confusing. Where should they go? Does it matter where they live on a page? Where do you shove them so they don't interfere with your visual layout (especially in a flow layout, where they occupy space in the flow and change the layout of the page)? Fortunately, I see that Whidbey has an option to hide non-Visual controls - but of course then it's not obvious that they exist at all, and if you unhide them, it reflows your page.

I do see your point about the data-source-in-a-template case, although it seems like there could be another solution. I'll have to think about that one... ;)

Side question - how does one flag a control as non-visual in Whidbey?

# July 13, 2004 4:27 PM

Bertrand Le Roy said:

Kevin: It doesn't matter where you put a data source on a page as long as you don't need it inside some container, so I'd put them at the end of the page so that they don't disturb the rest of the visual layout.
To make a control non-visual, just mark it with the [NonVisualControl] attribute...
# July 13, 2004 5:55 PM

Kevin Dente said:

Bertrand: Yes, I realize that. My point was that rendering the non-visual controls inline in the page forces the page designer to be aware of and accomodate those issues. Personally, I would rather just see the non-visual controls down in the tray. But that's just my opinion.

Thanks for the NonVisualControl pointer.
# July 13, 2004 6:30 PM

Laurent Kempé said:

I have to say that I second Kevin. Having the non visual controls in the flow is really annoying.
# July 22, 2004 6:40 PM

Bertrand Le Roy said:

This kind of choice is not made whimsically. It relies on usability studies, which means that while some may find it annoying, most people like it better this way.
As you have an easily discoverable designer option to make non-visual controls appear and disappear at will, I don't think there's much more we can do...
# July 22, 2004 6:44 PM

TrackBack said:

Sami Jaber's contribution to the dabate (french)
# July 23, 2004 9:34 PM

Mike Kozlowski said:

That Oracle article was one of the lamest, most preposterous pieces of cheerleading I've seen since Dave Massy said that he was afraid to use non-IE browsers for security reasons.

I mean, c'mon, PHP? Back in 1996, when I was writing CGI apps in Perl, I would've turned up my nose at PHP. It's a horrid little hack of a platform that nobody in their right mind would ever want to use -- it's as if somebody saw ASP (a horrid little hack in its own right) and made a cheap rip-off without even bothering to develop a proper language in which to embed their page-template stuff. At least when Sun ripped off ASP with the original JSP spec, they had the decency to graft it on top of fundamentally sound technologies.

But not only is PHP bad in comparison to other antiquated techniques, it doesn't even bear comparison with modern development methods. JSP 2.0 with JSTL (and possibly JSF, which I haven't had a chance to really try) is amazingly better than old, hackish JSP. ASP.NET is incredibly advanced over old, hackish ASP. PHP 5 is... a slightly better lousy hack than it used to be. Um, yay.

# July 23, 2004 9:42 PM

Andrew Storrs said:

I know many former PHP programmers (myself included)...

"former"... Nuff said. :)
# July 24, 2004 2:27 AM

Muntedhar "Pzycoman" Alhakim said:

That article is just plain silly.

It lists ASP.NET as Slow, as opposed to PHP which is fast.

I did this tests a long time ago (about a year, maybe more) - http://www.pzycoman.myby.co.uk/lspeed.html

Even with a precompiling doohicky (Zend Accelerator) (Which kind of makes the tests unfair, as there arnt many ASP.NET accelerators), its still as slow as a 3 legged rocking horse.

In the same time (roughly) it took PHP to do 8 million calculations, ASP.NET did 1.6 Billion.

Enough said :)
# July 24, 2004 2:47 AM

Matt said:

That's a very basic test, and I hope the results aren't due to compiler optimisations. The compiler should be able to get rid of the comparison entirely!
I prefer ASP.NET myself, but that test is as bad as Oracle's info.
# July 24, 2004 3:39 AM

Jouni Heikniemi said:

Bleroy: Many good comments, too bad some of them got a bit too biased and personal - they're just eating the credibility of your writings.

There's one point I'd like to comment on: "Open-source opportunity. Sure, if that's important to you. If accountability is more important, then I guess that's a different story." I don't think there's much Microsoft can defend itself with against that claim. For most products, I can't really say MS has been very responsible and accountable. The lack on open information flow and the relatively slow speed of fixing bugs and providing patches is certainly a factor when considering whose products to deploy.

Many open source groups manage to provide much more reliable and useful customer support than Microsoft has traditionally been able to offer. This especially has been true for many of the Internet applications. Add in the possibility to do (no matter how unsupported) custom hacks, and there certainly has been an air of flexibility around LAMP platforms when compared to the stagnation of ASP.

That said, Microsoft has taken significant leaps with ASP.NET, the new developer community (not to ignore this blogging business) and now with Whidbey's relatively open bug tracking. Even though the direction is right, you'll need years more to convince people to trust on Microsoft's accountability. One of the greater things working for you is the developer community that now has sufficient role and publicity to actually make things work. Some people will be very dubious, but time is a good healer.
# July 24, 2004 4:19 AM

TrackBack said:

# July 24, 2004 4:28 AM

Bysza said:

Oracle article sucks...

Since I can't say more than all my predecessors already said, I may pinpoint this: section "Database Coding Examples", "ASP.NET Connecting to Oracle" is... wrong.
It's not ASP.NET connecting to Oracle, but a *console application* connecting to oracle and printing two column contents to the console... :D
# July 24, 2004 8:55 AM

TrackBack said:

ASP.NET vs PHP - Counterclaim to Oracle's FUD
# July 24, 2004 8:58 AM

Bertrand Le Roy said:

Jouni: I won't pretend I'm not biased. I work for Microsoft. I just hope that I'm less biased than the Oracle article author.
But what I mean by accountability (at least for ASP.NET as that's my team) is that if you have any trouble with our software, you know exactly who to turn to, and you can be sure that support or direct contact with one of us through mail, newsgroups or the ASP.NET forums will very quickly find a solution.
I know that when I was a Microsoft customer, every time I had to use the support, I got commitment and I got a solution.
I also know that the last time there was a widespread virus/worm for Windows, there was a company-wide effort from many non-support employees to provide free support to the general public to help get rid of the vermin.
We still have some progress to make, in particular for community support, but I think we're getting there fast, as you seem to have noticed.
# July 24, 2004 10:04 AM

Larry Osterman said:

It's off topic, but, I've got to ask: Bertrand, how did you get real links to show up in your comments section? Every time I've tried to do that, the HTML gets quoted...
# July 24, 2004 12:18 PM

TrackBack said:

Well, I don't agree that PHP is any simpler for beginners, especially with Whidbey. Our usability studies show quite a different situation. It certainly looks more familiar to people who have done some classic ASP or JSP development, but a complete beginner will start faster with VS.NET + ASP.NET than with PHP...
# July 24, 2004 2:36 PM

Jouni Heikniemi said:

All right Bertrand,

Since you almost asked for it ;-), I'll use this opportunity to ask you for an answer to one of my news group postings quite some time ago. Any chance you could tell me what's going on in the following:

http://groups.google.fi/groups?selm=Xns949197CADD5E4jouninews2heikniemin%40194.100.2.89

Unanswered mysteries are the things that make me yearn for a totally open bug reporting system. Let's see if this one actually becomes a non-mystery :-)
# July 25, 2004 1:11 AM

Bertrand Le Roy said:

Jouni: First check this: http://support.microsoft.com/default.aspx?scid=kb;en-us;833268. I don't think this is your problem, though, but it's worth checking.
Your problem is probably a conflict that happens when you hit the second control. Naming conflicts can appear as all pages and controls are automatically compiled into the same _ASP or ASP namespace. In Whidbey, this problem was solved, but in the meantime, the recommended fix is to specify the ClassName explicitly in the @Control directive so that even though the file name is the same, the controls will have different class names.
# July 25, 2004 3:00 PM

Jouni Heikniemi said:

Yep, that much I figured and we've been using ClassName already. It's a bit problematic at times, but it does fix the immediate problem. Looking forward to Whidbey, then. Thanks for confirming my thoughts on the issue. Another score for Microsoft's developer support - keep it up :-)
# July 25, 2004 3:49 PM

DevNull said:


PHP runs on almost every platform ASP.NET does not.
PHP runs on over 60% of the webserver today ASP.NET does not.
PHP is free/open ASP.NET is maintained by one company.

the above things a for me way more important that if its takes 5 or 7 seconds to get a result. ASP.NET may be faster but i guess its a lot more restrictbie and un-flexiable than PHP.

# July 26, 2004 6:43 AM

Toast said:

Personally, I prefer PHP as I'm not restricted to any platform. I've got Apache, PHP and MySQL running on MS and OSX and Linux and for the hobbyist developers without a corporate budget or enough cash around, going for a LAMP setup is a lot more realistic.

Another thing I like about PHP is the extensions that can be got for it. From different databases to graphical libraries to PDF generation to SWF generation, there's a lot that can be done and even though PHP mightn't be as english-like in its syntax, once it's practised, it's no problem to read and write.

That's my two cents anyway.
# July 26, 2004 7:12 AM

Richard Moore said:

The file open example is still wrong in your corrected version - it ignores the possibility that the file exists but is not readable by the user the script is running as. A better solution would be to try to open the file and either handle the resulting exception or rethrow it.
# July 26, 2004 8:14 AM

TrackBack said:

I read this in the comments to a reply to the PHP vs ASP.NET crap Oracle posted. Mike Kozlowski wrote: That Oracle article was one of the lamest, most preposterous pieces of cheerleading I've seen since Dave Massy said that...
# July 26, 2004 9:04 AM

Caruccio said:

"Memory that's not used is useless."

today, 1GB RAM is not enough for a web server... if all your process become memory-eaters, your server will get down soon... at this point, I think ASP.NET fails (like almost Microsoft solution).
# July 26, 2004 10:25 AM

abc said:

hey,

why all think that ASP.NET runs only on MS Windows?
look at http://www.mono-project.com/about/index.html


some fixes for:
1. PHP runs on almost every platform ASP.NET does not.
2. PHP runs on over 60% of the webserver today ASP.NET does not.
3. PHP is free/open ASP.NET is maintained by one company.

solutions:
1. use mono
2. apache + ASP.NET mono module
3. 1, 2 -> ASP.NET is !!!NOT!!! maintained by one company.

# July 26, 2004 10:32 AM

Shike Maffer said:

abc's comments mirror mine...if multiple OS's is the acid test in the argument, why not consider mono?

There is nothing in PHP that you couldn't do in traditional ASP. With ASP.NET, Microsoft addressed many things and turned it into a real web development architecture. If you don't like it because it's Microsoft, that's fine. But as Bertrand points out in his response, the real agenda here is Oracle. You remember Oracle, the company that is in bed with Java? So why pimp PHP? Simple, because Oracle dependence is OK, Microsoft dependence is not. Dead on Bertrand, dead on. Oracle has been whining about Microsoft's dominance for years...they aren't arguing against market dominance/reliance...they're arguing about it not being to their benefit. Oracle and Sun (to throw them in here too..) have always shown that when they are the vendor that you must rely on, that they are as ruthless, gouging and uncaring as they claim Microsoft is.

And lastly the chart in the article is lame, but I've figured out the scale: $$ is better than $$$, but worse than $. So there you have it.

Shaffer
# July 26, 2004 10:53 AM

dick tang said:

>Then, let's look for vulnerabilities: choose Microsoft / IIS / 6.0. >Results:
>1 (One!) x-site scripting vulnerability in a web administration >tool that's not even installed by default
>And three for ASP.NET

>OK, let's do the same for Apache 2. Results:
>25 (Twenty-five!) vulnerabilities, including DOS and Buffer >Overflows
>Wow, that's a lot! Let's look for PHP 4 now... Results:
>19 (Nineteen!) vulnerabilities, including integer overflows, >arbitrary file disclosures, cross-site scripting, etc.

that's not fair,how long did apache and php releaese?
I agree that IIS 6 is securer than before,but you should not list
ps. 25 vulnerabilities is not usually affect all of the platform
# July 26, 2004 11:01 AM

General Protection Fault said:

For Shike Maffer:
"There is nothing in PHP that you couldn't do in traditional ASP. "

That's B.S. In old-school ASP, to rotate an image, you had to buy a third-party COM library like LEADTools. PHP handles this natively with the image* functions. Likewise, for creating PDFs, PHP has built-in support but ASP does not. Add all those COM libraries on your TCO!
# July 26, 2004 11:06 AM

Oscar Leeper said:

So if following the link off VA Systems owned propaganda mouthpiece Slashdot wasn't enough of a clue, I just watched the page load on the Oracle article:

1)Click on link
2)Oracle banner appears at top of page

And there I sit thinking to myself, "Yup, another piece of Oracle FUD. This should be funny."

Thanks Bertrant, for putting into words what every *level-headed adult* programmer was thinking upon reading the article(or the banner at the top of the article).
# July 26, 2004 11:38 AM

Yeehaw said:

"the author tries to convince us that PHP and ASP.NET fall into the same category of web platforms that '[embed] code into HTML pages with special tags that signal to a preprocessor that they contain code, and that it should do something with it'. This is true of PHP, but not of ASP.NET, where the code can, but should not be in the HTML markup."

Code and HTML should be separated (most of the time) in both languages, and it's just as possible to do this in PHP as in ASP.NET. I stopped reading your rant seriously at this point, because it showed that you are at least as dishonest as the Oracle writer.

I also love how you defend that ASP.NET is tied to IIS by defending the *security* of IIS. That's really rich. I stopped reading altogether at that point. Your are obviously on the far-away planet Microsoft at this point.

A bunch of developers are building large, fast, powerful, scalable programs quickly and maintainably using completely free and open tools. They don't need you, and ASP.NET would have to be *far* superior to warrant marrying your company and shelling out a bunch of cash. But I'm sure you'll find a way to shrug this off and still be 'right'.
# July 26, 2004 11:56 AM

Jason Lotito said:

some fixes for:
1. PHP runs on almost every platform ASP.NET does not.
2. PHP runs on over 60% of the webserver today ASP.NET does not.
3. PHP is free/open ASP.NET is maintained by one company.

solutions:
1. use mono
2. apache + ASP.NET mono module
3. 1, 2 -> ASP.NET is !!!NOT!!! maintained by one company.

Unless I am mistaken, ASP.NET is NOT covered by any open standards, therefore making it's legal standing unsure. Indeed, from the MONO page:

"The controversial elements are the ASP.NET, ADO.NET and Windows.Forms subsets. Those are convenient for people who need full compatibility with the Windows platform, but are not required for the open source Mono platform, nor integration with today's Mono's rich support of Linux.
...
The Mono strategy for dealing with these technologies is as follows: (1) work around the patent by using a different implementation technique that retains the API, but changes the mechanism; if that is not possible, we would (2) remove the pieces of code that were covered by those patents, and also (3) find prior art that would render the patent useless."

So in reality, a business decision to use ASP.NET means a business decision to run on Windows.

As far as scaling and all that fun stuff, I just have to point to Yahoo!.

I don't necessarily agree with the Oracle article; after all, it's Oracle trying to make non-Microsoft products sound better.

And finally, as far as the "benchmark test" is concerned: Yes, I too can make PHP code slower than ASP code if I choose to do certain things that any professional PHP coder would know not to do. In posting a benchmark, make sure your code is correct.
# July 26, 2004 12:00 PM

kmcafee said:

I just wanted to say that I work in a development house where there are 3 programmers in one division doing PHP web development, and 5 programmers in my team doing ASP.NET web application (sold to customers to provide business functionality, not hosting web sites) devleopment. We are very happy with the ASP.NET development experience for our needs. But PHP is also working out well for the other teams needs.

And the one MS point I totally and completely disagree with is the Accountability issue. Microsoft has 0 accountability, period. They have never stood up and taken responsibility for a problem, and they have never provided solutions at the same speed as any other business organization I have done business with. There are numerous bugs in Visual Studio 2003, and a handfull we found in the .NET library itself - all of which we discovered in our first 6 months of working with the technology, and reported to our MS Partner contact. Nothing has or will be done about any of them, period. Until they are fixed in whichever future release Microsoft feels like fixing them in.

How bout this one, use "devenv" to build a solution, and then open the solution with devenv visually (visual studio), and you cannot open ANY of the visual designers, you must "touch" these files first, or delete your web cache and or object files.

And if a SQL Server or .NET update ever looses my customers data, Microsoft will not offer me one bit of accountability, nor money to make reparations - they are as accountable to me as my congressman - which is to say, not at all.
# July 26, 2004 2:29 PM

Luis Alberto said:

I work for a small company. We have two servers running, one for ASP.NET (Win2003 and so) devel and the other is a LAMP machine (Debian Woody). Both servers work just fine, have almost the same hardware and run many apps, apart from devel ones.

The win2k+3 machine is maintained by an outsourcing company, that is an official partner of MS (cannot say names, we still work with them and I know that MS boys are going to throw shit on them) and, among other things, did Exchange, firewall and A/V thingies. It was a busy server, running also file and printing jobs for the whole domain on wich we operate, and a powerful one (like the other one): 2xXeon 2 GHz, 1 GB of RAM, some scsi raid storing.

I know that all that tasks are excessive for such a server, having in mind that we do ASP on it. So we purchased another server, a clone of this (they're IBM beasts) and installed Linux Debian on it, to use it as a PHP devel platform. As we work with Exchange, we moved the routing, firewalling, A/V and antispam to the debian machine, so the win server didn't have to maintain the load our internet use demand. This solution worked beautifully, but it was not sufficient. File and printing serving is a heavy task on our office, so we moved to Samba and Cups with excellent results. We noticed also that we could move the two scanners and share them with SANE on the debian machine.

Now, we can develop comfortably on the windows machine but look at this:
-Win2003 services:
-Exchange (~1000 processed emails per day), managing connections only from the debian machine.
-ASP.NET (two simultaneous users testing code, an occasional customer trying its work in progress web).
-DAT nightly backup, so it does not interfere with our normal ASP work). We are going to move this service to the debian server on september, as soon as I end trying a new backup system on an old PC running also debian.
-Domain controller, 16 users and 19 computers.

-Debian:
-Spamassassin + ClamAV + Postfix (as gateway for exchange, processing ~2000 emails a day, half of them are SPAM or virii from the outside and do not pass to Exchange).
-Apache 1.3.x, PHP 4.1.x, Turck MMCache
-MySQL 3.x
-Samba, 9 users doing some heavy tasks as editing large graphics files directly from the server. Four PHP developers, although their disk usage would be like 0.001% of the total being the rest used by designers.
-CUPS, serving a parallel kyocera laser printer and two USB hp deskjet printers.
-SANE, serving one HP flat scanner and a nikon diapo scanner (both USB).

Cannot give you any numbers, since these are production servers and cannot run any tests on them. But I can assure you that we are very surprised with the perfomance of the linux server, but also with the lack of perfomance of the windows server. The Linux server is bigger, so the comparison is not clear (2xXeon 2.2 GHz, the memory is also a bit faster but they have the same amount), but it runs many services on it and it's very secure. Usualy we have Exchange and IIS fighting for RAM, so the system gets very swappy, and I cannot imagine why IIS wants so many memory... it's not our app, we make some finetunning on it from time to time, and before doing anything we make some diagnostics on it, including the measuring of its memory footprint, which usually is what we expect (ok, we have some memory leaks from time to time which are resolved when detected).

I am really curious on a real benchmark, not MS/Oracle FUD or some user doing silly tests. First, because curiosity, and on a more professional side I want to know if the behaviour of the windows server is normal. An mostly idle webserver and a not very busy mail exchanger is not what I would expect to get a good server on its knees.

Anyway, we are moving all services to debian (converting the windows server) slowly, the current debian server is beggining to have too much responsibilities and I want to be able to transfer quickly and efficiently tasks from one server to another in case of hardware failure.
# July 26, 2004 3:51 PM

Bertrand Le Roy said:

DevNull: ASP.NET being maintained by one company is seen by some companies as an advantage in terms of consistency and accountability. If for you, "openness" is more important than anything else, sure, go ahead and use PHP, or... Mono.
As for "i guess its a lot more restrictbie and un-flexiable than PHP", well, guess again, this is just a gratuitous affirmation that would need a little more argumentation...

Toast: do some research. Here's what I could find in two minutes:
http://sourceforge.net/projects/nfop/ one of the open-source PDF libraries for .NET
http://sourceforge.net/projects/ming-sharp/ a .NET wrapper around the Ming SWF library.
And of course, as I was saying in the article, image creation libraries are built-in the .NET class library, as well as database access, etc. The main difference with PHP being that it's consistent, well-organized and object-oriented.

Richard: I'm well aware that other error treatment is necessary in the code you will substitute for "#work with the file". The problem here with the original code was that it throws and catches untyped exceptions, and it throws unecessarily, which is very bad practice.
Another problem that I did not underline in the article is that existing PHP libraries having been written before the support for exceptions appeared in PHP5, chances are that these libraries will not throw exceptions anytime soon and you will have to use different techniques for error treatment whether you use older or newer libraries. More inconsistency...

Nofool: you'll need a little more argumentation than that not to be taken for a common troll.

"Doesn't matter", whatever your name is: you're so clever, but you could also have read the article where I make it very clear that I work for Microsoft.

Caruccio: ASP.NET only takes the /proportion/ of memory that you configure in machine.config. It does not "eat up" memory, it uses what you configure there. There's nothing shocking there: the machine is supposed to be a web server, right? So the web process takes /available/ memory and uses it. So what?
1GB is more than enough, I've run dozens of web sites on 512MB machines without a glitch. Did you see the price of memory chips by the way?
The bottom line is does your web site run smoothly or not? The proportion of memory the web process uses is just irrelevant as long as it does not get in the way of other necessary processes.

Dick: you're right, I should perhaps have compared on the same time frame instead of just on the last version of each product. But you can do so yourself and you will see that it doesn't change much: over the time IIS6 has been on the market, there have been many more security issues with LAMP than with IIS+ASP.NET.

GPF: I did not quote the facts page as "proof", and if you have a better study of TCO for Windows and Linux, let me know.
As for your answer to Shaffer, well, I was personnally not talking about classic ASP. Actually, even I, despite all my pro-MS bias and my general dislike of the PHP syntax, would probably choose PHP over classic ASP. But fortunately, classic ASP has been replaced by ASP.NET. So this is just irrelevant to the current discussion.

Yeehaw: yes, it is perfectly possible to write more or less clean code in PHP (or classic ASP). I've written such code myself. But you really have to get out of your way to do so: linear models such as PHP promote spaghetti intertwined HTML and code, whereas ASP.NET promotes a clean separation from the start as the default model.
I'm glad you continued to read the article despite the fact that you stopped reading it (?!).
You know, your comment about IIS security is just disarming. You're accepting the common preconceived idea that IIS is unsecure despite all evidence to the contrary even when faced with this evidence. All you have to do is follow a single link or do your own research, but I guess you don't want to do even that simple thing because that would endanger your whole system of belief that MS is inherently bad.
And I guess that no, we don't live on the same planet.
Sure, many companies build great and clean things with open-source tools, I've never said or written anything that would indicate otherwise. I sincerely think that ASP.NET IS far superior to PHP, though, and I'm willing to show how.
Who said that you had to "marry" MS, though? Not me, just you. And what "bunch of cash" are you talking about?
You guys are way too irrational and should think more about productivity, maintainability, interoperability, you name it, stuff that really matters, not whether or not the producer of this or that technology is ideologically acceptable.

Jason: I never said that PHP could not scale. You're right in saying that Yahoo did this successfully. ASP.NET scales out of the box. The gratuitous affirmations to the contrary in the Oracle paper would have to be backed by some kind of study. Saying something does not make it true. Proving it does.
I agree that the "benchmark" Pzykoman posted in his comment do not mean much. I'm still waiting for a serious, real-world application based performance study.

Kmcafee: I'm very surprised by what you're saying about support. The experience I've had with them before I joined MS is completely different. Did you go through support for these? How did they close the events? Won't fix??
What are these "numerous bugs"? Were they aknowledged as real bugs?
The repro for the bug you cite is incomplete: I've been doing this kind of very simple manipulation every day for years and never encoutered or heard about having to touch the file. What did support say about this one?
About SQL or ".NET update" (what's that?), /did it/ lose some of your customers data?

Luis: you should contact support: I think there may have been some memory issues with the interaction of Exchange and ASP.NET. It should work, though, even though it's generally not a good idea to put both on the same servers (I can hear the zealots already. Well, in my former company, we had Linux machines and we did not put mail servers and web servers on the same machines on Linux either)
# July 26, 2004 4:20 PM

TrackBack said:

The article on ActiveWin
# July 26, 2004 4:22 PM

TrackBack said:

This promises to bring more comments than I can reasonably handle. Oh well!
# July 26, 2004 4:26 PM

Bruce said:

Nice article, rebutting a laughable original. However I couldn't help noticing that every mention of ASP.NET etc points to the relevant Microsoft sites, but you didn't put a similar link even on the first mention of PHP or Oracle. A nit that spoilt my impression of the article!
# July 26, 2004 4:53 PM

Oscar Leeper said:

Bruce:

Take a look at the comment you just posted. Did you add links to Microsoft and ASP.NET? I sure didn't add them to mine.
# July 26, 2004 5:45 PM

Bertrand Le Roy said:

Bruce: the ASP.NET and Microsoft links are automatically added by the .text engine. I could add the same kind of automatic links for PHP and Oracle, but then I would also have to do it for every other company out there I may mention the name of. I won't as the blog's focus is ASP.NET...
But here are the addresses of PHP and Oracle anyway:
PHP: http://www.php.net/
Oracle: http://www.oracle.com/
# July 26, 2004 5:52 PM

Jason Lotito said:

Bertrand: My comment regarding scalability was in response to another comment I read on here (I believe). As a PHP programmer, obviously my opinions should be taken with a grain of salt.

However, what I have found is that professional PHP programmers are more than willing to admire .NET for it's strengths. ASP.NET unforunately has the tradition of ASP via VB (which, frankly, sucked). ASP.NET is an improvement, and there are efforts in the PHP Community to take what we find nice about ASP.NET and implement it for PHP.

For example, the "Widge Control" functionality of ASP.NET has been done in PHP with different libraries. WACT is a fine example of this. On a side note: PHP has a fine history of taking what is nice in other languages and using it. PHP's support for external libraries is amazing (and frankly, that's it's purpose, to be a glue language). Anyways, off topic...

As far as Oracle's paper: Yeah, for those that know better, it's Oracle's way of biting at MS's ASP.NET. ASP.NET and PHP are competing technologies despite the underlying architecture, as is Java and C#. So if you are Oracle, and you want to diss ASP.NET, which technology are you going to talk up, will it be Java or PHP?

PHP, of course!

Frankly, articles like these serve the readers little, as you have to question the reason for putting out an article like this. Granted, MS's own ASP v.s. PHP article wasn't any better, but any developer worth his salt could see that a mile away.

Frankly, I am happy and successful with what I do, and as long as ASP.NET continues to move forward, it will only force us PHP guys to make sure we compete. Competition is good, after all. It will only make PHP and ASP.NET better in the long haul.
# July 26, 2004 6:36 PM

Bertrand Le Roy said:

Jason: Thanks for the message. Yes, competition is good, and the PHP market shares are a strong motivation for us. I'll have a look at WACT, which I don't know.
# July 26, 2004 6:40 PM

Another matthew said:

Hi from OSNews.com :)

"[embeding code in html] This is true of PHP, but not of ASP.NET, where the code can, but /should/ not be in the HTML markup"

In practice, this means that ASP.NET has a built in templating language whereas PHP doesn't -- and that's all. It's not about which of the many abstraction and templating layers in both languages are best -- an XML/XSLT approach or an OO controls model for example -- it's just defaults. ASP.NET's default templating language has code at the top as a reference to the code behind (and you can't have two of these, I think) so one could argue the binding in ASP.NET is similar too. Similar, unless you choose otherwise and use a templating language that outputs your markup. The supposed mixing of code and content exists in both languages.

The biggest mark against ASP.NET is that it's not cross-platform (Mono doesn't count yet ;), and that for any web standards nazi the HTML it produces favours MSIE over others.

Sure, you can choose controls that produce good html, but ASP.NET doesn't by default ;)

Good response though. I generally agree with you, but just because the Oracle guy isn't a good programmer doesn't mean a thing to PHP itself.

Thanks!
# July 26, 2004 7:10 PM

Bertrand Le Roy said:

Other Matt: It's not just templating. What about the rich page lifecycle? What about events? What about WebControls?
By the way, ASP.NET 2.0 will produce standard XHTML out-of-the box by default.
# July 26, 2004 7:14 PM

TrackBack said:

Nexen reprend la news d'OsNews
# July 26, 2004 7:57 PM

TrackBack said:

Some commentaries on Channel9
# July 26, 2004 8:00 PM

Another matthew said:

"It's not just templating. What about the rich page lifecycle? What about events? What about WebControls?"

Bertrand Le Roy: I've been writing C#/ASP.NET for 2 years now, but I'm coming to prefer a hybrid ASP.NET/placeholder/XML/XSLT approach to page generation. The page lifecycle is... well, it's actually got in my way a lot of the time. It's useful for application start and stop, and I guess it's breaks up the code into their order.

I would have loved for ASP.NET to have a placeholder control that maintains state for it's added controls. There's a 3rd party control that does this, but last time I checked (6 months ago) it was buggy as hell.

As I was kinda hinting, my main complaint with ASP.NET is that it's an abstraction away from http, html, and the vagaries of web browser bugs. The problem is that the browser bugs exist, so you can either ignore them (ASP.NET style) or deal with the underlying tech. When you've got two search forms on a page ASP.NET puts them as a single form tag, so pressing enter submits both. There are hacks that use javascript to hit the right button based on which field you're in but it's a workaround, and it doesn't degrade gracefully for older browsers. I develop government websites so there are requirements around this kind of thing -- we can't rely on Javascript. JoelOnSoftware called this a leaky abstraction or something like that -- when it'd be nice to tell programmers that you can deal with onClick and onChange events on a per field/button basis, but that the nature of the web means otherwise.

PHP has a library called PHP Web Controls (a ripoff of ASP.NET's model).

ASP.NET is pretty good, but I prefer the XML/XSLT approach and capturing the actual form elements as POST/GET rather than an abstraction. Now that I've got my abstraction library (a week to write) ontop of ASP.NET it doesn't take longer than the buggy event model.

XHTML in ASP.NET 2.0 will be great.
# July 26, 2004 11:42 PM

TrackBack said:

It's been a while since I have looked at any PHP so I am unable to offer any lucid commentary regarding the ASP.NET vs. PHP debate (originally sponsored by Oracle and Sean Hull) currently taking place on Bertrand Le Roy's blog ("Some co
# July 27, 2004 12:21 AM

TrackBack said:

iamwill » Oracle’s comparison of PHP and ASP.NET; The comments keep rolling in.
# July 27, 2004 2:44 AM

Warren said:

The author is wrong with his outdated knowledge of PHP.

PHP is still the better tool. It's more flexiable and has more functions.

The author is wrong to assume that PHP ALSO is best used seperated from the HTML, it has a include_once (as well as an include) function, which is usually used to bring in the PHP library code.

PHP is also more portable and follows a C++ style (less typing) format, not some beginners style of basic that ASP follows. every time I use ASP I have to drop my intelligence to MS level.

I too have used both ASP and PHP, on windows and Linux. Overall PHP is better by far!

# July 27, 2004 9:00 AM

Bertrand Le Roy said:

Another Matt: It's true that you need to know the page lifecycle to do things in the right order, otherwise it can get in the way. But when you come to think about it, that's what makes all the magic stuff in ASP.NET possible (automatic state management, events, etc.). I think we've simplified the writing of ASP.NET pages in Whidbey a lot, even though the lifecycle is now even richer.
I assume you mean to maintain the state of dynamically added controls. The WebParts and their zones do that in Whidbey, but a more general purpose control could be interesting. I'll look into it.
We've also made things better in v2 for multiple form problems. You can now have default buttons, and have a button post to a different page, while retaining the strongly typed experience of ASP.NET.
I think the web is getting more mature now, and ASP.NET, especially with the new Adapter infrastructure, is the only web platform that is able to automatically adapt to the peculiarities and bugs of each browser or device. After all, hardware abstraction has been working pretty well in OSs, so why would browser abstraction and HTML abstraction be a bad idea? It certainly works in ASP.NET. There are some cases where you can feel that using the old Request.Form may be easier, but that can be a slippery slope, and you may end up rewriting a part of the framework where you could probably have done the same while maintaining the ASP.NET model intact. I don't know about your special case, it would have to be looked into in details. I know that I've made this mistake in the very beginning of ASP.NET (classic ASP methods were hard to loose) and discovered later that my problem had a much simpler and cleaner solution.
But you know, we shouldn't impose our own idea of how you should develop, and I'm very glad that you found your own method and that it works for you. I even think that PHP is what works for some people just because they like this style of free-form, I control exactly everything, style of programming. I even know some people who love to develop in assembly language (I used to be one of them).
So we have to allow for different styles.
By the way, can you be a little more explicit about the "buggy event model"? What's buggy about it? If you found bugs, I'd like to know about them so that we can correct them. By the way, we opened this site to submit bugs and suggestions for Whidbey:
http://lab.msdn.microsoft.com/productfeedback/

Mattia, Warren, etc.: if you have nothing more constructive to say than "your article suckz, php rulez, MS suckz", please go away.

In particular, Warren, it's amusing that you should tell me my knowledge of PHP is outdated as you yourself are talking about classic ASP, not ASP.NET. Come on, PHP follows a C++ style?? Are you kidding me? A Perl style, ok, but not C++. C# follows a C++ style (C#, you know, one of the languages you can CHOOSE in ASP.NET)
And separation through include_once? Wow, take a look at ASP.NET's Register directive. It's just light years ahead.

Bob: of course, you dropped the main part of the citation, which was that individual cases should not be taken for generalities. I'm only talking about verifiable things, you guys are talking about purely emotional things. I also said that we still had a lot of work to do, but of course, you didn't want to hear that, you only hear what conforts your system of beliefs.
Just compare the number of security issues in IIS 5 and IIS6 and see how much progress we've made in just a few years on this huge code base. We're doing the same kind of work on Windows itself, and this will give XP SP2 and Longhorn.

Anona: please do your homework before you post such preposterous nonsense. Open a web browser, go to Google, type "mac worm", click on the search button with your single-button mouse and click on the first thing that shows in the many answers:
http://securityresponse.symantec.com/avcenter/venc/data/mac.simpsons@mm.html
Oh, it's a worm, and it's for the Mac.
Of course, a worm for MacOS won't get very far as there are so few macs. Like a virus that would target people with Vayron eyes.
Why are there anti-viruses for the Mac by the way?
I also did a search on Apple Mac OSX Server on http://www.securityfocus.com/bid/vendor/ and there are just too many vulnerabilities for me to bother counting. Do the same search on Windows Server 2003: there are 2.
Of course I'm not denying that there have been a lot of problems, but like Bob, you don't want to listen to what I'm saying.
Get me right this time: I'm not denying. What I'm saying is that we've already made a lot of progress (see the numbers for yourself: the record speaks for itself indeed) and that we're still working.
You're saying that we haven't done "much" to solve security problems? How do you explain the numbers on security focus then?
Get real. Get the facts.
And go away.
# July 27, 2004 2:19 PM

TrackBack said:

# July 27, 2004 2:56 PM

Bertrand Le Roy said:

Dear trolls,

This is not your private chat room. This is my blog.
With your uninteresting, unoriginal rants, you're making this page heavier than it needs to be and wasting legitimate reader's bandwidth.

So here's what we're going to do. You're going to open your own blog, and rant all you want there. I'll even trackback to it if it's funny enough.

In the meantime, I'm moving all trollesque comments to this page from now on:
http://weblogs.asp.net/bleroy/articles/199077.aspx
# July 27, 2004 5:51 PM

Bysza said:

Anona: I understand you're a Mac power-user, right?
That is great. :)

How much did you pay for your Mac?
I'm not claiming to be a Mac expert, but I took a time to lookup a Mac like this:
Bundle Power Mac G5 2.0GHz DP 512 160 4x SuperDrive 56K NIC w 1GB Upgrade - lowest price: $2339.00 (without monitor)

Opposed to: Dell Dimension 8400
Pentium® 4 Processor 530 with HT Technology (3GHz, 800 FSB)
Microsoft® Windows® XP Home Edition
512MB Dual Channel DDR2 SDRAM at 400MHz (2x256M) at $989.00 (with monitor).
Correct me if I'm wrong, but AFIK these are at least comparable machines, right?
Unfortunately with uncomparable prices. :(

We have lots of PCs in our company (1000+) and several Macs. Well, I bothered to ask my collegues working on them about problem they had.
Mac is and was advertised as a problem-free computer, which is not entirely true.We had problems with several hardware items, including SCSI drives, scanners, etc.
MacOS has its faults, bugs and also security problems.
Every part is 2 or 3 times more expensive than PC hardware, but at least Mac box looks great. ;)

How many directly Internet connected Macs are there?
Do you have any idea?

First of all, during early stages of Internet era, say late 80' and early 90', how many network connected hosts there were?
Did everyone was thinking about security as much as today?
Look on TCP/IP. It has no security features and ability to easly spoof addresses is causing lots of problems. Same with SMTP, etc.
And of course the idea to build IE as an integral part of the OS... ;)

It is a big problem (or impossible ;) to upgrade every internet connected windows boxes to the newest os or at least install patches on each, especially when there are no features build in the older windows versions that could allow that.
And people are not keen on upgrading, since lots of them doesn't know what is going on with their machines.
They just want to play games, browse internet and read mail. That's where the biggest problem lays.

It is a challenge to change thousands of employees mindset and correct so huge codebase as MS has, especially when you think of the compatibility with vast amounts of applications already written for this platform.
I'm really satisfied with progress MS has done so far in terms of security out of the box and I'm looking forward to WinXP SP2.
But I'm not saying that it shouldn't be done earlier ;)

My point is:
If you are satisfied with your Mac - use it and be happy. :)
Security is a big concern for a few years now, and MS has invested in security a lot of efford and money.
Implicity and explicity admitting security is a major concern.

Please let go the holly war, and give peace a chance... :D
# July 27, 2004 6:57 PM

TrackBack said:

# July 27, 2004 8:51 PM

Another matthew said:

Bertrand, yes I was talking about maintaining the state of added controls. Steping back though, the only reason to add controls to a page and register events with addHandler() -- all that hassle -- is because that's the way the ASP.NET event/page lifecycle/OO model works. Other models wouldn't require this, so I think I'm being fair when I say that ASP.NET still has a way to go (it's good, but it could be a lot better).

Many platforms adapt to the device they're on, so I think it's overstating it to say that ASP.NET is unique in this regard (hundreds of CMSs do browser detection and produce different output based on this; whether it's a simple template change or by using high-level objects that adapt their HTML to the browser).

I agree that a high-level object model expressing abstracts like "treeview" and "tabs" that is then turned into device-specific html is the best -- that's a good approach, however ASP.NET turns asp:panels into div tags for IE and table tags for Moz! Their radiobuttonlists are produced with label tags surrounding the text and not the radio button, which would be better for Konq and NN4 (with no downside). The abstraction that ASP.NET provides is used to produce HTML that works better in IE. This is just talking about defaults again, but it's a little annoying to have to write repeater controls to get the appropriate HTML. Even required fields (as in, the required field validator in ASP.NET) is poorly implemented in non-IE browsers, and it allows non-IE browsers to bypass this step.

I assume you've read the JoelOnSoftware article about leaky abstractions -- my point is that ASP.NET is a leaky abstraction. HTML and HTTP don't have the concept of required form fields, and they don't have a way of distinguishing between hitting enter in a form and which button is affected (if any). ASP.NET and many platforms build ontop of HTML higher concepts such as treeviews and tabs and buttons -- they build abstraction, but if abstraction is done poorly it can be confusing to programmers.

Now, I don't want to end this post on such high concepts, because they tend to blur the different possible approaches within each concept. ASP.NET could have done required form fields transparently for all browsers but it didn't. This isn't a general statement saying that abstractions mean losing control (because of course it means that) but the abstraction must be well done or else it leaks, and ASP.NET (and others) leak.
Thanks :)
# July 27, 2004 10:26 PM

Julien Ellie said:

Haha :) Bertrand you're crazy to have taken down this ridicule article from Oracle and you're now fighting hordes of troll. Luckilly there're still a few interesting comments in there from people who have a little respect for people trying to do their job.
# July 28, 2004 3:08 AM

Bertrand Le Roy said:

A.Matt: I don't really understand what you're saying about dynamic controls. Actually, there are very few good reasons to add controls to a page dynamically, I'd need to know your precise use case to give any advice.
But I'd be curious to see how other models solve this problem. I don't know any other framework that do. But perhaps I didn't understand exactly what you were referring to.
I take your points on non-IE browsers, this is something we should do better, even though we always have a fallback. For example, validators are always enforced server-side (as they should be even for IE to prevent elementary forged posts), so you just get an additional postback on these browsers. But agreed, there is no good reason (except the limited time we have) to not implement client-side validators for DOM-compliant browsers.
On the other hand, there are some third party validators that solve this problem. After all, our job is not to give every possible control out of the box, but to provide a web development framework on which you can build your applications. We try to solve the most common scenarios out of the box, but we can't do everything at once. That's why there is a v2, and that's why there will be a v3. There's always room for improvement and your feedback is valuable.
And if I'm not mistaken, you don't have this issue with validators on PHP because there are no validators, so you actually have to build them from scratch.
I've read the JoelOnSoftware article, and his main point seems to be "the abstractions save us time working, but they don't save us time learning". Fair enough, but you still save time working. And granted, to do ASP.NET well, you probably need to learn a few things like the page lifecycle.
But one of the things he does not mention, though (or perhaps I missed it), is that the learning can be very progressive. I think ASP.NET is good for beginners because you don't have to learn HTML and the other underlying concepts first (like in PHP), you can start with the high-level concepts. In my own experience, it is very common with what Joel calls "leaky abstractions" to only have to learn the underlying complexity along the way (the later the better). For example, after all these years writing C# code intensively, I still know very little IL (and only because I was curious about it, not because I really nedded it).
Thanks for the feedback anyway, it's refreshing after all this reckless trolling.
# July 28, 2004 1:51 PM

PLeX said:

Thought this was quite funny...

Poll results from bottom of Oracle article:

Created :Wed Jul 28 15:56:29 PDT 2004 Please rate this document:
Excellent 1541 Votes 18.8%
Good 1085 Votes 13.2%
Average 292 Votes 3.6%
Below Average 2563 Votes 31.2%
Poor 2721 Votes 33.2%
Total: 8202 votes
# July 28, 2004 6:57 PM

TrackBack said:

Yexley
# July 28, 2004 8:58 PM

TrackBack said:

# July 30, 2004 1:23 PM

TrackBack said:

# August 4, 2004 2:45 AM

Siva Mateti said:

Why not use Server.Transfer instead of Response.Redirect especially if both pages are aspx? How can I avoid ThreadAbortException for Server.Transfer?
# August 4, 2004 9:22 AM

Bertrand Le Roy said:

Excellent question.
Server.Transfer will not get the right URL in the address line of the user's browser. If that's acceptable, you can use Transfer, and you save one client/server roundtrip.
Now, Transfer also has a Response.End (and hence a ThreadAbortException), but the code inside Transfer is really just two lines:
Execute(path, null, preserveForm);
Response.End();

So you see that to avoid the exception for Transfer, you should just use Execute instead.
Of course, if you do that, you still need to suppress the output from the first page because both pages will output to the same response (you don't need to do that with Redirect because you have two separate requests in this case, and thus two different responses, the first one being thrown away). This can be done by clearing the response before calling Execute or doing some funny stuff with the writer parameter of Execute. Many strange scenarios here ;)
# August 4, 2004 1:19 PM

TrackBack said:

# August 5, 2004 3:09 AM

Siva Mateti said:

# August 5, 2004 8:55 AM

TrackBack said:

# August 5, 2004 2:00 PM

Dimitri Glazkov said:

I am not sure that it has to be an ideal world for the clean separation to work. Indeed, the concept needs refinement, but the core of it is good, methinks. Imagine something like this: an adapter pattern with decoratorish tendencies applied to rendering of a control.

This way, a control only represents the data and manipulation with it. It does not emit any markup, but it does know how to retrieve, process, and update information.

Parallel to it is an adapter, which doesn't know how to do any of the above with the data, but it does know how to query control's properties and how to render it using markup.

Yes, this means that for each control there has to be an adapter, but it is a compromise that we ought to be willing to make in order to escape hard-coding HTML into control's functionality.

We are essentially continuing the Page Controller paradigm into the controls, rather than stopping at the level of the page.

As a possible implementation scenario, an adapter could simply spit out control's properties as XML and allow developers write XSLT to transform it into HTML.

You could also easily imagine an adaptive control, which attempts to render properties of any control -- this is not necessarily a production environment-type trick, but something that could be useful to render orphan controls -- those without a corresponding adapter.

This is why my third role is for advanced developers -- creating adapters would not be something that a designer would do. Following requirements of a designer, yes, but probably not a designer him/herself.
# August 5, 2004 5:00 PM

TrackBack said:

# August 5, 2004 5:13 PM

TrackBack said:

# August 5, 2004 5:13 PM

Bertrand Le Roy said:

I understand your points, but one of the places where the whole thing falls apart is performance. This is what I mean when I say it's an ideal world, something we should tend to, but that we should not place above everything else, despite having to solve the real-world problem in all its complexity.
Believe me, this approach where adapters are completely separated from the control has been considered, but unfortunately, adapters are expensive. As would be to have an additional XML/XSLT level.
The choice that was made is to make is as efficient as possible for the main scenario (which is HTML) and fall back to adapters only when we need to.
If you look at the present state of things, the rendering is already pretty much separated from the rest of the control: you output HTML only in Render.
Where I don't agree with you, even from an idealistic point of vue, is in your core analysis that controls should be some kind of local page controller only, leaving the rendering to some other entity. While I agree that there is a benefit in having ways to override this part of the control's behavior (as well as others), most controls are UI elements first, not data manipulating entities (exceptions are non-visual controls like DataSources and these do not render anything). The purpose of a control as I understand it is to transform some part of your data into markup AND to manage the interaction of the user back with this data (which is what XSLTs don't do).
So I think if your control does too much data manipulation, that's a sure sign that part of this code should be in a different layer and not in your control.
Don't forget also that a control's interaction with the user is dependant on the actual markup. It's a two-way thing.
So what would be left in a control if it doesn't do the rendering (and thus can't do some of the interaction either) and doesn't do stuff that belongs in other layers? Almost nothing, it's then just a structure. You've just added a useless abstraction, transferring all of the logic into the adapter.
# August 5, 2004 6:29 PM

Bertrand Le Roy said:

Brant, can you elaborate? Millions of developers successfully build UIs with HTML and ASP.NET or some other server platform. How are they "failing at some point"?
I agree that XAML solves many of the problems we have to face with HTML, but HTML is very far from being the dead-end you're talking about.
# August 5, 2004 9:20 PM

Dimitri Glazkov said:

Bertrand, I think your assertion that most controls are UI elements is correct and valid. There are a couple of "buts" though:

1. There is definitely a trend into making controls more than that -- look at the "login" control in Whidbey, for example. For all I can see, it's a little self-contained application.

2. Being a UI element doesn't mean that controls have to emit the actual markup. That is why I am advocating a layer of abstraction -- to provide capability to translate UI into whatever flavor of markup (even XAML, perhaps?) is required.

3. The mentioned above layer of abstraction has to work both ways -- in fact, it should be the purpose of translating results back and forth. The control doesn't need to worry about whether this was a POST request, a GET request, or an asynchronous WS callback of some sort. The control doesn't need to worry about how it would be rendered. All it has to do is to advertise to the rendering layer that it will take a one-line input of plain text titled "Login", a one-line masked input of plain text titled "Password", and a "Login" button. The control performs validation and reaction to the input. The rendering layer makes it look "pretty". I am simplifying, of course.

I realize that what I am proposing is veering off from the current concept of a Web control, but hey, that's what this communication thing is for -- thought generation :)

As far as performance is concerned, I understand your point. Balancing functionality and performance is a tough act. I do believe, however, that there are ways to minimize impact of an abstraction layer on overall application performance. You guys wrote a book on this stuff :)
# August 6, 2004 9:18 AM

Bertrand Le Roy said:

Brant:

HTML is much more than RTF because of two things: Javascript and the posting mechanism. Yes, its semantics are those of a document markup language (it comes from SGML after all), because the people who conceived it couldn't foresee the importance the web would have today. But it has been improved and is today something you just can't avoid.

Of course, Windows Forms, XUL and XAML (and others) are more suited to interactive applications than HTML is. And if you have a choice, most applications should be written using a smart client technology. But you rarely have this option, even though the deployment problems are more or less solved. So there is a strong need for technologies like ASP.NET and there will still be for some more time. Of course you won't develop Excel in ASP.NET, but you can and you have to develop applications such as Outlook Web Access, which is very close to the desktop application. If only because when I'm away from my office, I still need a way to consult my mail from any computer I may find. And the only reasonable way you can develop this kind of rich application for the web is by adding a level of abstraction like what ASP.NET provides with WebControls.

I wish we all lived in a world where you don't need to develop for HTML but can always use something richer, but this is not the world we're living in. It's great to develop better rich client technologies. I see you contributed to Mozilla and XUL, this is great, but don't fall into this trap: you don't have a universal answer that applies to everything (by the way, the subtitle of my blog is highly sarcastic: ASP.NET is no universal answer).

By the way, which ASP.NET Tree control are you talking about? There are many such controls. The one we're shipping with Whidbey (and the only one we're supporting) DOES support Gecko browsers. It even does out-of-band node population without posting the whole page thanks to the excellent implementation of XmlHttp that Gecko has.

I'm a little confused also when you talk about "pixel perfect" layout. In my mind, pixel-perfect is more needed in printable document formats such as PDF, but certainly not in applications. Accessibility constraints, for example, are one reason why your UI framework should be able to gracefully adapt to very big fonts. There goes pixel-perfect layout.
Actually, all recent UI frameworks allow for dynamic resizing and positioning of the elements according to some general and relative layout.
And of course, HTML has always allowed for this by default, which makes it notoriously unprintable, but highly adaptable.

Dimitri:
I think I agree with you on the whole principle, and I think we're trying to get there, but we have to integrate our own constraints (which are huge because of our enormous developer audience). We make tradeoffs every day, we have to.
But if you read this recent article: http://www.theserverside.net/articles/showarticle.tss?id=AssemblyVersioning you can probably spot a few hints about what transformations there will be in the structure of ASP.NET in v.Next.

About the login example, yes, there is some functionality in the control, but it's still just managing the interaction of the user with the underlying authentication layer. I see what you mean, though, and it's an interesting idea.
I think we're already addressing most of this concern, though.
For example, templating is one way you can take the relevant part of the rendering to the page (or user control).
Adapters are also another way you can do that.
Themes are also very powerful (though not many people realised how much).

The main thing is that the additional layer is completely optional. The default basic scenario stays performant because it does not have these additional layers. We're trying to make the optional scenarios performant too, but there's no way they can ever be as fast as the default behavior. And believe me, we spend a lot of time on the optimization of this stuff (adapters were tough for that matter).
# August 6, 2004 2:35 PM

Bertrand Le Roy said:

By the way, I love it when the comments become larger than the original message. It proves that the subject was well chosen :)
# August 6, 2004 2:36 PM

TrackBack said:

I'm a fan of Nikhil's blog and this one is a great post. Read it!
# August 7, 2004 1:45 AM

Bertrand Le Roy said:

From Nikhil's post: "A key problem with adapters is exposing internal state of the control to the adapter. It is possible to expose some state, but the moment an external developer decides to write a new adapter, it is likely they will find they need some piece of internal state information that has not been exposed to them. The adapter model essentially creates a parallel inheritance hierarchy, which doesn't work all that great for extensibility in the long run."
# August 9, 2004 3:31 PM

Eric said:

I have several business layer components I have created that I don't want in the flow design but would like to have in the tray where the SQL Connection object and others go. The only way I have been able to accomplish this is to inherit from System.ComponentModel.Component - BUT, being that I am not inheriting from System.Web.UI.WebControl all my state management, etc is gone. I need to inherit from System.Web.UI.WebControl but still have the control be put in the tray or not be visible. I tried "marking" the control with the [NonVisualControl] attribute but it just says "The type or namespace name 'NonVisualControl' could not be found (are you missing a using directive or an assembly reference?)
"

Any suggestions? In case anyone is wondering...the control manages the routing of documents for approval.

Here is the start of one of my control declarations:

[NonVisualControl, DefaultProperty("Department"), ToolboxData("<{0}:ApprovalFlow runat=server></{0}:ApprovalFlow>"),]

public class ApprovalFlow: System.Web.UI.WebControls.WebControl
# August 10, 2004 2:16 PM

Bertrand Le Roy said:

NonVisualControlAttribute is new in ASP.NET v2.
The tray is gone too in v2. In v1, the designer would mess a lot more with your code, and would represent on the design surface objects that are really declared in the codebehind (in the infamous "do not touch" sections).
In v2, the designer only changes what is in the declarative part of the page (that is the markup), leaving what's in the codebehind entirely your business.
So in v2, your code will still run, but I don't think you'll see your components on the design surface. Except if you make them non-visual controls and put them in the markup. They will still be in the design flow, but you can hide them using "hide non visual controls".
# August 10, 2004 2:33 PM

Greg Holmes said:

MS seems to have a problem with this "hey, we're hip, we're listening; we have blogs!" thing. The individual developers seem to have pretty thin skin ;)

If you have a blog, a real blog, then discussion is going to ensue. In public. Much of it rough and tumble. That's kind of the point of tech blogs.

# August 17, 2004 2:41 PM

Bertrand Le Roy said:

Greg: not at all, the troll comments are very public, and I did not delete a single message. You just have to follow the link if you really want to read all that nonsense.
I just think that the immense majority of readers has other things to do than read troll posts. The trolling on this article was drowning the few relevant comments, and making the page unnecessarily heavy. I just took the irrelevant comments out of the page, but did NOT delete them. So it's still public, and you can very well post your comments there.
# August 17, 2004 2:46 PM

Jeff said:

I cranked this out in old fashioned ASCII text last month:

http://weblogs.asp.net/jeff/archive/2004/07/04/172683.aspx
# August 17, 2004 3:47 PM

mike said:

Here's a link to an entry that describes the effect of ValidateRequest:

http://www.mikepope.com/blog/DisplayBlog.aspx?permalink=441
# August 18, 2004 10:10 PM

Jerry Pisk said:

Well, it would all be lot easier if Microsoft would stop bowing to beginners and actually encourage secure coding. For example, Struts' form input or message server tags HTML encode their output by default and you have to turn it off if you want to, while ASP.NET's input, literal and other tags do not provide HTML encoding at all. If you want it you have to add server side code to call Server.HtmlEncode().
# August 18, 2004 11:42 PM

shartzog said:

trackback
# August 19, 2004 12:14 AM

TrackBack said:

learn about injection attacks!
# August 19, 2004 12:49 AM

TrackBack said:

# August 19, 2004 1:07 AM

George V. Reilly said:

"Writing Secure Code" has a lot to say about all of this, and should be a must-read book for all developers.
# August 19, 2004 2:54 AM

Mike Griggs said:

Great article, thanks.
# August 19, 2004 6:21 AM

TrackBack said:

# August 19, 2004 6:43 AM

Kyle Heon said:

There is a way that you can pass a string of comma-seperated values (numeric in the case of "Rule #4: Use parametrized queries whenever possible."). I have been using a user-defined functions (SQL2000) that I found from www.sqlteam.com years ago.

It can now be found here:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsqlmag01/html/TreatYourself.asp

This is a very powerful function because it has allowed me to continue disabling read/write access the user and only granting execute rights to the stored procedures.
# August 19, 2004 7:21 AM

Brant Gurganus said:

I was at a job last year as an intern and I seemed to be the only one that cared about these things. My coworkers claimed that average joe user wouldn't do these things. I tried to argue that it isn't average joe user you need to worry about.

Besides the obvious means of input such as input controls, make sure URL parameters are cleaned as well as cookie data and hidden form fields. Average joe wouldn't change those things, but somebody with knowhow and malicious intent would. In the case of URL parameters, some browsers such as Mozilla allow you to create keyword-invoked bookmarks that replace the a '%s' in the bookmark URL with the text after the keyword when typed in the URL bar.
# August 19, 2004 9:18 AM

g said:

I tried to used the

Response.Redirect("~/default.aspx", false);

on a normal ASP page and get "Wrong number of arguments or invalid property assignment"

Is there a solution for the same problem in a non- .net environment?
# August 19, 2004 10:53 AM

John S. said:

Excellent write up.
# August 19, 2004 10:57 AM

Ron Buckton said:

I have some pointers for avoiding injection attacks in two common instances, 1) Passing arrays to SQL Server and 2) advanced search queries (e.g. avoiding WHERE clause concatenation) at:

http://blogs.chroniclesdesign.com/rbuckton/archive/2004/08/19/145.aspx
# August 19, 2004 11:48 AM

Bertrand Le Roy said:

Jerry, this is simply wrong. If you had just tried this: <asp:textbox runat=server Text="<script>alert('blah');</script>"/>, this is the rendered html you would have got: <input name="ctl00" type="text" value="&lt;script>alert('blah');&lt;/script>" />
We do not encode literal controls because they are... literal.
# August 19, 2004 2:03 PM

Bertrand Le Roy said:

g: This version of Redirect only exists in ASP.NET, not in classic ASP. There is no such thing as an exception in classic ASP, so you actually don't have this problem at all as far as I know, so no need to solve it ;) But I may be wrong. It's been such a long time since I've done any classic ASP at all.
# August 19, 2004 2:13 PM

TrackBack said:

# August 19, 2004 2:46 PM

TrackBack said:

# August 19, 2004 2:48 PM

TrackBack said:

blog.jasonnussbaum.com :: Flash, Programming, and Everything
# August 19, 2004 2:53 PM

TrackBack said:

Bertrand Le Roy has an excellent introduction to injection attacks. If you're doing web development and don't know what an injection attack is or how to prevent them, you have got to read this....
# August 19, 2004 6:24 PM

mike said:

Jerry Pisk, you seem to be contradicting yourself, if I understand correctly. On the one hand you say "stop bowing to beginners and encourage secure coding" and on the other hand you say "Struts ... encode their output." I interpret this to mean that Struts doesn't encourage secure coding either -- it's all just done automatically. (?) As Bertrand notes later, asp:textbox does encode, although the more secure option (on by default) is to reject potentially bad input in the first place. Precisely because so few people understand the need (or techniques) for encoding -- see other comments -- the default behavior of ASP.NET is to enforce security for you.

FWIW, auto encoding for controls like asp:label breaks the otherwise legitimate ability to included formatted markup as the Text property for that control. Ditto Literal, of course.
# August 19, 2004 10:26 PM

John D said:

Wow, some of us don't have the luxury of arguing all day long about an internet article. I will take whatever someone gives me in the way of business. I do PHP at work, I do ASP.NET at home, the new job I'm applying for *might* go to JSP, and I use Classic ASP for the Portland Access User's Group (www.PAUG.com). Am I going to convince someone to change? I doubt it. I'm a lowsy salesman. And I can't hold my own when it comes to was/wasnot rattatattat. What I got out of this whole blog (and it is a lot, mind you) was the need to go back and study typing so I too can type fast.
# August 20, 2004 12:58 PM

TrackBack said:

# August 20, 2004 11:10 PM

TrackBack said:

# August 22, 2004 1:17 PM

TrackBack said:

Matt Berther
# August 23, 2004 3:31 PM

JP.Boomtown | spIder said:

Thanks for the article!
# August 26, 2004 2:30 AM

Mike Griggs said:

C# starts to look more and more like C++/STL with every passing day...
# August 31, 2004 5:29 PM

Wesner Moise said:

For more concisely is to use the following iterator method

IEnumerable<T> FilteredEnumerable<T>(IEnumerable<T> en, Predicate<T> pred)
{
foreach(T t in en)
if ( pred(t) )
yield return t;
}

# August 31, 2004 5:36 PM

TrackBack said:

# September 1, 2004 1:35 AM

TrackBack said:

# September 1, 2004 1:36 AM

TrackBack said:

# September 1, 2004 2:52 AM

TrackBack said:

# September 1, 2004 2:54 AM

TrackBack said:

Great post about iterators.
# September 1, 2004 8:07 PM

Accessibility said:

I don't know if this will ever be read, but...

Bertrand, I don't think you, or anyone at Microsoft, for that matter, understands that HTML is just a structural markup, and does not - in fact, *MUST* not have ANYTHING to do with how the data is displayed.

In general, HTML must be written such that Netscape 1.0 (the one from 1994. or so) displays it properly, fully and completely, as well as IE6 (which should be dead) and Opera 7.x, Safari, something based on the Gecko engine, _plus_ Lynx and Links.

There are people who have disabled JavaScript. They can't do much on ASP.NET pages. There are also vision-impaired and blind people, and the story is the same because ASP.NET are mostly random tag soup, instead of a structured and valid HTML document...

The purpose of adapters should not be to fall-back functionally to older and different browsers, but to ENHANCE the *APPEARANCE* for newer ones.

There's no excuse AT ALL to do XMLHTTP requests to populate tree nodes in a tree control. None whatsoever! Someone who loads a page for offline use will get screwed by this, and will get screwed royally. The ONLY proper thing is to create a good old structure of nested unnumbered lists COMPLETELY and have JavaScript-enabled visual browsers take care of node expanding/collapsing.
# September 2, 2004 5:18 AM

Bertrand Le Roy said:

Dear anonymous strict guy,

Thank you for assuming everyone at Microsoft is an idiot. What you say is more or less true of HTML + CSS, which not all browsers understand, but absolutely false for pure HTML. Take the <b> tag, for example. Why is it in every version of HTML including XHTML? It's not structural, it just means bold text, which is pure form. And it's not as if you couldn't do a span with a class that has bold font-weight. So why is it still there? Just because there are the extremists who think everyone should work the way they have decided is the right way, and there are the pragmatic people who think some freedom is better than any dogma, however "perfect" it may be.

It is absolutely correct to assume that a web site should be browsable with Lynx and when Javascript is disabled, as well as by people with disabilities. You can build such pages with ASP.NET 1.1 (which does not mean that everyone does it, most people don't bother). Now, with ASP.NET 2.0, out of the box, you'll get XHTML compliant code and accessibility by default.
And when you build a web site, having ways to achieve everything without javascript does not mean you have to force this on everyone and not have quicker ways to achieve the same things when javascript is enabled.

The purpose of adapters is to adapt the markup for _marginal_ situations. The default behavior should go to the most common situations. This is so obvious I'm appalled by your statement.

Now about XMLHTTP. First, you seem to forget that the web is not just a collection of documents. There are applications out there, for which offline use is simply meaningless. By the way, offline browsing is a very very marginal thing and will become even more so.
Now, take a site like MSDN. Hundreds of thousands of articles. Would you really like the treeview to preload all the nodes so that you can browse it offline or with a text browser? This is completely unrealistic as your page would take forever to download. The right approach is of course to adapt to a link list that can take you to the next level and that enables you to navigate back up one level (à la Mac Finder as opposed to the Windows explorer tree).
And there are of course all kinds of applications that need treeviews that are filled as nodes are open. Posting back the whole page is a waste of bandwidth, that's why the XMLHTTP mechanism is there. By the way, this is not the default behavior of our TreeView.
Actually, this is quite funny as this is one of the features that gets the most positive feedback from the community.

You know, I also get feedback all the time from people who have decided there is one and only one way to write a web page. They will tell you for example that menus should only be written using CSS and no javascript. CSS menus are great technical achievements, but they can't be keyboard accessible, for example. Ours is.
Accessibility is an absolute requirement for ASP.NET 2.0 and you can rest assured that all of our controls will be accessible by default, including TreeView and Menu.
# September 2, 2004 2:09 PM

Robin Debreuil said:

Hey Bertrand,

Thanks for the 'way too kind' review. I must say that I wasn't able to accurately describe my feelings toward the whole exercise, but "impressively time consuming" is exactly perfect. In fact that is the one phrase that describes pretty much everything I've been passionate about in my life -- and I always thought these things were unrealted. That would certainly have to be the major text in any bioctal proficiency diploma. Oh, and it would make a hell of a blog sub title!

That is a great idea on the balanced ternary bioctal numbers, it really opens up a lot of possibilities. I've been experimenting with a system where bits are like charges (+/-). There are two digits, making four states +1, -1, 0 (neither), and an impossible set of both (which always destroys itself leaving 0). In certain ways Zero makes more sense not being a digit, at least it always seems a bit awkward the way its used now. With 'charges', negative and positive numbers are written the same, just they use different 'digits' (eg Int32 and Int64 represent negatives the same way, no confusion between -1 and 0xFFFF, etc..). Adding a positive to a negative can result in a 'mixed' number after the cancellations (a number with both +1 and -1 digits), but the normalizing is pleasantly simple. It also gives bool states of (something like) True (1), False (-1), NotTested (0), and Impossible(+-). Hmm, I can never describe these things in words, esp when having my end of day wine. I'm doing some animations I'll post...

Anyway, after reading your idea about ternary bioctal numbers, I've been trying tonight to get the above system into positive and negative larger numbers. It becomes pretty interesting, this really makes you ask a lot of totally basic questions about the nature of the numbers. Using two colors works for writing, but obviously there would need to be a logical way to represent positives vs negatives without color, and also zero and (+-)... What do you think would be a the right base for a system that goes naturally above and below zero (like ternary also does)? Would it be -8 to +8, or -16 to +16? I really like the symmetry of 4^4 (and 3^3 in ternary), just not sure if that should be half on each side of zero, or a full negative mirrored copy..

Anyway, I think that last glass of wine has rinsed out the day's caffeine, so time to sleep. Btw, your blog has been the first good and deep overview of Whidbey I've read -- looks like it really will be something else, cool even : ). Thanks for that too...

Salut,
Robin

PS Do you really think the solar system would be that much more boring without my anus? Creepy.
# September 4, 2004 6:02 AM

Bertrand Le Roy said:

Well, Robin, not my idea, it came from a comment on your blog. After that, it was just adding nevi and minus nevi.
Actually, I might give you a few hints that you may find useful or not, dating back from my thesis work, which was about graded algebras, with a focus on ternary algebras. Perhaps you know of Grassmann algebras, which are non-commutitive Z2-graded algebras, for example. Here, it looks like you're building a graded algebra but can't find the right grading group. See the sign as the grade, and the grading group is then Z2. Now, zero does not belong in the grading group, but in the algebra (otherwise, your grading group is no longer a group because it has no neutral element). What's the grade/sign of zero? You decide (the folks who designed the way signed integers are coded in binary decided it was positive).
Seems like you have some more useless thinking to do.
By the way, did you consider publishing your stuff in a scientific paper, something not too academic like Scientific American? It would be great fun to see this in a mainstream journal.

Do you realize that thanks to you, when you type "Microsoft butthole anus" in Google, chances are you'll end up on my blog? Thanks a lot, really.
# September 7, 2004 2:53 PM

Robin Debreuil said:

Hey Bertrand,

Thanks for the pointers to Grassmann algebras, that looks like totally fascinating stuff. Yes huge amounts of useless reading ahead, happy to say. Still it will pale in comparison to the massive amounts of time you must have consumed doing a thesis on the subject. I can only stand in awe.

I would love to publish something in a magazine like Scientific American, even a letter, but it's always seemed so out of reach. Recently though, I've become more hopeful... I'm not trying to brag here, but I've been offered pretty generous funding for my next article. It titled, "New Numeric Writing System Disproves Global Warming". Of course the required travel and research will soak up most of that, but it is still a small step towards the dream...

Btw, sounds like you could make some serious coin with google ads ; ).

Cheers,
Robin

PS - Completely unrelated, but with ASP.NET I've recently found a few servers I admin have backups of config files, called web.config.old or something. Being that these were generally artifacts left over from early testing, they sometimes contained unencrypted passwords, or db access stuff. The problem of course is they could be downloaded from the net. Obviously that is a user error, but maybe it would be a good idea to block files with the pattern ".config" (appearing anywhere) by default? Just a thought..

# September 8, 2004 2:14 AM

Bertrand Le Roy said:

Just try it. If you've got good material like your stuff, it's probably easier than it seems.

About the old config file, use the web.old.config name instead of web.config.old. That will take care of it as the .config extension is never served.

I'll think about the Google ads, thanks for the tip.
# September 8, 2004 1:27 PM

www.atomic9.net said:

It would be nice if a standards group (or Microsoft-based equivalent) created a standard regex library of whitelist/blacklist patterns to handle input. That would make a great first-layer of defense against SQL injection attacks.
# September 9, 2004 10:57 AM

Bertrand Le Roy said:

Not sure why you think this should be a standard, but you can find a lot of such regular expressions on sites such as regexplib.com.
The problem is that there would be about as many expressions as there are use cases. If you try to do something too universal, there is a serious risk to have too many false positives and to block legitimate data. The white list is often very context sensitive. I've showed an example on integer fields, which is one of the simplest cases, but it can get a lot more complicated than that.
The point is that to fight against SQL injections, the best you can do is always use parametrized queries. This way, you never even need white lists.
The cases where you can't use parametrized queries are very few.
# September 9, 2004 2:16 PM

mike said:

We still need the opposite, the late, lamented DataSetDataSource that turns XML data into relational data. :-( Bind a GridView to an XML file? No problem!
# September 11, 2004 5:36 PM

TrackBack said:

Bernard discusses a new Whidbey data source control that he's developed that allows you to use relational data hierarchically. This is pretty cool; it allows you to use the logically hierarchical structure of a relational database in hierarchical contr ...
# September 12, 2004 2:24 AM

Jack said:

Because it is usefull
# September 16, 2004 2:11 PM

Keith said:

Well said! Well said! I particularly HATE the F Lock key!
# September 16, 2004 2:11 PM

Kevin said:

WOW I am having the exact same problem with 'PrintScrn'

WHY MS WHY
# September 16, 2004 2:12 PM

Bertrand Le Roy said:

Jack: I'm really genuinely interested. What is the Num Lock key useful for?
# September 16, 2004 2:17 PM

Matt Hawley said:

I hate it too, but its useful for users who don't know the shortcut keys Ctrl + P is print.
# September 16, 2004 2:18 PM

Eric Newton said:

my issue is why doesnt Print Screen actually PRINT THE SCREEN...

I dont see a key on my keyboard that says COPY SCREEN TO CLIPBOARD SO YOU HAVE TO PASTE IN PAINT THEN YOU CAN PRINT SCREEN key...

I dont even think they could fit all that onto a half inch square key...

Die, F Lock!
# September 16, 2004 2:54 PM

Matthew W. Jackson said:

What's with the new delete key, too? Why can't you get a normal keyboard anymore?
# September 16, 2004 2:57 PM

Shane Courtrille said:

Death to the F key. My keyboard has this and I hate it with a passion. If it wasn't off by default I would hate it a little less but the hate would still be there... Anyone know of a good non-MS natural keyboard?
# September 16, 2004 3:05 PM

James said:

I strongly dislike the way that many keyboards do not have the same placement of important keys, such as the backslash, which can either be placed above or below the return key, or the delete and insert keys which can either be placed above the cursor keys or at the top-right-hand corner of the keyboard on many laptops... At least use the same general layout!

On laptops, the NumLock key is important because they don't have number pads, so it allows you to use certain keys on the main keyboard as a number pad... but because of the way many laptop keyboards are laid out, this is not always useful either.

James.
# September 16, 2004 3:16 PM

John Drake said:

Keys I have never seen any use for are the Scroll Lock key and the Pause / Break key.

Has anyone ever had anything useful happen by pressing those keys?

Anyhow, this is about the NumLock key. I use it. Most times it is turned off, because I tend to use the keypad for navigation. I will occaisonaly turn it on if I need to do extended number entry.

John
# September 16, 2004 3:19 PM

Bertrand Le Roy said:

James: of course it's useful on laptops, and should be kept on these devices, but on ordinary large keyboards that have a real numeric pad, it's totally useless. By the way, Num Lock on a laptop does not have the exact same meaning as the numeric pad is not separated and thus the keys it replaces are not the same.
In other words, Num Lock on desktop duplicates keys that we already have (and is off by default, although Windows now retains its state on reboots) whereas on laptops, it replaces other unique keys.
# September 16, 2004 3:20 PM

Bertrand Le Roy said:

John: I think this is really interesting. I'd like to understand why you use the numeric pad for navigation instead of the dedicated arrow keys just next to it?
# September 16, 2004 3:23 PM

Frans Bouma said:

The only key I really hated (that's past tense indeed) was the caps lock key. I used a keyboard remapper tool to map it to cntrl :) I'm not sure but perhaps you can remap numlock as well :)
# September 16, 2004 3:31 PM

petal said:

you think that's annoying? try working regularly with a keyboard that doesn't have a keypad (instead uses the mjkluio789 keys for 0123456789 respectively), and which supports multiple servers - switching between screens using a KVM switch can often leave you wondering why the hell your account is getting locked out when you *know* you've got the password right - all because the numlock status varies from server to server! I fail to see why this needs to happen when there is a perfectly serviceable numeric row at the top of the keyboard. Thank god for registry settings.
# September 16, 2004 3:32 PM

anonymous said:

Scroll Lock can be used in Excel. Try it and arrow around on the spreadsheet :)
# September 16, 2004 3:36 PM

Anonymous Coward said:

I use the numeric keypad for number entry and for navigation, frobbing NumLock as required.

I do this because I've been doing it for the last twenty years, because it works for me, and because I have better things to do with my time than retrain my brain to use this week's arrow-key-location fad.
# September 16, 2004 3:37 PM

Bertrand Le Roy said:

Anonymous coward: that kind of makes sense, but you must be really as pissed as I am about F Lock, then. And about the new layout of keyboards as a whole.
At the same time, I've used computers for about 25 years and I've seen so many different keyboard layouts during that time that I really don't think the old IBM keyboard layout is deeply imprinted into my brain to the point where it would take me a substantial amount of time to change my habits.
I'm sure you can still buy keyboards with the old layout, which would make it reasonable to forget about the errors of the past and have truly good keyboards that don't put themselves in unusable states all the time.
# September 16, 2004 3:42 PM

Jerry Pisk said:

If you use the numeric pad for one feature and only occasionaly switch to the other you can just use the Shift key (i.e. if your Numlock is off then num keys with Shift will type in numbers).

You can use the Pause/Break key to pause some games and if you hold down the Win key and hit Pause/Break you will get System Properties (which I use to start Device Manager when I need it).
# September 16, 2004 3:44 PM

tuthils said:

John, I use the pause and break buttons quite fequently within command prompts. Ctrl-Break is still used in ping to display statistics without actually halting the process and it also responds to pause, though I'm not sure there is a whole ton of use for that.

In any case, I whole-heartedly support the anti-F-lock key movement and if I could just get it turned off by default, the f@#$ing thing could be ripped from my keyboard and placed on my monitor as another decoration. Not once in the 6 months I've had the keyboard has that key been useful, and it is a real pain toggling F-Lock to use PrintScn then having to switch F-Lock back as I'm more accustomed to Shift+Ins for paste than Ctrl+v (holdover from my QuickBasic days). Granted, I can use both but my hands just naturally go for shift+ins when I go to paste.

Coming from the world of the Commodore 64, it took me a long time to get used to the fact that to go left with your cursor you did not have to hold shift and hit right. Brains can be retrained for new keyboard layouts but it's a bugger during the retraining phase.

My $0.02 USD.
# September 16, 2004 4:00 PM

Patrick said:

I got a new Microsoft wireless keyboard, and it's great except that HORRIBLE F-Lock key. As a programmer, this is the most annoying hardware device I've ever seen. Every reboot, I have to remember to turn this thing back on so that I can use my F-keys like I'm used to in Visual Studio.Net.

Horrible idea.
# September 16, 2004 4:34 PM

Florian said:

Absolutely agree !!! Moreover, it's impossible to unlock F keys on starting even with the keyboard driver (Natural Multimedia keyboard). Otherwise, i'm lucky my numpad is always unlocked :).
# September 16, 2004 4:55 PM

Alex said:

the F-lock key really pisses me off.

it wouldn't be so bad if the default operation enables the function keys!!!

who was the genius that decided the function keys should be subbordinated to the "new" keys. now people who actually learned all _original_ shortcuts have to remember to press the F-key before they start any work. pretty dumb.

ok so now you've pressed the F-key and all your shortcuts work. you can Alt-F4 with impunity

hmm, i need to get to the System properties really quickly. no prob, just hit Winkey + Brk key.

uh oh! someone skimped on a button. gotta turn of the F-key before that shortcut works.

lame!
# September 16, 2004 5:26 PM

Ben Constable said:

I learnt how to type on an Amstrad keyboard that had no directional keys, and I had to joystick. So I learnt how to use directional keys on the numeric keyboard. If I want numbers I type them using the number keys.

I agree about F lock though. I keep meaning to search for a way to permanently leave it on.
# September 16, 2004 5:33 PM

Edward said:

It'd be nice if the Numlock status could be based on which usb-based keyboard you have attached. On my tablet PC having numlock on with the detachable keyboard remaps part of the alphabet, so I can't type my password in, but when it is attached to the docking station I use a full size keyboard with a numeric keypad and I like numlock to be on all the time since I use it to enter IP addresses etc.

Basically I want numlock ON when I have a numeric keypad available and OFF when I don't.

The only thing I use the Break key for is when running VB6 programs through the IDE. Pressing CTRL-BREAK causes it to break straight away.

I have an optical desktop elite so I have the dreaded F-Lock key. It truely is useless and annoying, it wouldn't be so bad if it could be controlled through software like num-lock, but since it is not a real key and merely a hardware setting you always have to remember to turn it off every time you start up the computer.
I've never used scroll-lock for anything, except now it is the same key as break I keep pressing it when I don't know if F-Lock is on or not.
# September 16, 2004 5:45 PM

Geoff Appleby said:

I definately hate the flock key, but love my ms natural keyboard. I don't mind how the home/end keys etc were rearranged (took me a long while to get used to tho).

The first thing i did when when i got a keyboard with the flock was to go here and download the inverter:
http://www.mvps.org/jtsang/flock.html

It reverses the keystates, so that with flock OFF it's F1, and flock ON it's help, etc.

However, this is a permanent change, and if you plug in a keyboard that doesn't have flock, then your fkeys won't work (they'll send the otehr keys).

Hope this helps some of you, because it sure helps me :)
# September 16, 2004 7:01 PM

Bertrand Le Roy said:

Thank you, Geoff, and thank you Jason Tsang! This is great!
# September 16, 2004 7:03 PM

Barry Dorrans said:

Ah numlock. What a pain on notebooks, when Windows decides that it's a good idea to have numlock on after boot. When you don't notice. And get locked out of your account because you have a letter in your password that corresponds to the numeric keypad embedded in your laptop keyboard.

Note that you can fix this, with a registry edit

If you go to HKEY_USERS\.DEFAULT\Control Panel\Keyboard the flags in IntialKeyboardIndicators control the intial state of num lock, caps lock and scroll lock after boot.

0 - All off
1 - Caps Lock on
2 - Num Lock on
3 - Caps Lock on and Num Lock on
4 - Scroll Lock on
5 - Caps Lock on and Scroll Lock on
6 - Num Lock on and Scroll Lock on
7 - Caps Lock on, Num Lock on, and Scroll Lock on
# September 16, 2004 7:47 PM

TrackBack said:

The dreaded FLock key.
# September 16, 2004 10:32 PM

Jeff Parker said:

DEATH TO THE FLOCK KEY Just to chime in, god I hate that thanks though to the links to keep them permanently off.

No one has seemed to mention my other absolute hate The one I hate so much anytime I see a keyboard with it I take it apart and inject silicon in between the contacts under the rubber mat. A Shut down key. Seen these stupid things a key on your keyboard you press and your computer starts shutting down right away. After the 3rd time I lost a crap load of work by accidentally hitting the shut down key is when I started using silicon to completely disable that key permanently. I mean do people really need a shut down to be a simple keypress they can't click Start and shutdown, what it takes too much time?
# September 17, 2004 8:49 AM

Bertrand Le Roy said:

What all of this feedback seems to indicate (other than the universal hate for the F Lock key) is that we need a harware or software switch to permanently set the state of some of the keys (namely, F Lock, Num Lock and shut down/sleep).

Oh, by the way, who hates sticky keys too?
# September 17, 2004 1:36 PM

Roland Weigelt said:

I could live very well with a keyboard without the arrow keys and the other keys between main part of the keyboard and the number pad ;-) I prefer navigation on the number pad; when I rest my middle finger on the "5" key, I can reach all the keys I need by moving only my fingers.
If I use the arrow keys and the 6 keys above, I have to move the whole hand, which is much less efficient when editing text (or am I just using the keys the wrong way?) And when using the numeric keypad, I can use more fingers of my right hand (e.g. thumb, small finger). Also, I have a couple of macros for expanding/collapsing regions assigned to the numeric + and - keys.
I must admit that I never use the number pad for actually entering numbers. Maybe it's because I rarely need to enter numbers, or maybe because the key layout is different from that of a phone.
# September 17, 2004 5:54 PM

tuthils said:

Sticky keys just today caused me plenty of heartache and grief as I struggled to find out why as I was unlocking my computer my password would not work, knowing Caps Lock was not the culprit (tried it both ways)!

Since I'm complaining on about the accessibility features: I really dislike having holding Shift both disable AutoPlay for inserted CDs and to enable FilterKeys. Maybe I just let up too early or maybe I'm naive and Shift isn't the key you're supposed to hold at all to prevent AutoPlay but for me every time I've tried holding Shift to disable AutoPlay, the filterkeys screen comes up and the CD is run anyway.

I am not against the accessibility options at all, I know there are people out there with legitimate uses and I personally rely on MouseKeys when I'm in our data center at the KVM console as for some reason the mouse isn't responding anymore.

I guess I just have never looked close enough, I just found out those shortcuts (pressing shift 8 times for StickyKeys and holding shift for 5 seconds for FilterKeys) can be disabled! In any case, I'm still no fan of StickyKeys :-)

Back to the F-Lock key, I'm a software guy, not hardware so please forgive the simplicity of this question but would it be possible to just run to the local Radio Shack, pick up a tiny toggle switch, and somehow solder it into the F-Lock key (well, its contacts) and kind of... force... it's state one way or another? I'm sure that voids any warranty but I'm willing to forgo that warranty for the option of not having F-Lock on anymore.

Maybe someone in Microsoft's product design labs will see this great dislike of that key and produce an F-Lock free keyboard. I love the idea of the reverse mapping, but being on a laptop, I have to have my F keys away from the docking station as well :(

The rest of my keyboard is great and it's amazing how often I've used the Calculator key as opposed to hitting Win+R, type calc and hit enter. (Not a huge mouse fan either)

It's great to see so many people share my feelings on the F-Lock key though :)
# September 17, 2004 6:19 PM

jinath said:

good info
# September 18, 2004 1:10 AM

lowercase josh said:

What web browsers don't support png? That is, among those used by more than four people worldwide on a daily basis?

And the number of colors is more important than just for palette size. It reduces the "alphabet" that exists in the image data, making compression more effective.

Dithered images *are* harder to compress. Ordered/pattern dithered images less so, but they'll still end up bigger than no dithering.

You should use interlacing on large gif or png images. Some people still connect at 56k, and sometimes your server gets overloaded. If your image is large enough to matter, the slight increase in file size won't matter, but you should probably consider using jpeg or css instead.
# September 18, 2004 4:27 AM

Hal said:

You might wanna talk to the paint.net guys so then this article could be a demonstration of MS technologies too. :)

http://www.eecs.wsu.edu/~cs423/423spring04/Team2/
# September 18, 2004 9:05 AM

Dimitri Glazkov said:

Excellent. We need something like this as an MSDN article. Will you take me as a co-author? :)

A couple of things I would add:

1) It takes practice and developing a good eye to get the dithering and color optimization right. Spend some time playing with your first images -- it will pay off later on.

2) Photoshop versions 7.0 and CS have some color optimization built-in -- they will attempt to automatically come up with the minimal number needed to render the image, but the algorithms are not very aggressive (which is a good thing), so for complex, photo-realistic color images, the optimization doesn't get very far. It does, however, work really well for the simple-pallette images.

3) In my experience, the only Dither algorithm that is really useful is "Diffusion" when used with gradients. "Pattern" looks horrible on pretty much anything Web-related and "Noise" usually looks worse than "Diffusion" and adds a lot of weight to the file size. Like Bertrand said, there's rarely a reason to monkey with Dither quantity -- just leave it always on 100%.

4) If you are doing graphics, ask your boss to let you have both LCD and CRT monitors on your desk. It also helps to have more than one of each to check on (see my workplace for a slightly exaggerated example: http://glazkov.com/blog/archive/2004/06/19/195.aspx). Colors, especially slight variations, typically look more pronounced on an LCD panel.
# September 18, 2004 9:13 PM

Bertrand Le Roy said:

Josh: you're right, most browsers that are used today understand PNG. But for us, "most" is just not enough, we need all. But for your day to day web design needs, you're right, PNG can now be used pretty safely (and it has the advantage of not being restricted by patents). I agree 100% with your other comments, in particular on the fact that if your image is large, you should consider JPG.

Hal: Paint.NET is not really MS technology, it's a student project. It's pretty nice (i use it too sometimes) but still has a long way to go to compete against Photoshop. Then again, it's free, which is a really nice feature.
The MS imaging product is Digital Image Suite, which has amazing features, but is not targeted at professionals. It is more oriented towards familial users. I use it at home to fix my photos.
Anyway, the reason I used Photoshop in my tutorial is that it is by far the imaging product that's the most used by professional web developers.

Dimitri: OK for the MSDN article. Send me mail so that we can arrange that.
# September 19, 2004 2:27 AM

Bertrand Le Roy said:

One thing I had not thought about and that could explain why I use the numeric pad so much, and why native english speakers don't is that on french keyboards, you have to use shift to access the numbers on the main part of the keyboard. It makes the numeric pad a necessity much more than on a qwerty keyboard.
I guess that makes the num lock key much more annoying for people who have learned to type on azerty and similar keyboards.
# September 20, 2004 1:59 AM

Rob Cannon said:

It's a great facility. The only problem is that I would like to see a solution that will also work for non ASP.NET project. Shouldn't this be something that can be harnessed by Visual Studio/MSBuild (or is it already)?
# September 22, 2004 9:28 AM

Robin Debreuil said:

I had a natural keyboard knock off once, it had all remapped arrow/home/etc keys -- and right beside the left ctrl key was the sleep button. No kidding. So I actually one day unplugged this and smashed it against the floor, repeatedly. In my hunt for a new natural keyboard (I was overseas and couldn't get an ms or logitec one) I found a second brand. It had all normal mappings it seemed, however when I checked for the 'sleep beside undo' problem I noticed, and this is no joke, I may still have a photo -- the power off key.

Obviously that keyboard designer has moved up in the world, and now we have FLock. The worst part of that is the logic probably went, "if we allow people to disable it, then everyone will and no one will get used to my wonderful feature". If it was for the sake of new users, I hope they convinced the software side to rewrite all the help docs that say "press F1 for Help", etc. Terminally stupid.


# September 22, 2004 11:23 PM

dimitri.glazkov@gmail.com (Dimitri Glazkov) said:

Ah, technology vs. human, the age-old battle.

How's that article coming? :)
# October 6, 2004 10:54 AM

BillT said:

I agree with Rob. (I still do more WinForms that ASP.NET apps with VS 1.1.)
I'm not sure how you'd do this. (a) Perhaps just an API call to initiate the necessary examination and processing of the (or any) directory. (b) Perhaps a project (shipped with VS) that would be added to a solution. This project would implement all the needed processing.
# October 8, 2004 4:44 AM

Paul Wilson said:

Love it -- thanks for the post.
# October 8, 2004 5:20 AM

Bored programmer said:

Wonderful explanation of a very difficult concept! Very good, my friend.
# October 8, 2004 10:41 AM

Bertrand Le Roy said:

It's a great question. Though I don't have a precise answer right now, this new feature of ASP.NET is just a build manager that you can easily configure.
ASP.NET is very different from Windows Forms in that it is a server environment that has to compile on-the-fly. I suppose that in a Windows Forms application, the need to do it on-the-fly is much less important. The same thing could be done at application launch. I suppose MSBuild could be used for that, but I don't think you need it. It should be enough to look at the config, scan any registered directory in there and launch the declared build providers if a recent enough dll does not already exist. Then load the dlls and... voilà.
Actually, this would make a beautiful project if someone wants to do it...
# October 8, 2004 1:18 PM

Robin Debreuil said:

I really enjoyed that. The fact that it was (or wasn't) my destiny to enjoy it doesn't diminish the pleasure either.

# October 9, 2004 6:57 AM

preppy said:

AllGreek and Latin to me!!!!
# October 18, 2004 9:37 AM

TrackBack said:

And it IS considerably more verbose, though quite elegant thanks to delegates. Thanks, Sebastien!
# October 18, 2004 6:57 PM

TrackBack said:

# October 21, 2004 8:09 PM

TrackBack said:

# October 21, 2004 9:34 PM

TrackBack said:

# October 27, 2004 12:23 AM

haacked@yahoo.com (haacked) said:

I'd make one counter argument to this, though I agree with you for the most part. I wouldn't be opposed to a web framework in which controls could access certain properties of the page.

Bat only through a known interface and if the control degrades gracefully if the Page class didn't support the interface.

For example (inside the control):

IFrameworkPage specialPage = Page as IFrameworkPage;
if(specialPage != null)
//... Access properties of the page specific to this framework
else
//... degrade gracefully
# November 17, 2004 11:11 PM

mike said:

One reason to expose properties on the page is if you want to access them after a Server.Transfer, or in Whidbey, after a cross-post. However, I forget whether those have to be public. Also, I suppose, a reason that people do that is to get access to control properties that are children of the page.
# November 18, 2004 1:12 AM

TrackBack said:

# November 18, 2004 3:02 AM

TrackBack said:

# November 18, 2004 3:03 AM

Bertrand Le Roy said:

These are good points.
Mike's point is especially true, though I personnally don't like cross-page posting: even though we made great improvements in ASP.NET 2.0 in this area, I still think that when you go to a different page, there shouldn't be a strong coupling between both pages. And with the current mechanism, the target page relies on the source page inheriting from a special class or containing special controls. It's strongly coupled. I personally dislike this architecture and prefer to use weaker coupling such as querystring parameters when it's possible.
Mike's second point, though, is precisely what I'm arguing against, if I understood correctly.
# November 18, 2004 1:49 PM

mike said:

You understand correctly -- my point was only that I believe that people sometimes use public page properties to expose control values. (Such an example appears in the docs, I see.) I just checked, and it seems you can use FindControl on the page B to get values out of A -- it still (kind of) breaks encapsulation, since it requires the target page to know the ID of the control to get, but at least it doesn't also require the container page (page A) to add a property to expose the control value(s).
# November 18, 2004 5:54 PM

TrackBack said:

Here are two more great blog entries about preventing SQL Injection Attacks....
# November 29, 2004 10:55 PM

TrackBack said:

# November 30, 2004 9:23 AM

TrackBack said:

# November 30, 2004 9:26 AM

AndrewSeven said:

42...Second time I've seen that today. 6x9?


Abstractions leak, they must, if they didn't leak, they wouldn't be abstractions, they would be reality.

Abstractions are a special form of obfuscation, they hide the details that are not relevant to the "goal at hand".


The universe just is.
All our perceptions, all of our formulas; those are the abstrations.


http://weblogs.asp.net/andrewseven/articles/QuoteMe.aspx
# December 2, 2004 11:04 PM

Jeff Atwood said:

ASP.NET is *ULTRA* leaky though. Dynamically generated webforms almost always force me to peek under the covers, no matter how hard I try to stay abstracted. In some ways, it's the worst of both worlds: to get my work done, I have to fully understand the abstraction layer and all the plumbing underneath.

I acknowledge that it's a very difficult problem and ASP.NET is still much nicer than the alternatives, warts and all. I'm sure 2.0 will be even better!
# December 3, 2004 12:08 AM

haacked@yahoo.com (haacked) said:

That abstraction is the universe itself.
# December 3, 2004 1:07 AM

TrackBack said:

# December 3, 2004 10:46 AM

Brian said:

uh.. it's 6 x 7 not 6 x 9 :)

for the people who are complaining about abstraction, well.. how bout this, i'll start coding my web app in ASP.NET, and you just use binary. Let's see who get's there first. if you can manage it, I'm willing to bet your's would be faster. But, it will take you years to accomplish what I can get done in a week.
# December 3, 2004 2:25 PM

Bertrand Le Roy said:

Well, in base 13, 6x9=42.
# December 3, 2004 4:01 PM

TrackBack said:

# December 7, 2004 8:44 PM

Adi Oltean said:

Black hole evaporation is a real effect. The speed of evaporation is directly related with the mass of the black hole. Very small black holes are dying very quickly. Larger black holes have a much larger evaporation time. In general, the speed of evaporation is proportional with the cube of the black hole mass.

Here are more details on this subject:
http://en.wikipedia.org/wiki/Black_hole_evaporation



# December 14, 2004 8:52 PM

Bertrand Le Roy said:

Sure it's a real effect, but it sure isn't yet a fully understood phenomenon as it lies at the frontiers of quantum mechanics and general relativity, which, to say the least, don't mix well.
Thanks for the link, which is very informative and should give a basic understanding of the phenomenon to those who don't know about it.
An important piece of data in this article is the time it takes a black hole to evaporate. Black holes formed from a collapsed star seem to have no chance of disappearing anytime soon, or anytime at all. Only primordial black holes (formed at the same time as the universe) could evaporate in a reasonable amount of time. Furthermore, the article says that the equilibirum size for a black hole (where it absorbs as much as it emits) would have the mass of the Moon. Again, primordial black hole only. Unfortunately, no one knows if small primordial black holes exist. We have some clues about large primordial black holes, but so far not small ones, as far as I know.
Anyway, my main point was what happens really to a particle that plunges into an evaporating black hole? Does it enter the horizon at all?
# December 15, 2004 1:45 PM

Adi Oltean said:

>>> Only primordial black holes (formed at the same time as the universe) could evaporate in a reasonable amount of time.

This is not known yet.... At least in theory, small black holes are continously forming and dying quickly all the time. All you need is enough energy to "compress" matter in a very small area. Given enough energy, this is possible. It is suspected that cosmic rays (that have extremely high energies, above hundreds of MeV) can create these black holes. Fortunately, these black holes are dissapearing as quickly as they are created so there is no danger there.

See this link for more details: http://www.newscientist.com/article.ns?id=dn4446

>> Anyway, my main point was what happens really to a particle that plunges into an evaporating black hole? Does it enter the horizon at all?

Of course. There is nothing special about this horizon, except that anything that goes there cannot come back.

This might look weird, but it is not completely weird to have movement only in one direction in the four dimensional space-time. Actually, in space-time, this is a natural property of the time dimension - things are only moving one way, from past to future. With space dimensions, things can move both ways except in the case of black holes, when they move only in one direction.

# December 16, 2004 3:52 AM

Sigurdur G. Gunnarsson said:

Hi,

This is something that has been troubling me for awhile. While most of this sounds right to me, there are some things that I don't like.
I use quite a lot of custom reference types, and some are mutable. I use them in collections and want to be able to sort them. I do that by implementing IComparable and the collection classes sort them via that interface.
Well, the rules state that if you implement IComparable you must implement Equals and the operators ==, !=, < and >.
Doing all that I end up with reference types that don't match up with the rules you state.

Am I missing something?
# December 16, 2004 5:41 AM

Bertrand Le Roy said:

Adi, thanks again for the feedback. I didn't know that mini-black-hole could form so easily, I thought stellar and primordial were the only kinds. I guess my physics are a little outdated (I quit the field ten years ago). But now that I've read the article, it sure makes sense.
Now, on the second point, of course I'm not discussing the possibility that a particle can theoretically enter a classical horizon. I used to know General Relativity quite well having worked in a Cosmology laboratory during my PhD thesis so this is quite clear to me, no mystery there. The particle enters the horizon in finite time, we just perceive that it takes infinitely long and it's ok because our region of space-time is causally diconnected from the inside of the horizon so there's no paradox. What I'm talking about here is very different.
When a black hole evaporates, from our reference frame, we see incoming particles taking infinitely long to cross the horizon. At the same time, we see the horizon recess and finally disappear. So a logical conclusion seems to be that from our reference frame, we still see the particle after the black hole has disappeared, and it never entered the horizon.
But there is only one objective reality even in Relativity, so the only conclusion seems to be that the particle never enters the horizon. From the reference frame of the particle, what must happen is that events seem to happen faster and faster, including the recession of the horizon and its disappearance in finite time.
I think no particle ever enters the horizon of an evaporating black hole. Which gives a different answer to the information paradox. That's my point.
I'm very ready to be proven wrong, I'd be more than happy to: I'd learn something new, and I just love that.
# December 16, 2004 1:51 PM

Bertrand Le Roy said:

Sigurdur, that's a very good question. For value types, well, they should really be immutable anyway, but for reference types that must be IComparable, in short, for the moment, I don't know exactly. I've asked the question to some CLR gurus and I'm waiting for an answer. Stay tuned.
What I can recommend for the moment is that you base your implementations of IComparable, Equals and GetHashCode on immutable properties if you can (even if the rest of the type is not immutable).
As a last resort solution, if you don't need to use these types as keys in a hash table (which is the main reason to use the hash), you could throw from GetHashCode.
# December 16, 2004 2:15 PM

Adi Oltean said:

Oh, I see now your original point. Interesting problem...

So, let me dumbify a little the experiment so I can understand it... :-). A source of light is launched from some point outside of the black hole. The source approaches the event horizon and enters into it. From an external point of view, photons will be continuously detected with lower and lower energies.

Now here comes BH evaporation. At some detectable point in future (around t1 in the reference frame of the observer) the black hole completely evaporates. At this point in time (or around it) the source of the signal simply stops from the observer point of view. For sure, something happened with that source of light due to the interaction with the black hole. But I think that the end result should be that the observer must have NO way to determine whether the source already entered or not into the event horizon.

Anyway, all these are simply speculations which might or might not make any sense given that I am not familiar with the mathematics around this theory. Probably the event horizon becomes "special" when the black hole is near to its end of life and close to quantum dimensions? This special "fuzzy" event horizon will look like it is triggering other physical interactions which might cause the destruction of the source of light due to the black hole. And these interactions must also give the same end result to the observer as in the case when the source actually entered into the black hole, and the BH died shortly after that.


# December 16, 2004 5:15 PM

Bertrand Le Roy said:

I disagree with this interpretation. From our reference frame, the very moment when the object crosses the horizon is infinitely distant in the future, even though from its own reference frame, what seems infinite to us is actually finite for it. It's not just photons being detected with lower energies.
If you compare the two events (the moment the black hole evaporates and the moment the particle should enter the horizon - if it still exists -), their succession is clear: one happens in finite time, not the other. Thus, it is clear that the object enters the horizon after the latter has disappeared if at all.
Any physically relevant coordinate transformation will maintain the order of these two events as they happen at the same place. So the horizon must recess before the particle enters it.
Your hypothesis that something "happened" to the object which results in it being inobservable after the black hole has collapsed does not seem to be backed by any necessity or evidence (I know, we're speculating here anyway). But I think my hypothesis is backed by the fact that it does not rely on any new or mysterious phenomenon - no deus ex machina - and is consistent as far as I can see. There is no problem with the object not seeing the horizon recess (no object can see the horizon itself anyway).
I think you're right in saying that the actual disappearance of the black hole is pure speculation as we don't know the pysics of this scale, but we don't need to wait for that moment. Even when the final moment of evaporation is still far in the future, I think we can see that the horizon recesses faster than the particle approaches it from the arguments above.
Except of course if I'm overlooking some phenomenon or if my understanding of the evaporation of black holes is too naïve to be of any use.
But I'm really curious to see the advice of specialists of the field.
# December 18, 2004 6:06 PM

Bertrand Le Roy said:

OK, so the gurus agree that IComparable should really only be applied to immutable objects. So if you implement it on mutable objects, you must be breaking something. What you're breaking depends on what requirement you sacrificed in your implementation of Equals and GetHashCode. The documentation may be updated in the future to reflect that.
One other thing you could do is provide a method that enables the locking of the objects before you use them as keys in a collection object where the hash and Equals must be in sync (for example Hashtable), but that is a half measure as the users of your class must know about this problem and agree to lock the objects before using them as keys. Throwing from GetHashCode if the object is not locked could help prevent the problem.
Now, doing that is not ideal as it kind of breaks the pattern whatever you do: GetHashCode is implemented in object and it's not supposed to throw.
So the advice is "don't" and expect unexpected consequences if you do.
# December 18, 2004 6:19 PM

Sigurdur G. Gunnarsson said:

Thank you, that clarifies things quite a bit. And yes it would help if the documentation stated that "IComparable should really only be applied to immutable objects".
# December 21, 2004 6:13 AM

TrackBack said:

# December 22, 2004 10:43 PM

SuperJason said:

I really hope ASP.NET 2.0 makes this easy AND reliable AND cross-browser compliant. That would really allow some online applications to shine.

Traditionally, I have tried to avoid this as much as possible.
# January 4, 2005 8:31 PM

Bertrand Le Roy said:

Absolutely: it's easy, reliable and cross-browser.
# January 4, 2005 8:35 PM

rick said:

It will be cross-browser? Surprising, but that just made my day.

For other non-ASP.Net environments that want this functionality, there is the excellent JSRS (Javascript Remote Scripting) library (http://www.ashleyit.com/rs/). I was using this several years ago with PHP. I'm very excited that this stuff is finally catching on.
# January 4, 2005 9:14 PM

Adi Oltean said:

>>> If you compare the two events (the moment the black hole evaporates and the moment the particle should enter the horizon - if it still exists -), their succession is clear: one happens in finite time, not the other. Thus, it is clear that the object enters the horizon after the latter has disappeared if at all.

Well, my assumption was that the dissapearance of a black hole is an observable event (as predicted by theory when the mass of a black hole is extremely small), In this case, we can safely assume that some objects entered into it shortly before that event...

... If there is such thing as a black hole with a finite lifetime from our reference frame.
# January 5, 2005 5:28 AM

Bertrand Le Roy said:

Sure it's observable. Actually, that's kind of my point. How does that make it safe to assume that some object entered it (other than virtual particles created from the vacuum in the immediate vicinity of the black hole, whose information content is doubtful at best)?
# January 5, 2005 1:43 PM

Bertrand Le Roy said:

Not so surprising :) . Actually, most of the new features in ASP.NET 2.0 are cross-browser (Menu, TreeView with callbacks, the callback API, validators -finally-, GridView, etc.).
Interesting that you mention JSRS. There have actually been a few such APIs, including one by Microsoft, back in the classic ASP days, which was called remote scripting and surprisingly enough used a Java applet to communicate with the server.
The good thing is that the technology seems to be mature now with all browsers supporting it, and we can expect it to become mainstream this year.
# January 5, 2005 1:51 PM

bwaldron said:

So it looks like the compiler made an optimization because it knew that you were always concating the same number of values in your statement. I guess the rule of thumb for using StringBuilder is use it when what you appending varies based on something at runtime.

Good post...
# January 7, 2005 6:04 PM

Aapo Laakkonen said:

The compiler should take care of switching to StringBuilder whenever neccessary. Users' should just concatenate with '+'. That's what Java compilers have almost always done. And it seems like .NET compilers do the same, sort of.
# January 7, 2005 6:57 PM

Bertrand Le Roy said:

bwaldron: yes, absolutely.
Aapo: yes, I know Java does this kind of optimization. The C# compiler, as can be seen here, does similar optimizations when it is 100% sure it's relevant. Note that it doesn't use StringBuilder, but something even more efficient, though.
I'm no specialist of the Java runtime, but I don't think it can reliably know in which case a StringBuilder should be used. It can guess (just as the .NET compilers does in this case), but I mean, in some cases, it would have to be really smart about the structure of the whole application to do this kind of optimization reliably.
What if you instantiate a string in a package and pass it as an argument to another method in some other package where it will be concatenated with something else repeatedly? How does the compiler know what to compile to, String or StringBuilder, in each case? Or does it do some kind of conversion on the fly?
Then again, I'm not a compiler expert, and this blog entry should be seen as that of an ordinary user of .NET who tries to see how to improve performance of his applications. I'm not judging the Java or .NET choices.
I'd be interested to read about what really happens in Java, but I suppose that the rule here is more or less the same: if you're concatenating a fixed number of strings, just use +, and the compiler will take care of the optimizations (Java or .NET). But in .NET, if you concatenate a non-predetermined number of strings, consider using a StringBuilder.
# January 7, 2005 8:01 PM

Bertrand Le Roy said:

Update to what I just said. It seems like the Java runtime or compiler does not always know when to use a stringbuilder instead of concatenation, so in Java, it's exactly the same as in .NET: you should know when to use which.
StringBuilder was actually only introduced in Java 5 (previously, you could use StringBuffer, which does not perform as well because it was thread-safe).
http://java.sun.com/j2se/1.5.0/docs/api/java/lang/StringBuilder.html
http://www.javapractices.com/Topic4.cjp
# January 7, 2005 8:08 PM

Fabrice said:

One thing to know when using a StringBuilder is that it's good only when using Append(). If you try to use the Insert() method, you'll get really bad performances, because existing characters get shifted to make room for the new text.
# January 10, 2005 8:05 AM

TrackBack said:

Here are two more great blog entries about preventing SQL Injection Attacks....
# January 20, 2005 10:02 PM

Eddie Garmon said:

Instead of hard coding just add this to your class...

private static int _UnitMaxValue = (int)typeof(Unit).GetField("MaxValue", BindingFlags.NonPublic | BindingFlags.Static).GetValue(new Unit(0));

Its only evaluated once, and of if needed.

Eddie
# January 25, 2005 9:29 PM

Bertrand Le Roy said:

Eddie, that is an excellent point. Thanks!
# January 25, 2005 10:11 PM

Sean Gahan said:

Great Link!
My NerdyNess was a mere 89; I'm only a "High-Nerd."

Best Wishes,

Sean
# January 26, 2005 4:20 AM

Will said:

WTF? Did I just stumble into a LiveJournal blog? Are you a 14-year-old girl? "What X are you?" tests are a blight on the intarweb, only slightly less irritating than foot fetish sites and Fark's comments sections. Please, never EVER take another test again, and if you do, keep it to yourself. Thank you.
# January 26, 2005 8:45 AM

Bertrand Le Roy said:

Will, this is my blog, and if you don't like what you read here, you're very welcome not to read it.
By the way, how do you know that foot fetish sites are irritating?
# January 26, 2005 1:22 PM

Robin Debreuil said:

Will clearly has a foot fetish, but I suspect he failed the online test to get into the metatarsals video section. Don't sweat it Will, the calcaneus is way more erotic once you learn to appreciate the twin arches. Two words for you: 'toe socks'.

That being said, I'm just a 90, I knew I shouldn't have let the kids take that microscope apart. I don't know about that Friday night question though - 'bed at ten' was as close as I could get, though in reality I'm just under the blankets playing with my feet. Surely that is worth 3 extra marks?

# February 2, 2005 7:04 AM

EtIeNnE said:

Please note a small mistake here: in VB you CAN use += as a concatenation operator!
# February 22, 2005 3:26 PM

Doug Seven said:


This is a great post. Russ Nemhauser and I just covered this exact topic as one of our "small-but-useful" tips in a recent conference workshop on Performance and Scalability. Its little things like this that when multiplied by hundreds and thousands of users really add up to tangible performance gains.

I should add that when you are concatenating strings with variable values, you should use a StringBuilder to "accumulate" the string. Concatenating variable values with "+" or "& _" can add up to a perf hit because at the IL level this is still multiple values that are concatenated at run-time.
# February 22, 2005 4:58 PM

Bertrand Le Roy said:

Etienne: sure, you can. Most VB6 developers are used to the & syntax, though.

Doug: see this other post: http://blogs.msdn.com/bleroy/archive/2005/01/07/348831.aspx on concatenating with variable values. It's not the fact that you concatenate with variable values that really matter in the choice of a StringBuilder, it's really if the number of things you concatenate is variable: the compiler uses String.Concat(object[] a) when you concatenate a fixed number of objects, and that's significantly faster than StringBuilder.
# February 22, 2005 5:06 PM

Sushant Bhatia said:

I have a question on strings and how they are represented in IL. A while back I ran into this.

PROBLEM STATEMENT - Going through my project for work with the ILDASM tool was quite interesting. I noticed the following line:-

IL_000b: ldstr "There was a problem while trying to cancel authent" + "ication. Please inform the trainer."

Why is the IL split? My first though was that the string is being concatenated at runtime by the JIT. Then I looked up the ldstr on MSDN and found this quote:

The ldstr instruction pushes an object reference (type O) to a new string object representing the specific string literal stored in the metadata. The ldstr instruction allocates the requisite amount of memory and performs any format conversion required to convert the string literal from the form used in the file to the string format required at runtime.


So I scratch my head again and wonder why the sting was broken into two parts. First part exactly 50 characters long?

POSSIBLE IMPLICATIONS - Anytime you have a string that is more that 50 characters long, it will automatically be split when written in IL. Then during JIT, it will be concatenated. I also read somewhere that if you have 4 or more string concatenated, then you really should use the StringBuilder. Does this mean that any string 200 characters or above should be created using the StringBuilder?

What effect does this have on Resource Strings from your Resx files?
# February 22, 2005 6:10 PM

Bertrand Le Roy said:

First, the plus sign that you see in ILDASM is *NOT* anything real. I think it's just here to make it more readable. In reality, there's only one string. You can check by opening the exe file in a hex editor instead of with ILDASM.

Second, saying that concatenating more than four strings should be done with a StringBuilder is an oversimplification, and it's simply not true when concatenating a fixed number of strings (see http://blogs.msdn.com/bleroy/archive/2005/01/07/348831.aspx ). Four is a little low, too, even if the number of strings is variable.
# February 22, 2005 6:23 PM

TrackBack said:

# February 22, 2005 8:06 PM

TrackBack said:

# February 22, 2005 9:23 PM

freedumb fighter said:

Manks thanks for explaining #1 -- I had been doing all my checks as != null and was mystified why they were failing.
# February 24, 2005 12:36 PM

Brian Beatty said:

What about using string builder
sb.append("line1")
sb.append("Line2")

or string. format?
# February 24, 2005 12:58 PM

Bertrand Le Roy said:

Brian: see this other post on why stringbuilder is not always a good choice: http://blogs.msdn.com/bleroy/archive/2005/01/07/348831.aspx

In particular, when concatenating a fixed number of static strings, it's just a waste of time and it will perform significatly worse than just putting the concatenations in a multiline instruction: the compiler optimizes this away perfectly. There is no way anything can be faster, and it's readable.

String.Format is the worst approach. It performs very poorly when compared to both concatenation and stringbuilder.
String.Format has the advantage that it's very readable, but if you care about performance, you should only use it when the format string is not known in advance (for example if it can be set by user code).
If you know the format string in advance, it will be functionally equivalent to a fixed number of concatenations of variable objects.
So this means that string concatenation is what performs the best in this case too, not StringBuilder, not String.Format.

By the way, if you're thinking about inserting variable elements in a Sql query using String.Format or any form of concatenation, think again. The security risk is just too high.
Read http://weblogs.asp.net/bleroy/archive/2004/08/18/216861.aspx for more details on this.
# February 24, 2005 3:10 PM

Laurent Kempé said:

Sounds really cool !!! I planned to have a XSLT rendering of the article of Tech Head Brothers website as Word 2003 documents, using WordML, but it is not on a high priority on my task list, at least far from the WSE integration to publish directly from Word 2003. But I will for sure have a look to this.

Thanks.
Laurent
# March 1, 2005 2:58 PM

Jeff Parker said:

Handlers are a great thing, I do wish they were more documented. But you can offload a lot of time comsuming processing to Handlers. I wish I could find the article on MSDN somewhere that shows how to use a threaded timer in a HttpHandler to do the heavy lifting of a website things like email and so on, It was written by one of the guys working on ASP.NET a knowledgable guy by the name of Ron Howard.
He touches on this technique in this article below but he has a complete write up on it somewhere.
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnaspnet/html/asp11022004.asp

But you can use handlers for security as well this is one of the things like I said that has great potential unfortunately so very lightly documented http://www.dotnetspider.com/technology/kbpages/1011.aspx
# March 3, 2005 9:18 AM

Bertrand Le Roy said:

I think the guy you're looking for is Rob Howard. Ron Howard is the bald guy who makes movies and used to play Richie Cunningham in Happy Days.
You can get in touch with Rob on his blog:
http://weblogs.asp.net/rhoward/
# March 3, 2005 1:56 PM

Jeff Parker said:

Hah, yes you are correct Rob Howard. My Bad, well we both knew who I meant anyway.
# March 3, 2005 2:16 PM

Uwe Keim said:

Regarding point 2.): can you or any reader recommend some libraries?
# March 4, 2005 1:48 AM

Bertrand Le Roy said:

And this one that I just found on TSS.NET:
http://www.windwardreports.com/
# March 4, 2005 3:44 PM

MoonLite said:

#1 needs a little supplement though...

example:
the variable "val" does not yet exist.
if you do :

if ( val ) doSomething;
else doElseThing;

JavaScript will crash, because "val" does not exist, and does return neither "null" nor "undefined" nor "false".

The workaround I use is :

try { if ( val ) doSomething; } catch(e) { doElseThing; }

If used often, consider using a function:

function exist (a) {
try { var b=a;}
catch(e){return false;}
return true;
} // exist

so you can just use:

if ( exist (val) ) doSomething;
else doElseThing;


it's advisable to put all your code in :

try { ... your code ... } catch (e) { alert (e); }

browsers like FireFox will give a little detail on the problem when encountered.
# March 5, 2005 11:55 AM

Bertrand Le Roy said:

Moonlite: while you are right that an undeclared variable will trigger a javascript error, I would certainly not encourage anyone to go ahead and include the test in a try/catch.
The right workaround here is to declare all your variables, even if you don't initialize them immediately. In this case, they will undefined, but the test will not crash.
There are very few cases where you need a try/catch. They do exist, but this is not one of them.
Thanks for the heads up, though.
# March 7, 2005 1:32 PM

Salman said:

Yup its Rob Howard. Jeff P., download the latest version of CS and you will see that code snipped.
# March 9, 2005 7:40 AM

TrackBack said:

Bertrand LeRoy illustrates how easy (well, relatively) it is in Whidbey/Visual Studio 2005 to create HttpHandlers (.ashx files). Ease of development aside, he points out that handlers are a comparatively less-understood feature in ASP.NET. He says: "T ...
# March 14, 2005 6:44 PM

TrackBack said:

# March 22, 2005 8:33 AM

TrackBack said:

# March 22, 2005 9:31 AM

TrackBack said:

# March 22, 2005 11:00 PM

TrackBack said:

# March 22, 2005 11:01 PM

Jerry Pisk said:

So in Whidbey one has to template the method signatures in addition to the type definition? instead of C++:

class <T> MyClass {
T GetService();
}

we have to do:

class <T> MyClass {
T GetService<T>();
}

isn't that a little too much?
# March 28, 2005 3:16 AM

Bertrand Le Roy said:

No Jerry, you never write that second thing, which would probably not compile because that would create a conflict between the class type parameter and the method type parameter. You write something close to the first one:

class MyClass<T> {
T GetService();
}

I should maybe have written the code for the entire class. What you have in my example is a generic method in a non-generic class:

class MyClass {
T GetService<T>();
}
# March 28, 2005 2:02 PM

Rolando said:

so you're a Microsoftie... and by your blog title and the content of your posts you don't seem to be part of the ASP.NET team

Why is your blog still here at weblogs.asp.net ?

Did Somebody forget to move you to blogs.msdn.com ?
# April 1, 2005 8:44 PM

Bertrand Le Roy said:

I am part of the ASP.NET team. What makes you think I'm not?
# April 1, 2005 8:46 PM

Rolando said:

sorry Bertrand... the content of your latest posts confused me...

by the way... is there any chance that ASP.NET team bloggers could be identified ? maybe a link like "Posts by only ASP.NET team Bloggers" replacing the "Posts by only Microsoft Bloggers" that now returns nothing ?

# April 1, 2005 8:50 PM

Bertrand Le Roy said:

I don't know. You'd have to ask Scott. I agree that it would be useful.
# April 1, 2005 8:51 PM

Steven Smith said:

Good stuff. For more info on the various ways to manage state in ASP.NET, readers might check out my MSDN article:
http://msdn.microsoft.com/msdnmag/issues/03/04/ASPNETUserState/
# April 2, 2005 10:41 AM

sugandh said:

hi, i want to know what r the implications of Viewstate on XMLHTTP.
I am getting an error in that and i feel it is because of viewstate.
# April 2, 2005 11:54 AM

Bertrand Le Roy said:

Steven, thanks for the pointer. I knew your article but couldn't find it, so thanks.

sugand: there should be no implication of viewstate on XmlHttp. If you tell me a little more about your specific situation, maybe I would be able to help. Are you using the ASP.NET callback feature or XmlHttp directly?
You can drop me a note at bleroy at Microsoft.com.
# April 2, 2005 10:08 PM

TrackBack said:

# April 3, 2005 1:40 PM

Oleg Ufaev said:

# April 4, 2005 4:08 AM

Bertrand Le Roy said:

Oleg: what's wrong with the url? I just tried it, and it works. What happens when you click on it?
# April 4, 2005 2:19 PM

Ron A. Buckton said:

I was working on a project for DDI (www.ddiworld.com) back in 2002 when .NET 1.0 was released. The project used OOB/XmlHttp stuff from the getgo, and MS even did a case study way back when (http://www.chroniclesdesign.com/ddi.pdf).

Prior to that I was using XML-RPC way back before SOAP in my ASP days, yet more XmlHttp. Its definately nothing new, but until recently there's never really been much of a "framework" for OOB support. (Excepting webservice.htc, which was still only a small piece of the puzzle).

New features like client-callbacks should make this easier in .NET 2.0 (and even 1.x, I have some sample code in a SIG presentation I did (http://www.bennettadelson.com/downloads/NetSigSolution2-8-05.zip) and will have an article on it in a couple days on my blog), building in a lot of support directly into .NET.
# April 8, 2005 11:39 PM

JosephCooney said:

I think the WebService DHTML behavior (on the client) and ASMX on the server is much better than ASP.NET's async callbacks....so much so that I wrote this sample comparing the two.

http://www.gotdotnet.com/Community/UserSamples/Details.aspx?SampleGuid=fd6acac1-da45-446c-822d-5b2ecdb396a6

and this critique of it

http://jcooney.net/archive/2004/02/26/343.aspx
# April 9, 2005 4:25 AM

TrackBack said:

# April 9, 2005 4:39 PM

TrackBack said:

^_^,Pretty Good!
# April 10, 2005 5:39 AM

TrackBack said:

^_^,Pretty Good!
# April 10, 2005 5:40 AM

TrackBack said:

Best of the Blogs - Ian Smith reviews the best of the last week's web development blogs so that you don't have to. Week ending 10th April 2005. Whidby, Visual Studio Team System, Visual Studio 2003, Training, Productivity Enhancers, Front-End Development and more...
# April 10, 2005 5:14 PM

TrackBack said:

Bertrand Le Roy, one of the rock-star developers on the Web Platform and Tools team has been doing a...
# April 10, 2005 7:51 PM

Uwe Keim said:

Great! I already played with this, too. Seems that this ASP.NET 2.0 Callback stuff also seems to be aware of different browsers and works correctly on FireFox, too?!?
# April 11, 2005 12:30 AM

Bertrand Le Roy said:

Uwe, it depends which build you're using. The beta builds should play nicely with Firefox, and the final version will address more browsers, like Opera.
In any case, any control you develop with this technology should degrade gracefully to ordinary postbacks on older browsers. It's the case of some of my samples, but not all, for the sake of simplicity (they are sample, not production quality controls).
# April 11, 2005 12:43 AM

Bertrand Le Roy said:

Joseph: The callback feature IS aimed at control developers. You seem to forget a small detail about behaviors: they're only available on IE. The ASP.NET callback feature already works on IE and Firefox and the final version will work on more browsers.
The example about wiring up several text boxes can be solved by the CallbackMultiplexer sample control that's included in my sample workspace (http://www.gotdotnet.com/workspaces/workspace.aspx?id=cb2543cb-12ec-4ea1-883f-757ff2de19e8).
Another problem with the web service behavior when compared with the ASP.NET callbacks is that you need to create a web service for each control, whereas with callbacks, everything is integrated in the page and control lifecycle.
That's very important: with web services, there's no way you're going to be able to access other controls on the page and integrate them in your update procedure. With callbacks, your update procedure executes in the context of the page, so all controls are fully available.
# April 11, 2005 1:13 AM

Steven Livingstone said:

Belive it or not the last few days i have been working on moving some old Remote Scripting features of a huge system to use XMLHTTP.

The feature above sounds very interesting. I assume it works fine through firewalls and proxies!? (i ask as this is on reason we are moving from Remote Scripting which runs into trouble over our proxy when using an older Sun JVm on the client!).

They key is if you guys can get this to just work cross-browser. I like the idea and would be very intersted in how this ties in with ViewState and postbacks.
# April 12, 2005 3:55 AM

JosephCooney said:

I was less-than-impressed with the async callback feature since it did NOT work in firefox IIRR in the PDC release that I tested, but it is great news if it will work on more in the final release. For control developers I can honestly see the benefit, but if you went the web-service route instead of the ASP.NET async callback route you don't necessarily need 1 web service per control, you just need one webmethod per type of async operation you want to perform.

I don't really buy into the "can't access other controls on the page" argument. If your using web services and need the state of the controls to be sent back to the web service you can just do that from your callback code. Using ASP.NET async callback you can't change the properties of the control inside the callback anyway, becuase the viewstate has already been written to the client (unless some very impressive script has been added in the last little while to re-write the viewstate on the client once the call returns).

I love the async idea (especially the part about making it easy) - I just wish it could have been more strongly typed. The client-side script that the current DHTML behavior could have been rolled into a control, so the fact that it is currently in a DHTML behavior is more of an implementation issue IMO.
[cross-posted from my weblog, with some more junk as I thought it up]
# April 12, 2005 4:58 AM

Bertrand Le Roy said:

Steven: it works with proxies and firewalls. Callback requests look just like any other http request from the exact same client as far as the firewall is concerned. And it does work cross-browser (IE and Firefox are supported for the moment, more to come for RTM).

Joseph:
It didn't work with Firefox in the PDC build, but let's be honest, what did? The PDC build was an early alpha. Beta 2 should be available any time now.
If you're using callbacks, you can have the same reusability you have with web services by isolating the code in a separate method and just calling that from your event handlers. Actually, it is pretty obvious that this is the good practice if your callback logic is not specific to this control.
The only state you can use with the web service approach is the client-side state, not the server-side state. That means more client code, and nobody want that, right? With callbacks, you just have access to your other controls as usual, it just works. With web services, your client-side code has to take the client-side state (if it exists at all in a usable form: think about the state of a TreeView) and package it into XML for the web service to consume.
The real reason why the ViewState is not updated during callbacks is that the page lifecycle is not completely executed, and because several asynchronous callbacks can happen at the same time in the current build (which is not beta 2). Otherwise, it would be fairly easy to send the new value of the viewstate back to the client.
Anyway, I'm not talking about *changing* the state of other controls on the page, I'm talking about using it.
The point is that ASP.NET callbacks are fully integrated into the page lifecycle and web services are not. This has many advantages, another one being ease of writing.
I understand your point about strongly typing. The problem is that there is a huge impedance mismatch between the JavaScript type system and the SOAP and .NET type systems. If you go the strongly-typed way client-side, where do you stop?
I kind of like the frameworks that try to give you client-side an object hierarchy that looks like what you have server-side, but that a *very* leaky abstraction. It looks nice, but it is actually an illusion IMHO. It increases the complexity of the client-script, and it's only nicer if you actually intend to write a lot of client-side code and need a clean object model there. The truth is, most people don't want to touch client-side code, they want to write as little as possible. So far, strings have been just fine for all our scenarios. We do some simple parsing in the TreeView case, but TreeView is already a very complex control.
Another thing to consider is that the callback API is just that: a relatively low-level API that enables you to forget about the complexities of communicating cross-browser with the server. The idea is that people will build stuff on top of it. For example, I don't know if you checked out my samples, but there is a very interesting thingy in there that's called CallbackMultiplexer and it does something like a more strongly-typed callback in a very transparent way. You could very well build a control on top of our callback API that does marshalling in a more strongly-typed way, à la Web Service. After all, XML is just a way to marshal strongly-typed data using a string.
You know what, I think I agree with you that there are scenarios where you will want something more strongly-typed that a string, and I think I'll build a control that does that for you. I'll add it to the sample collection when it's ready. :)
Thanks for the comments.
# April 12, 2005 2:28 PM

Fregas said:

I think all of this: AJAX, Callbacks, XmlHttp, etc. just illustrate how crappy the HTML/HTTP model actually is right now. In windows and java applications, this kind of stuff is relatively simple. In the web world, we always seem to be trying to catch up to where the desktop world has been for ages. Hell, forget about catching up, we're just trying to get close!

Simple things like Drag & Drop or populating a drop down list without a refresh are a huge pain in the ass in DHTML/Javascript. They shouldn't be. The need not be. All this stuff in ASP.NET 2 and its like (while definitely nice to have) are just band-aids over the real problem. I think the bottom line is that we need to scrap HTML as the client/presentation layer and replace it with something else. Call me a dreamer... :)

Long live SmartClients! Long live XAML! Long live FLEX!
# April 12, 2005 3:28 PM

Bertrand Le Roy said:

Fregas: I agree completely that in an ideal world, we would all be doing declarative rich client applications. But the web is here to stay for at least a few more years, and it's still the best answer for a lot of application types. Not for technical reasons (even though the web is still superior for a number of things, like being very flexible with document layout), but for pragmatic reasons.
It is our job at ASP.NET to make Web application development less painful (if not fun altogether). Callbacks are one more step in this direction.
But if your application can be done using rich client technologies and not loose a large number of its customers along the way (think Amazon in WebForms... doh!), go ahead and do it, sure.
# April 12, 2005 3:35 PM

TrackBack said:

Brian Goldfarb sent me an email pointer to the latest ASP.NET Support Voice posting.&nbsp; This one covers...
# April 12, 2005 5:33 PM

Fregas said:

Well, thats the rub isn't it? -IF- the W3C or some other organization would come up with a standards based presentation layer that made sense and allowed all this rich interactivity, -AND IF- all the browser vendors would support this standard without devolving into more browser wars...well then, we'd all be better off: Users, Developers and Companies who want a good ROI.

Not likely to happen, unfortunately. There are whispers of it in things like Flex and Xaml, but no standard in sight yet.

ASP.NET definitely makes things easier in most ways (although not all.) But i'm tired of hearing about things like AJAX which is sugar frosting on top of layers and layers of crap. AJAX doesn't make my job easier. Instead, it gives people who don't know any better the impression that there is now a new technology to make the web "desktop-like" and make all their UI dreams come true. Come on. We don't all have the resources and know-how of google.
# April 13, 2005 10:10 AM

Bertrand Le Roy said:

Fregas, I understand what you're saying and I almost agree. I know that some customers/bosses can be a pain when they've read about a cool new buzzword like AJAX. So as a word, I agree that AJAX may be harmful to the industry in the sense that it diverts attention from the fact that the technology it describes is in no way a universal answer to the fundamental suckiness of the web.
On the other hand, I hope that our work (which predates the buzzword) will make it a little easier for people like you (our customers) answer your boss's or customer's demands. I'm not trying to amplify the buzz in any way, just to make it easier for our customers.
I agree, we're not all Google. Actually, Google Maps is a very impressive piece of software in many ways and reducing it to just an AJAX application is an insult to the talent of the Google engineers.
# April 13, 2005 2:06 PM

Robert McLaws said:

Can you post the source for these controls?
# April 15, 2005 5:19 PM

Bertrand Le Roy said:

The link to the source code was in the first post, but I added it to the new post so that it's easier to find... http://www.gotdotnet.com/workspaces/workspace.aspx?id=cb2543cb-12ec-4ea1-883f-757ff2de19e8
# April 15, 2005 5:22 PM

TrackBack said:

# April 15, 2005 5:54 PM

TrackBack said:

# April 15, 2005 8:21 PM

TrackBack said:

Interesting finds this week
# April 17, 2005 12:38 PM

TrackBack said:

Ian's weekly review of the best of the blogs for the .Net developer week ending 17th April 2005
# April 17, 2005 3:55 PM

Cleve Littlefield said:

I disagree about the lack of need for strong typing. While full objects may be an allusion, something simple like supporting muliple parameters, not just a string input and a string output, is very useful. Here is a good example...

http://weblogs.asp.net/mschwarz/

Although this is a leaky abstraction, most of ASP.NET is a leaky abstraction of some sort or another...
# April 22, 2005 3:36 AM

Bertrand Le Roy said:

Cleve, with what exactly do you disagree? I never said there is no need for strong typing. One of my samples does precisely that: supporting multiple parameters...
About leaky abstrations, read my post about them: http://weblogs.asp.net/bleroy/archive/2004/12/02/274105.aspx
# April 23, 2005 10:37 PM

TrackBack said:

# April 24, 2005 1:37 AM

TrackBack said:

Steve Friedl has a great explanation of how he used a SQL injection attack to compromise a Web site. (Which is what he was asked to do.) It features a blow-by-blow account of what he tried, what results he got, and how he used his failed attempts to le ...
# April 27, 2005 1:09 AM

Sheetal Jain said:

Couldn't agree more - In our of our product we had written a strip out version of NanoXML parser as a applet to make server call to updaste <div> tags and this was back in 2000

# April 27, 2005 10:58 AM

TrackBack said:

# May 6, 2005 5:21 PM

TrackBack said:

wagnerblog.com &raquo; Fun with callbacks Part 1: What&#8217;s in the ASP.NET box?
# May 8, 2005 2:00 PM

TrackBack said:

# May 19, 2005 6:55 AM

TrackBack said:

# May 19, 2005 6:56 AM

TrackBack said:

Callbacks in 2.0
# May 19, 2005 2:27 PM

Peter Bromberg said:

Very classy stuff, Bertrand! Especially the RefreshPanel at gotdotnet.
# May 21, 2005 12:19 PM

TrackBack said:

# May 25, 2005 11:58 AM

TrackBack said:

# May 25, 2005 11:58 AM

Sergey Polyakov said:

Callbacks look like great techology capable to improve web controls development significantly.
Thank you Bertrand for introducing the technology and providing us with amazing demos.
My question is: are request params (the form input values) available during callbacks?
# May 31, 2005 6:37 AM

Bertrand Le Roy said:

Sergey: during a callback, the page is in exactly the same state it was during the last postback, so the Form and QueryString parameters are still available, in addition to the callback parameters. Does that answer your question?
# May 31, 2005 9:03 AM

Steve said:

This is good, but what about the current 1.1 version - this stuff you are doing is all beta material that can't be used on production environments.

See http://www.dart.com/powerweb/livecontrols.asp

I just wish these controls were cheaper :)
# May 31, 2005 9:25 PM

TrackBack said:

# May 31, 2005 11:29 PM

Sergey Polyakov said:

Bertrand, I meant whether are available the actual input values (at the moment of a callback) which have been changed since the last postback, but from your post I see that they are not available and only old values from the last postback can be obtained (and this is exactly what I observed in my test project). In other words I need to pass manually through the callback args all the information I want to gather from the page. Am I correct?
# June 1, 2005 2:59 AM

Bertrand Le Roy said:

Yes, you are correct. It looks a little counter-intuitive at first, but it ensures that the page is in a consistent state during a callback even if multiple callbacks are triggered at once.
The data that you want to be up-to-date must be passed as a part of the callback parameter, and Form will have the values it had during the latest postback.
# June 2, 2005 1:17 PM

TrackBack said:

This entry is an introduction to ScriptCallbacks in ASP.NET 2.0 and a few observations and comments on the design and implementation. It seems this interface provides a core engine behavior that is pretty low level, but doesn't do anything to facility the actual process of data exchange between the client and server.
# June 6, 2005 6:03 PM

Hank Fay said:

I resemble that remark, and here's my internal dialogue at such a moment:

If it's my marker: "I'd better keep it, so I remember what kind of marker and what color to buy."

If it's someone else's marker: "I'd better not throw it away: they might need to know what kind of marker and what color to buy."

It would be interesting to collect internal dialogues for this common behavior.
# June 14, 2005 11:40 PM

Peter Bromberg said:

So long as my callbacks don't die, I can live with the marker problem.
# June 15, 2005 10:20 AM

smelliot said:

this is why I always go for the brown markers- everyone hates brown, so it never gets used.

Also- I toss them- the prob (as stated by Hank), is that "if it's not mine, I can't throw it away"

In addition, they're always crap because "If it's not my whiteboard, I can't order supplies for it" or possibly rather, "If it's not mine, it'll still go onto my budget".

I haven't been to an org that has budgets for inanimate objects, but probably should.
# June 15, 2005 5:25 PM

Srikanth said:

I know this is n't the right message post for my question, but since you are an callback guru, i would like to post my question here.
How do we handle callbacks in the frame scenario.
For ex: Suppose i have three frames (pages) with Topnav,Sidenav and Remainingspace aspx page.I'm doing a callback from menu on the topnav that changes the data on the topnav page(html) and since we call response.end after the callback event,i could n't get to the leftnav to get loading with the new topnav changes.In otherwords the response stops with the topnav page and i'm not able to keep the pages rendering on the leftnav and mainspace page.Any ideas? appreciate your help.
# June 18, 2005 11:10 AM

Bertrand Le Roy said:

Well, if you do frames, it's the same as with postbacks, you'll have to use some client script to modify other frames (the server-side has no idea of frames).
# June 27, 2005 2:40 PM

Srikanth said:

Thank you. Someway or rather i figured out the answer after posting it in your blog.I guess reading your articles gave me the answer already.Anyway thanks for the excellent articles on callback stuff.
Keep up the great work!
# June 27, 2005 10:22 PM

AndrewSeven said:

I'm glad to see both.

I only looked at the Schwartz Interactive AJAX, but it is so simple to use.
You don't need to know about xmlHttp to use it and on the server you could just use an ordinary aspx page with the functions. In pages where you want to use those functions you call a register for ajax method.
# July 14, 2005 6:00 PM

Karl said:

Any solution that requires developers to manually serialize their wonderful objects and then do something meaningful in JavaScript with it is gonna fall flat on it's face. Until such time as good tool support for JavaScript exists, and developers learn that JavaScript is actually OO, even poor developers are going to realize that their code is unmanageable and hackish.


Ajax.Net might provide a "leaky abstraction" (thank's joel for that one!), it's still pretty productive:

var ds = response.value;
for (var i = 0; i < ds.Tables[0].Rows.length; ++i)
{
var firstName = ds.Tables[0].Rows[i].FirstName;
var lastName = ds.Tables[0].Rows[i].LastName;
}

for the win!!

Karl

# July 15, 2005 9:55 AM

Scott Wisniewski said:

You should take a look at the "Power Web Controls" provided by Dart.
One thing they do really well is preserve the user's (the app developer) mental model of how ASP.NET works. The client callback support in Whidbey does not do that, however.

In fact, I think you are in a bit of a catch 22.
You want to enable the developer to drop a control on a page and have the control be self contained in order to preserve their mental model for developing web applications.

However, the limitations of the way callback support is implemented break the user's model: callback event handlers cannot change view state, and the current form values are not collected and posted to the page. This means that a callback running inside a page (the simplest, and hence most likely, scenario involving callbacks) doesn't have access to any of the values users have typed in.

I know some people have expressed concern that collecting the form values can cause validation issues, but that can be resolved by requiring the callback mechanism to fire off the validation process.

In order to keep the callback mechanism, as its implemented now, without breaking the user's mental model you need to split it apart from the page. The callbacks don't have full access to the page (or control) on which they reside, and a result shouldn't be there. If a user places two methods on a page, one that responds to a callback event and one that responds to a post back event, he or she will naturally expect both methods to have access to the same state. However, they don't. The post back handler has access to the values the user (of the web app) typed in, where as the callback does not. The reasons behind the discrepancy stem solely from implementation details and are not immediately obvious to the user (the programmer). It's a prime example of the system implementation leaking into the user's mental model. That's not a good thing.

By splitting callback event handlers out into separate http handlers, the user's mental model is not violated in this manner. The handler is separate from the page, so it makes sense that it doesn't have access to the page.

However, separation is not the answer. It still violates the user's mental model. In particular, it flies in the face of modularity, something ASP.NET is really good at enabling. This is where the catch 22 comes in.

I think the solution is simple: enhance the callback mechanism to grab current form values before postback and to automatically update viewstate and control appearance after the callback. I'm not saying that's simple. In fact, I think it will be pretty difficult, and that it really isn't feasible to see something like that in Whidbey. However, I really think you should look into it for orcas.

I'm also not saying that the callback support isn't useful. For custom control developers (expert level ASP.NET users), the callback mechanism provides a great foundation for developing really awesome controls. I think as a result of it you will start to see some really great things come out of the ISV's developing controls for ASP.NET. As expert users, however, custom control developers are willing to "go the extra mile" necessary to maintain the correct user experience.

For the vast majority of "page oriented" ASP.NET developers (intermediate users), however, I think that the callback support in will prove to be a large source of confusion.
# July 15, 2005 12:31 PM

Bertrand Le Roy said:

Karl, I agree 100%. You need to check out my RefreshPanel library (follow this link: http://weblogs.asp.net/bleroy/archive/2005/04/08/397761.aspx and read on), especially the serialization stuff and the RefreshProxy. As I've been explaining in previous posts, the callback infrastructure provides you the low-level plumbing to enable out-of-band calls in a server custom control. It is easy to add a higher-level layer on top of that, as I hope I've demonstrated with this library.
I also mostly agree with the object-orientation remark, and this is precisely what we're going to address with Atlas. What I disagree with is the point of JS being OO. It is not really, but you can sort of hack it into being OO. What it has is closures. In Atlas, we're /implementing/, or adding if you prefer the notions of class inheritance, interfaces, strong types, etc. Stay tuned, I think you'll like what we're doing when we unveil it at PDC.

Scott, two things. First, believe me, we would have *loved* to maintain ViewState during callbacks, but it's very difficult for one simple reason that I've explained in a previous post: only one postback for any given page happens at once, whereas callbacks would be pretty much useless if you couldn't have several happening at the same time. So you may know the order in which you send the callbacks, but there's no way you can determine the order in which they'll come back. So which version of the ViewState are you going to choose? To maintain the monolythic ViewState, you need sequentiality. One solution we've been thinking about for Orcas involves making the ViewState less monolythic and enabling the page to be broken into smaller mini-pages that would have their own isolated state and where local sequentiality of the callbacks would be less of a problem. The problem with such a model is that it becomes more difficult for these mini-pages to communicate with the rest of the page. In fact, the ideal granularity is the control itself, so the ideal solution would be for each control to manage its own state, and guess what, that's the current callback model, except that we don't provide many helpers for client-state management in Whidbey, and it can be difficult to reconcile your client-side state with the global ViewState on the next postback. Read the Fun with Callbacks series for more details.
Second, I think you make my point: there are two needs (and solutions), one for custom control developers (callbacks), and one for application or page developers (Ajax.NET and the future Atlas framework). One tool does not fit all...
# July 15, 2005 1:47 PM

Bertrand Le Roy said:

(oh, and yes, we know of the Dart controls and of several other similar libraries. They're great and I can only encourage people to use them if they answer their needs.)
# July 15, 2005 1:49 PM

Etienne Richard said:

Friday 5:30 pm idea...

> One solution we've been thinking about for Orcas involves making the ViewState
> less monolythic and enabling the page to be broken into smaller mini-pages that
> would have their own isolated state and where local sequentiality of the callbacks
> would be less of a problem. The problem with such a model is that it becomes
> more difficult for these mini-pages to communicate with the rest of the page.

How about implementing better AJAX support for WebParts based solutions using each webpart as granularity? In such a scenario, "breaking pages into smaller mini-pages" = "defining webparts". WebParts communicate with each other using a provider-consumer connection model. The webpartmanager knows all the dependencies that exist between webparts at runtime.

In this model, WebParts would serve as the autonomous logical parts of the UI. The page's postback and state mechanism would be delegated to each webpart. Each webpart would then be responsible for it's own state and for posting back to the server. Upon return of a postback, the webpart's display and state would be updated. Just like a normal page postback, but scoped to a webpart and using AJAX to refresh only part of the UI.

Now, what if a webpart's state is dependent on the state of another webpart. For example, a master webpart and a detail Webpart. When the selection in the master webpart changes, the detail must be updated accordingly. If each webpart acts independently for postback, the detail will never be updated. However, in the webparts framework, dependencies between webparts are declared through a provider-consumer connection model. Therefore, when a webpart posts back, it is possible to know dependent webparts by finding all consumers of any connection provided by the parent webpart. To answer the dependent webparts problem, upon a webpart postback, a simple rule could be to execute postback logic for each dependent webpart as well as for the parent webpart. Upon return, update state and display for all the webparts implicated in the postback.
# July 15, 2005 5:40 PM

Bertrand Le Roy said:

Etienne, WebParts and callbacks/ajax sure are interesting scenarios for the Orcas timeframe as well as for Atlas, but at this point we don't want to force WebParts as the infrastructure people would need to use to get these features. Portal features and better callbacks are orthogonal and we're more thinking about a user control or panel, which can be combined with WebParts but do not force one to use them.
It's interesting to consider, though, because of the way WebParts maintain and persist state, which is very different from what ordinary Controls do.
Thanks for the feedback.
# July 18, 2005 3:46 PM

teddy said:

good
# July 26, 2005 3:17 AM

Brock Allen said:

Hmm... Software isn't easy is it? :)

I doubt there's time left to do this, but I could imagine this being rolled into the Control base class to manage some of this complexity when not using the async model.

-Brock
# August 7, 2005 3:57 PM

Bertrand Le Roy said:

Too late for Whidbey, yes, but I'd be interested to read precisely what you have in mind (for, you know, Atlas or Orcas).
# August 7, 2005 7:33 PM

foobar said:

You can also clip the select box.
# August 9, 2005 7:25 PM

Bertrand Le Roy said:

foobar: yes, you can if you have only one DIV to overlay. In the case of a cascading menu, you would have to clip to something that's not rectangular, which is impossible. And it would be so much more complicated than this anyway...
# August 9, 2005 7:59 PM

Jon Galloway said:

Interesting. I was pretty sure that the Beta 1 hid all selects on the page when the menu was shown. It looked really funky; this hack is at least much better from a user point of view.
# August 9, 2005 8:07 PM

Bertrand Le Roy said:

Jon: you're right. Beta 1 used to hide all select elements. The iFrame hack is available in beta 2 and later builds.
# August 9, 2005 8:09 PM

Scott said:

We use "javascript:;" as the src to avoid the secure/non-secure warning. Works better than putting a blank page in the site IMO. :)
# August 9, 2005 9:13 PM

Bertrand Le Roy said:

Interesting. I'll update the post. Thanks for the tip.
# August 9, 2005 9:16 PM

Bertrand Le Roy said:

Ron, that's very nice of you, but there's already a link to this article in the post, if you look carefully. Thanks for making it more obvious, though.
# August 9, 2005 9:29 PM

Collin Yeadon said:

Thanks for the "hack". I will need to try that out. I have gotten into the habbit of solving this problem by avoiding it but if I can avoid making sacrifices then that's great.

I wonder if this would also work for other objects. I have a large flash movie that pops up on a site I am working on. The flash is set to be transparent and all the standard stuff to let it stay above the other page elements. But I noticed the DIV problem exists with my flash movie as well. I have a hunch that this same hack will make the div my flash movie is in also appear over the SELECTS.

Do you know if this hack is browser version specific? I wonder if IE7 has corrected this problem.
# August 9, 2005 9:59 PM

Bertrand Le Roy said:

Collin, in theory, it should also work for other objects such as Flash movies although the transparency of the Flash movie may be trickier than the simple DIV case. If you can try it, can you post here the results of your experimentations?
I don't know if IE7 plans to correct this problem. It's probably too early to tell but if they fix it the hack won't break because the non-windowed behavior is correct too (try the code in Firefox to verify it). I know that the way windowed elements used to work in earlier versions of IE was different and that this hack may not work on older IEs, though.
# August 9, 2005 10:07 PM

Collin Yeadon said:

Bertrand, am I missing something? The IFRAME has a white background.. so how is this solution supposed to work? Possibly something else in my app is breaking the hack?
# August 9, 2005 10:52 PM

Collin Yeadon said:

OK, well, I guess I know what you meant about transparent being a problem.

Results are in:

Testing in IE6, It does show up over the SELECT as suspected. So flash is no problem. But, I guess there is no way to make that IFRAME transparent so this hack works great only if your menu has a background to cover up the IFRAME.

Lets hope IE7 get this fixed.

Good to know about this method anyways. Thanks BLR!
# August 9, 2005 11:12 PM

Bertrand Le Roy said:

Collin, yes, I think you've got it figured out: the point of the hack is that the iFrame is not transparent... So for a transparent movie, I don't think this can help. But it definitely helps for a menu DIV.
# August 9, 2005 11:55 PM

Josh Twist said:

Hi Bertrand,

Just as a note - I don't think *anything* is cached when accessed through https (for obvious reasons).

Josh
# August 10, 2005 2:45 AM

Sébastien FERRAND said:

Thx for this hack...
# August 10, 2005 9:41 AM

dylan said:

Easiest way to do this is by dynamically creating and positioning the IFrame, so you don't have to think about it. Below is pseudo code.

if (document.all)
{
divNode.insertAdjacentHTML("afterEnd", '<IFRAME style="position: absolute;z-index:4;" src="javascript:false;" frameBorder="0" scrolling="no" id="' + sTableID + '_hvrShm" />');
var iframeShim = document.getElementById(sTableID + "_hvrShm");
iframeShim.style.top = hoverDiv.style.top;
iframeShim.style.left = iframeShim.style.left
iframeShim.style.width = hoverDiv.offsetWidth;
iframeShim.style.height = hoverDiv.offsetHeight;
}
# August 10, 2005 11:07 AM

Bertrand Le Roy said:

Josh: I updated the text.
Dylan: thanks for the code. A few potential problems I see with it, though:
* if you insert the frame just after the div node, I'm not sure selects that are declared after the div in the document markup will get covered. Plus, you may need to reposition the div itself as the frame may cover it.
* the frame coordinates may need to be corrected in the case of multiple offset parents if you have to put the frame at the end of the document instead of next to the div.
* personally not a big fan of document.all as an IE browser detection test. For all we know, that may disappear in IE7 in standard mode (not very likely, but it may happen). Furthermore, the capability you're using is insertAdjacentHTML (which is IE only too), so why not use that as the test instead of document.all?
Big thanks for the code, though.
# August 10, 2005 2:01 PM

TrackBack said:

Comment mettre un DIV au dessus d'un SELECT avec IE.
# August 10, 2005 8:28 PM

Steve W said:

For simple menus (with no submenus) you can also use the window.createPopup() method, and that goes over windowed elements.
# August 17, 2005 5:04 PM

Bertrand Le Roy said:

Steve, that's an IE-only solution, and as you say, it doesn't work for cascading menus. It's used in the IE-only script for the verbs menu in webparts, though.
createPopup has its own share of problems, like its document being a completely different environment that does not have easy access to its parent document.
I'd strongly advise against using it.
# August 17, 2005 5:23 PM

Collin Yeadon said:

Here is a solution to use when all else fails. I put this together from some code I found on the net. Basically it will hide all selects that show up under the div you are showing. You would pass the left, top, width and height values to this toggle script which hides them ONLY if the version is IE6 or previous. We can only hope that IE7 will have cured this because this is an ugly way to do it.

I am forced to use this as a solution with a flash popup that has a transparent background. If te background was solid then of course the IFRAME solution would look much nicer.

I was tempted to make this script write a div to the page, position it where the IFRAME is and then style it to look like a drop down list but decided that was just not worth the hastle.

<code>
function toggleSelect(x,y,w,h){
var appVer = navigator.appVersion.toLowerCase();
var iePos = appVer.indexOf('msie');
if (iePos !=-1) {
var is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));
var is_major = parseInt(is_minor);
}
if (navigator.appName.substring(0,9) == "Microsoft")
{ // Check if IE version is 6 or older
if (is_major <= 6) {
var selx,sely,selw,selh,i
var sel=document.getElementsByTagName("SELECT")
for(i=0;i<sel.length;i++){
selx=0; sely=0; var selp;
if(sel[i].offsetParent){
selp=sel[i];
while(selp.offsetParent){
selp=selp.offsetParent;
selx+=selp.offsetLeft;
sely+=selp.offsetTop;
}
}
selx+=sel[i].offsetLeft;
sely+=sel[i].offsetTop;
selw=sel[i].offsetWidth;
selh=sel[i].offsetHeight;
if(selx+selw>x && selx<x+w && sely+selh>y && sely<y+h)
if(sel[i].style.visibility!="hidden") sel[i].style.visibility="hidden";
else sel[i].style.visibility="visible";
}
}
}
}
</code>
# August 18, 2005 4:03 AM

Sébastien Ros said:

I tried Jade one time ... and I was killed by a bomb from a boat ... never tried again ;) The CD is still beside the xbox

I like Soul Calibur 2 pretty much as I can fight with my girl friend!

But the game where I spent most of my gamer time was on Starcraft, in multi player mode.
# August 18, 2005 3:03 PM

Bertrand Le Roy said:

Collin: thanks for the script. I can see just a little problem: if some of your selects are already hidden for whatever reason, you're going to make them visible. This can be fixed by remembering the initial state in an expando.
# August 18, 2005 3:08 PM

Bertrand Le Roy said:

Sébastien: that's a pity, that's just the very beginning of the game. This fight is a little too hard at this point, I agree, but the bombs are easily avoided, and what awaits you after that is just awesome. You should try again...
# August 18, 2005 3:10 PM

mike said:

>despite its name which only reflects its original intention

Although actually, if you think about it, any script that runs as a startup script has to be physically at the end of the page -- if it comes earlier, and if it references objects that haven't been rendered/instantiated yet, boom.
# August 18, 2005 11:37 PM

Bertrand Le Roy said:

Mike: sure, you're describing the original intention of the script and the reason why it suits our needs here even though it was originally designed for script.
# August 19, 2005 1:54 PM

Collin Yeadon said:

Yeah, I thought about that. For my purposes this was all that I needed since I am writing a small flash movie to the screen. Where toggling would become an issue is with menus that have multiple depths.

Post Correction: "I was tempted to make this script write a div to the page, position it where the IFRAME is and then style it to look like a drop down list but decided that was just not worth the hastle. " ... I meant to say SELECT not IFRAME.
# August 21, 2005 10:08 PM

Raymond den Ouden said:

I noticed a little bug on my implementation....

after resizing the window, my menu is dropped behind the selectboxes, until the page is reloaded, then it works again
# September 6, 2005 10:46 AM

Martin Dolphin said:

Hi

Tried this and it's very nice indeed - thanks for your efforts. Is the version on gotdotnet the same as your demo pics? When I tried it the output doesn't look as neat and the pictures all appear in a single column.
# September 9, 2005 3:54 AM

Mischa Kroon said:

Wow looks very nice... I will definately be testing this out for a image gallery part of a personal website :)
# September 9, 2005 4:23 AM

Bertrand Le Roy said:

You're absolutely right, the CSS that's included in release 1.1 is an old version. You can now download the right CSS file from release 1.1.1 or from source control.
Please tell me how that works for you.
# September 9, 2005 1:27 PM

Mischa Kroon said:

Stupid question but how do I get this to work.

Just putting it in the right directory didn't do much for me.
# September 12, 2005 2:51 AM

Bertrand Le Roy said:

Mischa, what happens when you browse to the handler?
# September 12, 2005 1:35 PM

Julien said:

Rulez :) This is great.
# September 14, 2005 4:25 AM

Brennan Stehling said:

I cannot wait for the examples to be on that website. I hope to use Atlas starting next week for a project which is currently under development.
# September 14, 2005 4:05 PM

Bertrand Le Roy said:

You can already check out the quickstarts on http://atlas.asp.net.
# September 14, 2005 4:34 PM

Luciano said:

LINQ is not a feature of VB but of the CLR. And I think it was first developed in c# as part of the omega# project.

Luciano
# September 20, 2005 10:21 AM

Bertrand Le Roy said:

Sure, I don't think I said otherwise, but I guess it was not clear enough. The article is about VB, though, and for the moment VB is slightly ahead on its XML support. The research project Linq comes from is C Omega.
# September 20, 2005 2:00 PM

Marco said:

Nice, thanxs for the example, gonna look into it in a moment!
# September 21, 2005 2:07 AM

Scott Allen said:

Excellent example.
# September 21, 2005 9:45 AM

test said:

I tried this but nothing happens?
# September 22, 2005 1:20 PM

Bertrand Le Roy said:

You probably made en error somewhere, but it's difficult to guess where given how little information you're giving. You can contact me through the contact page, I'll help you to figure it out.
# September 22, 2005 1:34 PM

test said:

Hi, thanks, I figured it out - I had used a different name for the DataService. Sorry for the lack of information.

Question - in the future will we be able to simply drag an 'Atlas' control from the toolbox and write code behind?

Also, in the same line of thinking, will we be able to drag an Atlas 'ListView' on the page and set it's datasource, templates, etc... similiar to the server controls?

I really enjoy the server side components, but they lack the client side that Atlas seems to have
# September 22, 2005 2:39 PM

Bertrand Le Roy said:

Yes, tooling is very high on our list of things to implement. There will be designer support (actually, there's already some support if you use the Atlas server controls) and Intellisense.
# September 22, 2005 2:42 PM

Edwin said:

LOL! I could never have imagined there would be a web site dedicated to it.
# September 24, 2005 3:10 AM

Raghs said:

I am also not aware
# September 24, 2005 4:51 AM

enki said:

Hi, thanks for article.
I didn't figure out one thing: how to rebind detail to take place of previous snapshot? (in my case I want to bind detail text to same ID where I render preview on pageload) It's not usual master/detail scenario, but it is usefull when you have datasource with some short text preview and full version of text. I can create same effect by show/hide javascript, but I want to load full text to client on request.
Adam
# September 27, 2005 4:59 PM

Bertrand Le Roy said:

Enki, I'm not sure I understand what you're asking, but I think you could bind the dataIndex to the index of the item that's chosen in the master view. For example, you could have a button in the master view's item template that triggers the evaluation of an outbound binding from "_index" (a built-in property of DataRow) to dataIndex on the ItemView.
# September 27, 2005 5:12 PM

enki said:

Bertrand, thx for help, but I don't understand step before this one. When I declare ListView with:
<label targetElement="resultsItemShortText">
<bindings>
<binding dataPath="e_shorttext" property="text"/>
</bindings>
</label>
and then ItemView with:
<label targetElement="resultsItemShortText">
<bindings>
<binding dataPath="e_longtext" property="text"/>
</bindings>
</label>
only ItemView is rendered (or ListView is first and ItemView renders over it instantly perhaps). I understand why, but cant figure out how make this schema working. It will be fine to have some example for this, because in database rendering apps you mostly need to draw detail right under related master data.
# September 28, 2005 12:17 PM

Bertrand Le Roy said:

You can't have two controls pointing to the same element.
If you need both labels to be at the same place, you could bind their visibilities to some condition and its inverse so that they never both show at the same time.
# September 28, 2005 3:05 PM

enki said:

Hm..okay, but nobody needs AJAX enviroment for show/hide logic. What is good in AJAX idea is asynchronous handling with data, which can result in beter user experience. I'll try javascript call to webmethod which update content of parent element thru DOM.
# September 29, 2005 6:37 AM

enki said:

solved, don't post it on forum, thx for kicking from bad idea :]
# September 29, 2005 2:23 PM

Bertrand Le Roy said:

Enki, if you don't mind I posted it anyway because I think it's an interesting comment.
Atlas is more than Ajax. It's a client-side application framework. What you really want to minimize is roundtrips to the server because that's the main source of user experience disruption. Ajax is a better approach than postbacks because the page stays in the browser during the round-trip, which makes the experience more continuous and reduces the disruption to the component that's updating instead of the whole page.
Atlas enables you to do much more on the client than simple updates for example by managing change notifications between components, which enables components to communicate without needing to round-trip to the server except when they need data that's not already on the page. This way, you're eliminating a disruption of user experience that plain Ajax is not.
# September 29, 2005 2:34 PM

lucasbfr said:

c'est malin tiens, j'avais du taf :D (j'en suis au 11)
# October 1, 2005 12:30 PM

Jesse said:

Thanks so much for this. I have used it on a couple of things already! I was wondering if there is any way to set the username to the membership username property automatically? I am sure it is probably really simple, but I am so used to using code behind for everything nothing comes to mind
# October 2, 2005 4:19 PM

Bertrand Le Roy said:

Not sure what you mean. What user name?
# October 2, 2005 6:32 PM

Jesse said:

I am sorry, I wasn't very clear. Basically what I want to do is populate the texbox "namefield" with the logged on users name when they click on the Add button. I am using forms authentication on my web with the ASP.NET 2.0 membership provider. In the past I would just use code behind to set the textbox text to Page.User.Identity.Name.ToString() but I don't know how to do that when the add button is clicked in an Atlas control.
# October 2, 2005 6:49 PM

Bertrand Le Roy said:

Actually, if you use a server-side Atlas Textbox control, you can still set the text property server-side like with an ASP.NET textBox.
# October 2, 2005 10:54 PM

Jesse said:

Thank you! I will experiment with this. I am so excited about Atlas and what it can offer, but right now it feels so different to me
# October 3, 2005 1:08 AM

Beto said:

Do you have the full source code from this mater page?
# October 19, 2005 9:05 AM

Bertrand Le Roy said:

There is no master page involved here. Do you want me to publish the full source code for the master/details page? I'll do that when I have a little more time.
# October 19, 2005 2:55 PM

Ran Davidovitz said:

Hi.

Good article, But I dont think that IE 6.0 support attribute selectors.
WHat versio support it?
# November 1, 2005 1:24 AM

Bertrand Le Roy said:

Right, so you'll need to settle for one size for all.
# November 1, 2005 3:47 AM

gb said:

cool one!!! it does not work on Firefox.
# November 8, 2005 5:45 PM

Bertrand Le Roy said:

Which, if you read my post more carefully (and Nikhil's) is in plain sight. The reason why it doesn't currently run on Firefox is not Atlas (which runs fine on IE, Firefox and Safari) but funny things like SVG, transparency and stuff. Nikhil didn't have time to fix all those before his November 7th deadline, that's all.
# November 8, 2005 6:20 PM

Ron Shelton said:

Agreed.

I have also had arguments with people about whether a master page (from which individual pages are derived) is an implementation of "Page Controller" or "Front Controller". I argue that it is a "Front Controller" since the derived pages act as concrete handlers of the request, but others argue "Page Controller" because the main view-decision code is centralized.

What do you think?
# November 9, 2005 9:11 AM

Bertrand Le Roy said:

That's a very interesting question. I think individual pages, as well as content pages, *can* implement a Page Controllers, and Master Page *can* implement a front controller.
Now, I think it's really a choice that you make as an application developer to use the tools that ASP.NET are providing (and that are more or less close by their design to formal design patterns) to implement patterns.
Personally, I'm advocating a model where the page itself has almost no logic and where the logic is in smaller parts. In this model, the controller is something that is on the page but it is not the page (think WebPartManager for an example).
# November 9, 2005 2:59 PM

Steve said:

Utterly fantastic. And boo-hoo to the naysayers, this is great work. I think what is most impressive is that it is all done declaratively like you mention, which is fantastic.

I hope to see a rich set of Atlas based controls (preferrably with drag and drop capability like the ASP.NET controls). Even better would be a good UI for interconnecting these controls.

Again, great work, it deserves some attention!
# November 9, 2005 10:10 PM

Danny Chen said:

Thanks for posting this. I'm going to start pointing all the forum Q's we get to this post. Maybe people will start picking up on this.
--
Danny
# November 10, 2005 1:42 PM

Scott Cate - Knowledge Base Software said:

I wonder what the market is like for the old XBOX all of the sudden :)
# November 22, 2005 6:23 PM

Julien Ellie said:

A few of us just had to show up for work this morning to get it :P Sorry about having to take off last night! Apparently the crowd at Best Buy was completly out of control...
# November 22, 2005 10:24 PM

bestcomy said:

# November 25, 2005 12:08 AM

Patrick Allmond said:

So is there a pro/con list or another thread discussing one approach vs another? i.e. Using the fancy shmancy new master page vs the classic "index.aspx?functionname=" approach? I am working on a new application and I was leaning towards master pages. But I am finding I am missing the functionality and some of the state maintenance of the "index.aspx?function=" approach.
# November 30, 2005 5:15 PM

Bertrand Le Roy said:

Patrick: they are two different things and do not exclude each other. Master pages are meant to provide a simple way to create templated pages and share common layout and/or logic between pages. The command in querystring approach is more suited to implement application logic and flow within one page. You can use both together or one or the other as you see fit. You can also use session when you need to maintain state across pages.
If you tell me more about your precise scenario, I can comment on it and tell you how I would do it (which would by no means be the "correct" way to do it, just my opinion).
# November 30, 2005 5:33 PM

Srikanth said:

Cool. Great Work!
# December 1, 2005 4:13 PM

stej said:

Hi, seems great..
Will you release this Alert for .NET 1.1? Or are there any limitations why it's not possible?
# December 2, 2005 2:18 AM

Bertrand Le Roy said:

It should be very easy to back-port to 1.1 (probably just change the script registering to the old APIs and recompile). Feel free to do it if you need it.
# December 2, 2005 1:48 PM

Raghu said:

Tried to run sample, fixed the following error, but once I click any button I get Page cannot be found - web page dialog, something is missing hear.

In the sample file Alert.aspx you forgot to add assembly in the register directive
<%@ Register Namespace="Microsoft.Samples.Alert" TagPrefix="ms" Assembly="Alert" %>
# December 2, 2005 4:34 PM

Bertrand Le Roy said:

That's true. Sorry about that. It's now fixed.
# December 2, 2005 4:40 PM

James Newton-King said:

I like your idea of trying to get the physical files last modified date to pass to Google.

I made my own version of this a couple of months ago but haven't had a website to release it on until recently.

Currently I'm letting the user set that sort of data in the sitemap file itself, but having the option to get the modified date directly from the file would be a nice option. Would you mind if I implemented it in what I made?

Here is a link to it (with the source) if you're curious:

http://www.newtonsoft.com/Products/GoogleSitemap/Default.aspx
# December 5, 2005 7:52 AM

Bertrand Le Roy said:

Feel free to modify what you want. I'll also add the possibility to add the Google-specific information directly in the site map file.
# December 5, 2005 2:41 PM

TrackBack said:

Scott about the handler and other SiteMap subjects
# December 5, 2005 4:44 PM

Plip said:

Great tip :)~
# December 8, 2005 5:30 PM

Nicolas Faugout said:

It work the same with String and Number.

(new String('foo')) == (new String('foo')) return false

(new Number(1)) == (new Number(1)) return false as well !
# December 9, 2005 9:44 AM

Srikanth said:

Building Number?!
# December 9, 2005 10:26 AM

Srikanth said:

Good One!
# December 9, 2005 10:38 AM

Bharani Mantrala said:

I clicked on the link in the post. Everything looks fine. One nice thing to have and I feel is a great feature is to have the address somewhere on the screen. I had to click on road view, zoom out to find the location.
# December 9, 2005 10:53 AM

Bertrand Le Roy said:

Nicolas: of course, you're absolutely right, but while it is relatively rare to instantiate strings and numbers through their object constructors, dates always are. That's what makes it trickier for dates than for strings or numbers.
# December 9, 2005 3:11 PM

Bertrand Le Roy said:

Building 42 (see the subtitle of the blog).
# December 9, 2005 3:12 PM

Fabien said:

What the hell are you doing at work today or posting here for that matter!?
Shouldn't you be playing your new 360?

Enjoy!
# December 9, 2005 3:42 PM

Chris Hammond said:

Congrats! Look for me on xbox live if you want sometime

christoc
# December 9, 2005 4:43 PM

Julien Ellie said:

So what's your gamertag?
# December 10, 2005 12:56 AM

Laurent Kempé said:

$379 for that bundle!!!!!
Here in europe it is more than 499 euro :-(
# December 10, 2005 3:31 AM

Andrey Skvortsov said:

Something wired about Atlas-it seems Atlas dosen't support xml two/one-way xpath data binding a'la Avalon,and it dosen't work with Indigo even through basicHttpProfile...
Is there any plans for some changes in these areas?

Thanks.
# December 10, 2005 6:16 AM

Wim Hollebrandse said:

Come accross the BSOD yet? ;-)
# December 10, 2005 12:59 PM

Jim said:

I. Hate. You.

:-)
# December 11, 2005 7:51 AM

Bertrand Le Roy said:

Laurent: of course there was a typo in the price. It's $479, not $379 of course. That would have been quite the bargain.

Julien: I'm BoudinFatal. I know, it's ridiculous :)

Wim: no BSOD. Works flawlessly. Smelled like hot metal in the first few hours, which kind of alarmed me but it's pretty common for new gadgets to smell a little at first and nothing bad happened. The power brick didn't even get nearly as hot as I expected having read some of the comments by first shipment buyers. I know lots of people who have a 360 and none of them had any problem. I really think these problems are uncommon but people who experience them are very vocal / listened to because of the whole blog phenomenon. Can't say I blame anyone for being vocal when they see that their hot new toy doesn't work after having waited in line for a whole night to get it, but a small percentage of defects is inevitable.

Jim: I know you do ;) Hope you get one soon.
# December 12, 2005 1:58 PM

Bertrand Le Roy said:

Andrey, xpath binding is currently not supported for the moment, mainly because xpath is not yet supported natively on all browsers we want to support. Still, you can bind a property to a data path using the dot notation familiar to ASP.NET developers.
Indigo interoperability exists as a prototype (and was shown at PDC during the keynote) but we're still working with the Indigo team to determine the details of the final implementation.
# December 12, 2005 2:08 PM

Andrey Skvortsov said:

Thanks for clarification,I posted about these problems on Atlas/Indigo forum but no one replied.It's always good to know what's going on.

Best wishes.
# December 16, 2005 4:54 AM

Andrey Skvortsov said:

Thanks,very interesting info;-)
# December 16, 2005 5:04 AM

Nicolas Faugout said:

I totally agree with the fact that the 'A' in AJAX is very important. But I'd like to add that there are ways to fake an 'unfrozen' UI. One that we use in our AJAX applications is to show an animated GIF with a message in front of the UI (ie Please wait...) just befor the Synchronous call. This way, the GIF (for example we take 'the little animation') make as if the UI was not frozen. Plus, we are sure that the user doesn't click anywhere because he can't. That's the good point about Synchronous calls that we like.
# December 16, 2005 8:28 AM

Dave said:

Synchronous Sucks. The first time I ever used an app that used xmlhttprequest object was back in 1999. It would fetch reports "Synchronously". Gosh, that was a terrible user experience. The browser would just freeze for 30 seconds.

# December 16, 2005 11:27 AM

Bertrand Le Roy said:

Nicolas, that's absolutely true and is the way to go. This way, you can even disable just the part of the UI that is dependant on the pending call and have an application that's still as responsive as possible in addition to the whole browser still being usable. Read more about this technique in Atlas here:
http://weblogs.asp.net/bleroy/archive/2005/12/01/432031.aspx
And read about an example of disabling UI declaratively:
http://weblogs.asp.net/bleroy/archive/2005/09/20/425698.aspx
# December 16, 2005 2:07 PM

Geoff Van Brunt said:

Headline: "Web Developer deep-sixes development project by pretending to know AJAX but making calls synchronously"

Translation: "Man accidentally shoots son in the head while teaching him hunter safety"
# December 16, 2005 2:43 PM

Bertrand Le Roy said:

Geoff, I agree with you so much it hurts. I just hope I made a good job explaining how this whole thing is a very bad idea. But you know, people just want that very much, so if that's what they want, here's how to do it... Maybe they'll realize how bad an idea it is after a while and when their users complain. Hopefully.
# December 16, 2005 3:09 PM

asynchronous dude said:

I have had just the opposite experience - using asynchonous on IE with its limited pool of concurrent TCP connections causes race conditions and deadlocks...
# December 16, 2005 3:43 PM

TrackBack said:

Didier Girard a la gentillesse de pointer vers ce post.
# December 16, 2005 4:09 PM

Bertrand Le Roy said:

Asynch dude: I think in all browsers, you're limited to two simultaneously open connections per domain. Is that what you're referring to? I've never seen that cause race conditions or deadlocks but if you have a sample repro I'd be happy to take a look at it. Contact me through the contact page of this blog.
# December 16, 2005 8:29 PM

sushi said:

Ok, so I'm one of the developers that wants to shoot myself in the head - and I'm starting to think that may not be a bad idea after receiving the following request. :)

I have a very unique situation however.
I have a request to implement a VERY complicated security scheme in an INTRAnet
business application. Depending on a users security profile, INDIVIDUAL items
on any given screen may be accessible but some may not be. The security profile
is data driven by the back end which uses an Active Directory like
schema to implement user and group securities. User security
and profiles are controlled by the end users that have
the Administrator Group OR Security Administrator permissions assigned to them. Any combination of individual or group permissions is possible. This means the
entire security scheme is dynamic.

I have only been able to think of two ways to implement this.

1) Use a client call back that uses an out-of-band RSP on the backend to check the
users permissons at the time the item is clicked. The client callback
responds accordingly if users don't have permission. If there is no permission,
an error window is opened telling the user they don't have permission to perform
the requested action and the requested action is cancelled. If the user has
permission, then the action proceeds. This worked very well in beta 2.0. Yes the
the browser was blocked, but the response time was always < 1 sec for either the
the error window to open or the original request action to proceed. Keep in mind
Im working in a known network environement where I know everyone is using the
latest version of IE.

2) When the user logs in, write a cookie with all of the user permissions in name
value pairs. Use javascript to navigate the name value pairs to see if the user
has permission. The rest of the actions are the same as number 1. The routine
for navigating the name value pairs would be complicated because of security
rollups in the form of groups.

Either way I'm looking at some sort of "synchronous" activity. If I could think
of a way to get this to work asynchronously I would do it that way. Number
1 was a much cleaner implementation. I also thought that it would
be more secure because security information was never stored on a
client. I can certainly see a way for a user to "hack" the cookies methodology. Any ideas?

Thanks for your help.
# December 17, 2005 8:44 PM

Pierre said:

Wow ... that's really Amazing ! Thanks Bertrand for the article ! :D
# December 18, 2005 3:34 AM

Bertrand Le Roy said:

Sushi: Thank you for taking the time to explain your scenario in details. Sure, synchronous programming is usually easier, I'm not denying that, but I see nothing in your description that necessitates a synchronous call. 2 is certainly not the only way to solve the problem and is not something I would recommend.
How about disabling the relevant part of the UI while the callback is going on?
# December 18, 2005 3:36 AM

sushi said:

Bertrand: Thank you for your response. I'm not sure I understand your suggestion clearly. Let's say a user clicks a link that takes them to an entire page they are not suppose to have access to. In the sycnronoush scenario, when the callback ran I returned a false to the click event. The error window opened and the action was cancelled. (e.g. similar to OnClick="JavaScript: return false;"). Asynchronously the link event is carried out regardless because it occurs while the call back is running. How would I disable the UI since the user already clicked it? I was hoping to avoid complicated page load scripts that disabled all of the relevant UI. In the synchronous scenario, I was able to use a custom class and all of the security code was encapsulated. I like your idea though - if you could give me a little more detail it would help a lot. BTW - I don't like option 2 either :). Thanks a lot!
# December 18, 2005 7:51 PM

dan said:

this who 360 situation is making me sick. A few friends of mine and I have been following the 360 for about a year. from the days of zenon (or however you spell it) up until the time magazine artical (which i have framed in my room) till now when i still cant get one. I did not have the money at the time to pre order last spring so i decided to take a risk and order from a somewhat sketchy site. Well, i didnt order it, a person was trying to do me a favor by preordering it. Unfortunatly this friend was not one of the ones following it and didnt know that any site claiming on getting 500 xbox's on the release date had to be a fraud. long story short, i tried camping at best buy but the employees cut the campers of at about 50 so i was not able to get in. Too bad for most of them that only 20 xboxs arived and 30 some odd ppl got sent home empty handed after over 24 hours of camping. well, now im stuck. From my parents and relatives i asked for games, a faceplate, controllers, live subscriptions and everything possible for xbox. Unfortunatly, i wont have a system under the tree on xmas. mabye i can try hitting my head with the controller i bought to make me forget about the 360. xboxless in New Jersey..... dan
# December 18, 2005 8:46 PM

Bertrand Le Roy said:

I see. I didn't understand you were using an event to cancel the normal operation of the link. Anyway, you have a security check on the target page, right?
Well, in that case you should not have the target url in the link initially. Instead, just navigate from the callback function, after the security check has returned, using window.location.href.
So it goes this way. The onclick event triggers a script that disables the UI and triggers the callback. When the server has given its response, the client callback function is called, which re-enables the UI and navigates if the user was validated.
One more thing: why does the server render these links at all? Couldn't it determine from the server side that the current user does not have access to it and directly disable or make it invisible? It's a frustrating user experience to have buttons or links on a page that you're not allowed to use.
# December 18, 2005 10:48 PM

Bertrand Le Roy said:

Dan, I empathize completely and wish you luck on getting your XBOX. Talk to your local retailers, be nice to them and try to get them to give you the date of their next shipment. This worked for me. I got mine from Costco.
# December 18, 2005 10:50 PM

sushi said:

I agree. IT seemed logical at first to make the links invisible or disable them. However - there are numerous functions on any given page that would have to be enabled/disabled. I chose this implementation due to performance considerations at the time the page loaded. I saved numerous transactions becuase the security check was only performed when the action was clicked. I considered breaking up the UI - however this would have created a broken/difficult navigation interface. It would be like breaking up XP. Navigation links are not the only things that have security. For example - some users may be able to view data, but not change it. This means at load time all of the edit/insert buttons would have to be disabled on the screen within every single grid or form view. Or I could have had two screens. One with edit capability the other without. However, that means having two screens to maintain. A change on one screen forces a change on the other. The two would at somepoint diverge. It would also create a source code difficult and time consuming to update.
As it stands now I can implement security on anything that is clicked by just adding
a single JavaScript call to the OnClick or OnClientClick event handler of any clickable object. I also gained screen consistancy. How would I disable the edit linkbutton in a gridview after the user clicked it? Is there a way for the JavaScript call back event to put a gridview into edit mode on the proper record?
# December 19, 2005 2:25 PM

Jackson said:

Hi All,
I'm not too sure if It's just me or VWD Express. But when I try to incorporate this sample in to my application, I can NOT get the 'ms' tag to appear in the intellisense and when I try using <ms:alert></ms:alert> tags I get an error "Validation (Internet Explorer 6): Element 'ms' is not supported"

Basically, I'm taking these steps:
1. copy the Alert.dll (and I've tried copying everything else as well) to my bin directory.
2. Then referenced the .dll through the "Add references..." dialogue.
3. Added the registery directive "<%@ Register Namespace="Microsoft.Samples.Alert" TagPrefix="ms" Assembly="Alert" %>"

Still can't get it going .... maybe someone can show me the error of my ways.
Cheers!
# December 20, 2005 5:15 PM

Bertrand Le Roy said:

I don't know how often permissions change, but you could cache the security information server-side and solve that performance problem.
About grid linkbuttons, they are going to post back anyway if the security check succeeds, in which case you'll have to re-check the security (the request could very well be forged).
So with your solution, in the success case you have:
- two network requests (one for the security callback and one for the postback)
- two security checks
In the deny case, you still have one network request and one security check.

If you removed the callback from this button and only did the security check during the postback, you'd have only one network request and one security check in both cases. It seems like this is the way to go.

There is currently no way for the JavaScript callback to put the grid in edit mode. You need a postback for that.
# December 20, 2005 5:24 PM

Bertrand Le Roy said:

Jackson: Is the problem only in the designer or do you also have a problem at run-time?
# December 20, 2005 5:26 PM

Jackson said:

When I try to use these new tags. They are NOT available through intellisense and If I manually type it in, they are underlined with the red 'sqiggly' line. Which displays an error automatically and prevents me from starting the application/debugger.

Now I'm fairly new to ASP.NET, so I don't know if I am adding the .dll reference correctly or if the issue is with my designer, Visual Web Developer Express.

Thanks for your help Bertrand.
# December 20, 2005 5:39 PM

Bertrand Le Roy said:

You may still run the site using CTRL+F5 from VWD. This should start the web site and open a browser on it even if there were compilation errors. Then you can see what happens at runtime.
# December 20, 2005 5:44 PM

Jackson said:

The site won't compile and gives the following errors:

"Request for the permission of Type 'System.Web.AspNetHostingPermission, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed."

"Element 'Alert' is not a known element. This can occur if there is a compilation error in the website"

Note: This error is not specific to my application. I opened a new blank project and get the same errors.

Do you have an email address I can forward a copy of my test project to? Maybe diagnosing the problem will be easier if you can see it, first hand. Cheers.

-Jackson-
phluong@hotmail.com
# December 20, 2005 6:10 PM

Bertrand Le Roy said:

Yes, it seems like you have a more general problem in your web server setup. If a blank project does not compile... When you say blank, you mean completely blank or blank except for the alerts dll in the bin folder?
You can e-mail me at bleroy (at Microsoft.com).
# December 20, 2005 6:26 PM

Steph said:

I do understand your concern, however what to do if - for example - a user refresh a combo box content from picking a value in another combo box?
This is a simple example where asynchronous can lead to a mess at your server side.
The user select something in the combo, nothing happens within 2/3 seconds. So, the user gets nervous and selects again the value, or another one, and so on...
Resulting in tons of request on your server...
Are you sure you want to stay asynchronous?
I do prefer to freeze one or two browsers rather than killing my server...



# December 21, 2005 11:58 AM

Bertrand Le Roy said:

Steph: You absolutely want to stay asynchronous in this case as well, but as I said, you should disable the relevant UI (in this case the first combo) while the callback is going on. And you should give visual clues to the user as to what's happening (like a "loading" message).
# December 21, 2005 2:05 PM

TrackBack said:

Nikhil's post on the December CTP
# December 23, 2005 2:54 AM

Pierre said:

Just curious : would you have some demo applications of what Atlas can do ? Thanks !
# December 23, 2005 8:05 PM

Bertrand Le Roy said:

Pierre: Sure, check this out:
http://apps.nikhilk.net/VirtualPlaces/

We also have a Wiki application, but it's not yet in sync with the December release of Atlas.
# December 24, 2005 3:32 AM

arvind surana said:

How does the RaiseBubbleEvent() of control class C invoke the OnBubbleEvent() of its parent control class when we know that OnBubbleEvent() is protected member
# December 28, 2005 4:07 AM

Bertrand Le Roy said:

I think you're making a confusion: an instance of a class can call a protected method on other instances of the same class.
# December 28, 2005 4:19 PM

TrackBack said:

Scott on confirmation from inside a GridView.
# January 3, 2006 7:59 PM

Azra said:

You add a tape recorder in?
# January 7, 2006 5:57 PM

Wim Hollebrandse said:

Err...you decided to put a mod chip in? ;-)

Problems with overheating?
# January 7, 2006 6:53 PM

Wallym said:

Its turned the wrong way?

Its broken?

You had laid it flat and had something on top of it?
# January 7, 2006 7:05 PM

BrandonFurtwangler said:

looks like you spilled Tang on it and had to throw away the face plate.
# January 7, 2006 8:23 PM

Chris Hammond said:

Cause you got a new faceplate?
# January 7, 2006 8:54 PM

Travis said:

No, why? Tell me before I pick one up. Planning on it when they become available at the local Walmart.
# January 7, 2006 10:04 PM

Dror Engel said:

i think you baought PS3 faceplate :)
# January 8, 2006 2:59 AM

Brian Scott said:

You are painting your faceplate.
# January 8, 2006 12:49 PM

Chris Hammond said:

well that would mean you are customizing your faceplate. Cool.
You just inspired me, I think I may go paint my OEM faceplate this afternoon.
# January 8, 2006 3:21 PM

chris hammond said:

Wow, that's far more indepth than I had imagined!
# January 9, 2006 11:43 AM

Ziolrooski said:

really nice job!
# January 14, 2006 10:27 AM

Robin Debreuil said:

Yeah, really love it too, those colors really work well. And hey, your drawings aren't bad either. Inside every programmer is an artist trying to get out. Or something like that : ).
# January 17, 2006 1:45 AM

mike said:

You appreciate, I hope, that cultural references in documentation are highly discouraged due to problems with localization. This one is benign, I would guess -- the string can safely be meaningless without the cultural context (although what's a reader to make of a meaningless error string?). But the general rule (unfortunately, perhaps) is that bland is best. In fact, one occasionaly hears the verb "to blandize" to describe the process of removing "interesting" stuff from examples.
# January 20, 2006 12:29 PM

Bertrand Le Roy said:

I do, Mike, that's why I thought it interesting to find this "unblandized" sample. The reference here is actually quite subtle, which probably explains why it wasn't spotted.
# January 20, 2006 1:54 PM

Patty said:

Alright, obviously (please don't make fun of me) I'm a newb. I just bought my 360, how do u take the faceplate off, and to a newb, how hard is it to install a silent fan system.
# January 22, 2006 1:35 AM

Bertrand Le Roy said:

Gently insert a flat screwdriver's head between the plate and the console on the top, and then very gently pull the plate towards you. It should give fairly easily. If you're careful, you should be able to do that without breaking anything.
About installing silent fans, I'd love to do that too, but I don't want to void my warranty. If you really want to do that, I guess there should be tutorials on the web. Just Google it.
# January 22, 2006 3:42 AM

TrackBack said:

His post contains link to interesting and related samples.
# January 24, 2006 5:41 PM

Pierlag said:

Trop bien ;)
# January 25, 2006 4:49 AM

Wim Hollebrandse said:

I guess the explanation for this is down to one thing:

Loose typing.
# January 26, 2006 7:26 AM

Aapo Laakkonen said:

Another workaround:

Use strict equality operators: === and !==.
# January 26, 2006 7:30 AM

Aapo Laakkonen said:

Yet another workaround for older browsers (IE4 and below and old netscape browsers):

((typeof("") == typeof(0)) && ("" == 0))

And why it's like that:

http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Operators:Comparison_Operators
# January 26, 2006 7:43 AM

Ron Buckton said:

== In javascript is a lazy comparison operator and makes an effort to normalize the values before the comparison. If you want a strong comparison operator that also compares types, use ===. This is the strict equality operator.

""==0 // true
""===0 // false
# January 26, 2006 9:44 AM

Alan Oursland said:

Here is a theory:
An empty string is a length 1 array containing '\0' (which is equal to zero). Javascript automatically casts single length strings to characters and vice versa. '\0' == 0 therefore "" == 0.
# January 26, 2006 12:02 PM

Bertrand Le Roy said:

Loose typing is not enough to explain it: Javascript could very well just do the implicit cast to bool only in a boolean context. Instead, it's booleans that are converted to numbers.
Thanks for all the workarounds, which are of course better than the toString thing.
Updating the post.
# January 26, 2006 12:18 PM

Christian Wenz said:

if you do PHP a lot, you get used to these built-in type conversions ... :-)
# January 30, 2006 11:56 AM

Eric Lippert said:

> If anyone has a reasonable explanation for this, I'm all ears.

This is a consequence of two simple rules.

1) When comparing a string to a number, convert the string to a number.

This makes more sense than converting the number to a string. After all, you would like "1.010" to compare equal to 1.01, right?

2) Empty or all-whitespace strings convert to zero.

This is maybe a little more borderline weird, but it makes some sense.

Once you have these two rules in place, 0 == "" --> true is an obvious consequence.

>Oh, and about a workaround... You can use toString() on both sides of the equals operator once you've checked that they are not undefined or null.

A better workaround is:

a + "" == b + ""
a - 0 == b - 0
!a == !b
a === b

which force string, numeric, boolean or strict comparisons respectively.

> changing it would have been a breaking change so they had to add the === operator to finally get it right

No, the === operator was added because strict type comparison semantics are necessary to implement a sensible switch statement, which was not in the original Netscape version of ECMAScript. It would be really weird if you could create a switch statement but not the equivalent series of if statements, so we added a strict type equality operator.
# January 30, 2006 1:20 PM

Bertrand Le Roy said:

Eric: Thanks for the comment, I really appreciate, and as I've said, there are things I really do love about Javascript. I understand all that (and have actually included one of the better workarounds), but I don't think it qualifies as a reasonable explanation, it just reinforces the idea that the need for strict comparison was an afterthought and that's how the == operator should have worked from the start (that's how it works in some other dynamic languages).
I just don't see any good reason to use == in place of === except to save one char as === always just does the expected thing.
# January 30, 2006 2:10 PM

karl said:

What's the perception from the ASP.NET team on how interested the developer community is in Atlas? Personally, I’m extremely apathetic about the technology and the hype around it. Since the day Atlas was announced, it’s always seemed like an un-innovative attempt to catch-up. Of course, there’s still plenty of confusion about what Atlas is and why you’d want to use it versus client callback (man, is that still around?) and other 3rd party AJAX providers (Ajax.NET, MagicAjax, …). I played with the PDC bits, and was thoroughly put off by the declarative programming samples – it burdens the development process and seems like an “oh isn’t this cool” when it really doesn’t have anything to do with the problem space being solved.

You and I talked at TechEd. I was writing the AJAX.NET documentation and wanted to bounce some ideas off you about client-callback and ajax.. At that point, Atlas wasn’t publicly known (not sure if it was internally known, since client-callback was still the in-thing). Frankly, the ASP.NET team seemed totally disconnected about the topic, and to this day continues to go down an unclear path.

On July 14th you had a wonderful post titled “Some thoughts about server callbacks and Ajax.NET”, in which you identified a possible alignment issue between the ASP.NET team and average developers. To me that should have sent a red flag to Scott and crew, but I’ve never really seen the topic followed up. If you guys think of things one way, but “most users” think differently, then there’s a problem. What checks have been introduced since callbacks to make sure Atlas is better aligned?

To be fair, my exposure to Atlas hasn’t been great. The problem is, I’m not really sure why I need to bother with it. I just don’t see what added-value Atlas will bring to my already-rich XmlHttp toolset. I realize that part of Atlas is another prototype (prototype.conio.net), and that’s great (assuming I don’t want to use prototype for some reason).

About the article, parts of it deserve to get slashdotted and ridiculed. JavaScript isn’t OO? No exception handling? No inheritance? Googling any of these terms “javascript object oriented”, “javascript exception handling” and “javascript inheritance” results in a number of useful hits. There are other quote-worthy things in that article.
# February 2, 2006 9:53 AM

Bertrand Le Roy said:

Karl, you know what? I think your feedback deserves a full post. I'll do that in a few minutes.
# February 2, 2006 2:16 PM

foobar said:

Atlas is one of the most glorious things to come out of the ASP.NET dev team.

It's simplicity is simply amazing. There's so much tedium saved when using the paradigm provided by Atlas. The lone fact that code-behind usually never needs to be touched is a testament to how encapsulated Atlas is.

Compared to all of the other solutions I've seen, Atlas is the most feature complete and definitely the least intrusive in terms of modifying existing code.

Keep up the good work.
# February 2, 2006 5:01 PM

scottgu said:

Here is a sample of using the <atlas:updatepanel> control with the December CTP to build a Task-List application that is Ajax based and enables paging, sorting, in-place editing and RSS feeds in ~40 lines of server code and 0 lines of client-javascript: http://weblogs.asp.net/scottgu/archive/2005/12/26/433997.aspx

You can download it and play with it locally if you have either VS 2005 or Visual Web Developer installed.

Hope this helps,

Scott
# February 2, 2006 5:22 PM

blowmage said:

What really frustrates me about the Atlas libraries right now is that it seems to be very difficult to do what is so easy in other libraries. I guess I'm speaking specifically of behaviors. I want to drag an item, any item, (not necessarily a list item - it could be any element) and when I drop it I want it to *revert* to its previous location.

And then I want to know if it was dropped on an element I care about so I can handle that event.

Here is the code from the "drag-and-drop" section on the script.aculo.us web site (http://script.aculo.us/):

<img id="product_1" class="products" src="images/product-1" alt="mug">
<img id="product_2" class="products" src="images/product-2" alt="t-shirt">
<div id="shopping_cart" class="cart">
<img src="images/drag-here" alt="">
<div id="shopping_cart_text">Drag all the stuff you ever want right here.</div>
</div>

<script type="text/javascript" language="javascript" charset="utf-8">
new Draggable('product_1',{revert:true});
new Draggable('product_2',{revert:true});
Droppables.add('shopping_cart', {
accept: 'products',
hoverclass: 'drophover',
onDrop: function(element) {
$('shopping_cart_text').innerHTML =
'Dropped the ' + element.alt + ' on me.'; }});
</script>

I wouldn't mind writing the script code declaratively, but I don't want to write my own controls implementing IDragSource and IDropTarget to do this either. I just want to wire it up and have it work. So right now it seems Atlas is solving problems I don't have, and makes it difficult to solve problems I do have.
# February 2, 2006 5:29 PM

Bertrand Le Roy said:

Blowmage: I don't know the Atlas drag & drop feature too well so I can't provide you with a solution from the top of my head but I'll ask around.
Maybe you can tell me exactly what your scenario is and what you feel is missing. From what I know we can handle html elements (like your sample is doing) or arbitrary data so I doubt this sample could not be reproduced with Atlas.
I'll get back to you when I have an answer.
# February 2, 2006 5:41 PM

blowmage said:

Thanks Bertrand. I also don't doubt that Atlas can't deliver the same result, but the question is how? And how much effort is involved? I investigated the November release for quite a while, and the "right way" to use Atlas seemed to be to write new IDragSource and IDropTarget controls to achieve the desired result. I found this to be too much effort for (rapidly changing?) pre-beta scripts and went with the solution I've already written using prototype/script.aculo.us.

If you, or anyone else, could show an Atlas version of the previous code snippet that delivers the same result I will gladly dump prototype/script.aculo.us in favor of Atlas for the project I'm working on.
# February 2, 2006 6:08 PM

Wilco Bauwer said:

Blogmage: you should be able to do something similar already using Atlas. In fact, Scott Guthrie did something similar in his keynote demo at PDC05 (declaratively).

Anyway, I believe the DND API in Atlas is flexible enough to allow for all sorts of scenarios - from floating elements to drag/drop between zones to drag/drop between external applications (IE-only). However, the current behaviors that use these API's don't integrate that well with the other controls which makes it a bit difficult to do anything useful with it.
# February 2, 2006 6:08 PM

Bertrand Le Roy said:

You know, that's exactly the kind of feedback we need. If a feature is not covering your most common scenario except by having you jump through loops we want to know and we'll make that better.
I'll definitely follow-up on that and either post an equivalent sample or make sure this is addressed in a future release.
# February 2, 2006 6:11 PM

Graham Dyson said:

Personally when I installed the first versions of Atlas, had a quick look and couldn't see how I would ever make productive use them. But from reading this blog and being a page and control developer myself I took them for what they were, a prototype.

The newer stuff is fantastic and is coming from a much better angle. The openess of how your developing it is giving it a user focused direction. I can see how I'd use them directly in alot of the web applications I'm working on and give massive benefits to my users expriences.

Keep up the good work lads!
# February 3, 2006 7:28 AM

Lukas Peyer said:

As far as i know there is no drop event in Atlas DnD by now, but promised for the next release. So we have to be patient until we can use simple declarative Drag n' Drop within Atlas.
Definitively looking forward to that too.
# February 3, 2006 12:35 PM

karl said:

Damnit, burnt on the first point :) I was sure it was you, oh well.

I never said I was right (well, except for the declarative part ;) ), but I did think my perception might be shared by others. I haven't given Atlas a fair chance, and that's part of what bothers me - normally I'm an early adopter and excited about this kinda stuff, but somehow Atlas hasn't managed to float my boat as it were.

When I get some spare time, I _will_ take a thorough look of Atlas and hopefully use my skillz to help others see the light I'll hopefully find :)

Cheers,
Karl
# February 3, 2006 12:38 PM

Steve said:

I have a sample:

Today, I needed to validate that a value was entered into a textbox if a radiobutton list item was selected in a radiobutton list. I explored the validation controls but they didn't help me much since the customvalidate accepts just a client side function name, without parameters.

I first off had to have the client side code in a .js file for easy debugging.

But ASP.NET gives control id's - so I had troubles using javascript 'getElementById'. Since I couldn't pass the clientid to the customvalidator I got stuck.

The whole time I was working on this issue, I thought 'I wish Atlas could solve this because I really don't like generating javascript code'

# February 4, 2006 12:41 AM

Bertrand Le Roy said:

Steve: I'm not sure what you're trying to do here. Are you using ASP.NET validators or Atlas validators?
You can get the client id from the server control by looking at its ClientID property.
# February 4, 2006 12:53 AM

Bob Campbell said:

In all fairness to the consultant/journalist, Eweek and Karl, part of what is being discussed here comes directly form the "Understanding AJAX Applications and ASP.NET 'Atlas'" document that is part of the Atlas Hands-On Lab vsi. The document states under the AJAX Technical Concepts section "...Furthermore, because JavaScript is not an object-oriented programming (OOP) language, it does not have strong typing, namespaces, exception handling, and other OOP features." Note: the hands on lab is great.

Bob
# February 4, 2006 10:18 AM

Steve said:

ASP.NET creates its own id at runtime - that is some of my problem.

I haven't tried the Altas validators yet - I will give them a go.

Thanks!

Guess my overall question is - will Atlas satisfy my client side needs or is it just about 'ajax' ?

I'm a huge fan of C# - not a big fan of javascript - but I love the results of good client side code
# February 4, 2006 6:42 PM

Bertrand Le Roy said:

Bob: that's a good point. The hands on lab document is wrong too, then.

Steve: I'm still not sure I understand the problem here. Did you try using ClientID? Yes, Atlas is much more than just Ajax: it's a complete client-side framework and not just a communication infrastructure.
# February 4, 2006 8:13 PM

Steve said:

ClientID?

Yes, in my .js file I try to get the id - but the ID is not the Id of the control as I put in the page.

ie.

I get some ctl01_<name of control>

This 'ctl01' is not my id and there is no way to know that id from my .js file.

I don't put script in my pages since I can't easily debug my scripts.

Also - I can't pass the id when I use a customvalidator - there is no place for parameters, all you can you do is specify the client side function.

How do I under how this new framework works for javascript? All I've seen is typical javascript with calls to web services with JSON.
# February 4, 2006 11:24 PM

Bertrand Le Roy said:

As I've said before, you can get the client Id server-side using ClientID, but you don't even need to do that. The client-side custom validation function has a signature that enables you to get a reference to the element and arguments: function(sender, args). The arguments have a Value property and an IsValid property. Please read that article:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemWebUIWebControlsCustomValidatorClassTopic.asp
# February 6, 2006 2:09 AM

Steve said:

Betrand, I'm sorry but you can't get the clientid in your javascript, it's dynamically created at runtime.

Maybe your misunderstanding my post, but everyone knows this issue where ASP.NET generates id's at runtime that are not the same as the id you set, especially when the control is 'inside' another structure.

As far as the validator, it only gives you the control itself, but if you want to check the value of a different control to against that control , you can't pass get a handle on it. The only reason again that I would want to do this is because you can't access the generated clientid.

I know the <%= control.clientid %> - but this does not work unless you put the javascript in the aspx page, which I don't - it's in a separate .js file.

Again, I don't want the client id on the server side, I want the id of the control in the javascript code.

ie. I have a radiobuttonlist and a textbox. Based on whether a valid is selected in the radiobuttonlist determines if the textbox is required. ie. selected value 3 in the radiobuttonlist requires text in textbox. Therefore, my validator needs to know both the radiobuttonlist clientid and the textbox clientid in the javascript. But, instead of id's of 'TextBox1' and 'RadioList1' it's something like 'ctr01_TextBox1' and 'ctr02_RadioList1". (This really poses an issue if you add a new control because it can change this dynamic id).

Surely you understand this?

# February 6, 2006 8:28 PM

Steve said:

Here is another issue - when you use anything in ContentPlaceHolder:

it doesn't use the id of, ie' TextBox1 - it uses ctl00$ContentPlaceHolder1$TextBox1 as the client id - which you would have to use this second name in the .js file and hope it doesn't change.

I'm encountering this with the previouspage cross post:

TextBox txtName = PreviousPage.FindControl("txtName") as TextBox;
TextBox txtName2 = PreviousPage.FindControl("ctl00$ContentPlaceHolder1$txtName") as TextBox;


The first one above doesn't work - I have to use the ASP.NET generated id instead.
# February 7, 2006 11:57 AM

Steve said:

I have discovered the problem:

Master pages.

When I use regular pages, the clientid's work fine.

When I use master pages - ie. a cross page post it changes or rather creates it's own id.

TextBox txtName = PreviousPage.FindControl("txtName") as TextBox;
TextBox txtName2 = PreviousPage.FindControl("ctl00$ContentPlaceHolder1$txtName") as TextBox;

The top example fails, the second works with a master page.
# February 7, 2006 12:24 PM

Bertrand Le Roy said:

Steve: Server-side, when you want to use FindControl to find controls that are in any kind of naming container, don't call Page.FindControl, use the container's version of FindControl. So in your second scenario, you'd get the master page from the previous page and then find the control from there. Same thing for a panel or any container control.
For your validator control, the way most people do this is by creating their own validator class and adding it a property for the second control's id. At pre-render time, the new validator control will have to register a startup script that initializes a small javascript structure that the validator's js file can find from its own id and then lookup.
To be clearer, the validator generates something like ClientID + "_secondControlID = \"" + FindControl(SecondControlID).ClientID + "\";"
The validator script evals its own id + "_secondControlID", and the result is your second control's client id, which can then be obtained using getElementById.
The FindControl here may be replaced with something that looks up the naming container chain so that it works inside repeaters and other containers.

But here's something I'd like to ask you: this is completely off topic and is polluting the comments thread. Furthermore, I see that you've posted similar questions on Nikhil's blog on a post where it is equally off-topic. Next time, please contact me directly through the contact page of this blog or ask your question on the relevant forum on http://www.asp.net.
# February 7, 2006 1:30 PM

Steve said:

The issue was concentrated around this topic and did get off topic, my apologies.

The main question and details I was looking for was about this:

"Yes, Atlas is much more than just Ajax: it's a complete client-side framework and not just a communication infrastructure. "

My example was really about the integration between writing javascript and accessing the controls on a page. It's in this whole setup that I would like to learn more about how Atlas will help on this.

My example was sideswiped by conversations on 'clientid' when actually that is the point of my question: it's these type constructs when working in javascript that I hope Atlas addresses.

I'd like to see more talk and conversation about this client-side framework and less about the communication infrastructure. I think the closest I've seen is on Nikhil's talk on behaviors. It seems more oriented toward 'control developers' than page developers.

This is not a complex sample, but I was working with the ASP.NET Menu control yesterday and I noticed that when you select a menu item that the page does a postback. The page also has a submit button. I'd like to be able to have the menu not do a postback but still be able to pass me the selected value before submitting. Unlike last time with validators, don't get caught up in the details - because what I'm asking is - will Atlas be the approach to take for this type of senario? Or do I need to, ie, attach attributes to the menu items and store values in hidden fields?

I'd like for Altas to make it a rich experience in the UI without all the javascript - mostly because I'm more of a C# developer who is asked many times to provide a richer interface that requires javascript. With Atlas I see a solution.

Again, sorry to go off topic, but I think it's really on topic because it shows the 'work arounds' required to do something as simple as accessing a control id through a DOM.
# February 8, 2006 7:37 AM

Bertrand Le Roy said:

Steve: Sure, I see your point here. Typically, an Atlas aware server-side control will generate xml-script instead of all the JavaScript that's needed today, like in your validator example, which should be much cleaner. But in essence, the solution is not that different: you have a js file that contains the definition of your client-side behaviors, html and something that glues the two together. In ASP.NET 2.0 you had ad-hoc JS functions in the js file, and javascript code to do the glue. In Atlas, you'll have classes in the js file and xml-script to glue. It will be much easier to generate the glue from the server-side than when you had to come up with hacky JS like I described in my last comment.
I'll try to write more posts on the client-side framework as it can be used by page developers.
For the menu control, you can already prevent the postback by using NavigateUrl with the javascript: protocol. It's not an ideal solution but it gets the job done and it's fairly simple. An Atlas Menu control would be best here, but we don't have that yet.
C# developers who want a richer web experience without the JS are a primary audience for us. Rest assured that will show in the final designs for Atlas.
(and I think we're back on topic now, thanks).
# February 8, 2006 1:28 PM

Rick Strahl said:

Yeah me too. I was out Windsurfing on one of the biggest days of the season with 20+ foot swell faces and there were only a few people out. Gotta love all those couch potatoes for making way...

Football? What is this goofy sport anyway? <g>
# February 8, 2006 4:51 PM

blowmage said:

I agree, I love that presentation style. So much better than death-by-PowerPoint! The first time I saw this style was at RubyConf 2005. I gave a 90 second, 20 slide presentation at my local .NET user group last month using a similar method.

Jim Weirich has a great Ruby on Rails presentation using a very similar presentation method. You can find here:

An Quick Introduction to Rails
http://onestepback.org/index.cgi/News/IntroToRailsMovieAvailable.red
# February 10, 2006 8:07 PM

Chris Brogan... said:

Bill- I absolutely LOVED this presentation, but what you've gotta appreciate is this: the first time I learned of it, I *heard* the presentation on the podcast ITConversations. Can you imagine? I was blown away in AUDIO ONLY. When I finally got to see what the crowd saw, I wanted to BE Dick Hardt. And now, with his slideshow, I CAN! Muahahaha. Oh. Sorry.

--Chris of [chrisbrogan.com]
# February 15, 2006 9:43 AM

Maestro said:

I would like to see better javscript library support for those of us who are willing to brave the big bad world of javascript. (perhaps even explore the use of prototypes for code organization??? the current javascript code looks aesthetically like shit, as I'm sure you know) Also I would like to see JSON added to Atlas (or something JSON-like) utilizing full .NET attribute support etc. Also there are some timing bugs in the XMLHTTP wrapper code that occasionally delay the execution of synchronous calls till after queued asynchronous calls instead of right away. Give us lightweight optional tools like JSON, not heavyhanded all-encompassing "solutions". Otherwise, looks good.
# February 20, 2006 6:47 PM

Bertrand Le Roy said:

Maestro, we ARE providing better OO support for JavaScript (namespaces, interfaces, enumerations, etc.) and we ARE using JSON on the wire (there are JSON.serialize and deserialize methods client and server side) so I'm not sure what you're referring to.
Also, the bug you're talking about seems to be coming from most browsers only allowing for 2 simultaneous connections to the same domain but it could also be the batching code that we have in place that will become optional in future releases. But without more details, it's hard to tell.
# February 20, 2006 6:53 PM

Alan Oursland said:

I think this is especially error prone since it lets you put the var keyword in front of each "declaration". I don't know really know the full semantics of "var". I know that it declares a symbol to be a variable and that it is optional, but it seems like it might be useful for it to give some warning if you use it on a symbol more than once.

Python uses the same scoping rules as JavaScript. It might have something to do with syntax associated with weak typing. Because you do not actually have to declare variables, there isn't a good way to tell when you want a new variable or reuse an old variable. So you have to attach the scoping rules exclusively to code blocks.
# February 24, 2006 3:41 PM

Bertrand Le Roy said:

If you turn on strict mode in Firefox (which I recommend to all JS developers out there), you do get a warning for multiple declarations.
I think you're right. I'm also suspecting that it has to do with the very nature of dynamic languages but the exact precise reason why they could do it for function blocks and not other kinds of blocks eludes me.
# February 24, 2006 3:44 PM

Edgardo said:

Ehm, where is the weirdness in this? C# works exactly the same, nested if blocks use the same scope.
# February 24, 2006 7:01 PM

Bertrand Le Roy said:

Actually, C# won't let you compile that. BUT a variable is not accessible outside of its scope. This:
{
int x = 1;
Response.Write(x);
}
Response.Write(x);
will not compile, whereas JavaScript would be perfectly happy with it and write 1 twice.
# February 24, 2006 7:25 PM

James Newton-King said:

I have been bitten a number of times using "i" in nested for loops without realising it. The inner loop overwrites the value of the outer loop.
# February 24, 2006 7:29 PM

Aby Mammen Mathew said:

I am not sure how effective AJAX is, basically you need two things - 1. Asycnhronous mechanism
2. XML feed

however I noticed most efforts using javascript are reinventing the wheel which java had already designed and built. why can't we just have a control that provides just the above two artifacts and have java component meddle the dynamic aspect.

Second thing I noticed is there is no code signing for javascript libraries, hence any garbage can be fed on the uplink.

This weekend i am going to take a good look at this AJAX nonesense.
# February 24, 2006 7:30 PM

Bertrand Le Roy said:

Way to go. Just start with the assumption that it is nonsense...
Seriously, Java is out of the question for a number of reasons, the most obvious being that it's not installed on all machines. The goal here is to be able to easily build rich applications on just a modern browser using HTML and JavaScript without any optional plug-in.
Do you have a scenario where the lack of code signing is a problem?
# February 24, 2006 7:39 PM

Brian said:

Here is another weird thing:

function what()
{
for(x=0;x<5;x++)
{
alert(x);
t();
alert(x);
}
}

function t()
{
x = 12;
}

In IE I know you you'll get "alert(0)" then "alert(12)" and it will exit your function.
I have run across this a couple times when I have a function that is calling another function that uses the same variable without the "var x;".

That has bit me in the butt a couple of times, if you don't "declare" your variables.
# February 24, 2006 8:06 PM

Bertrand Le Roy said:

Brian: I don''t think this one is especially weird. It *is* a bug factory, yes, but you need a way to reference global variables so this is more or less needed.
If you run this in Firefox in script mode, it will issue a warning for the use of an undeclared variable, which really helps avoiding this kind of problem.
# February 24, 2006 8:10 PM

Scott said:

Bertrand,

Execution scope in Javascript is pretty hard to get used to. Especially when using the 'this' keyword. I've got a couple of links that saved me from having to read teh ECMA spec.

Private members in Javscript: http://www.crockford.com/javascript/private.html

Closures in Javascript: Explains execution scope and how closures work. http://jibbering.com/faq/faq_notes/closures.html

Javascript closures took me a long time to understand, I'm still not sure I really understand how they work. But I'm getting closer to understanding.
# February 25, 2006 12:25 AM

Steve said:

More good reason to have a client side version of C#.... :)
# February 26, 2006 12:06 PM

chris hammond said:

Oh my brain hurts. I never did well in physics in college :)
# March 1, 2006 12:03 PM

Richardc said:

Ca y'es, c'est reparti ;-)))))
# March 1, 2006 3:10 PM

Richardc said:

Mais j'ai oublié: ca fait d bien dans ce monde de brute!
# March 1, 2006 3:10 PM

Pierre said:

# March 1, 2006 9:02 PM

steve said:

the link to the power plant doesnt work
# March 3, 2006 10:13 AM

Bertrand Le Roy said:

Yes it does. It's just that this article hasn't been written yet.
# March 3, 2006 1:26 PM

Roger said:

Of course they would. Tides are caused by the interaction between the Earth's rotation and the gravitational pull of the Moon. The tides themselves introduce friction into this system and dissipate energy because of their drag on the coastlines and ocean floor. Even without any tidal power plants the tides are slowing the earth's rotation and causing the Moon's orbit to recede. However the effects are so small it takes thousands of years to be noticed. Tidal power plants would increase this effect in a microscopically small way.
# March 3, 2006 2:50 PM

Bertrand Le Roy said:

Sure, I think that's what I was trying to say. You make a good point on the fact that the Earth has the same kind of energy dissipation on water and rock that synchronized the Moon's proper rotation with its orbit. That effect is probably huge when compared to what tidal plants could do.
# March 3, 2006 3:01 PM

uber1024 said:

Rotation is overrated anyway.
# March 4, 2006 4:55 PM

DetroitJ said:

While this is an interesting topic for a discussion, you have the tail wagging the dog. The moon does not orbit the Earth because of the tides. Even if the power plants were to absorb all of the tidal energy in the sea it would have no impact on the moon's orbit. Furthermore given that the mass of water on the earth compared to it's mass as a whole is so small the effect if any would be negligable.
# March 6, 2006 2:54 PM

Bertrand Le Roy said:

DetroitJ: I never said the "moon orbits the Earth because of the tides" but tidal energy is gravitational energy and if you pump it it's going to have an impact on the relative movements of the Earth and Moon, it's plain simple energy conservation. And I think I made it quite clear in the conclusion of the post that these effects would be negligible...
# March 6, 2006 4:01 PM

Walt Lounsbery said:

First, I'd like to see a proof that the so-called tidal effects in the Moon's crust made it rotate faster or slower. What was the original rotation rate? Why? I have seen theories that the Earth and Moon split apart early in their evolution, which would require synchronized rotation as an initial state (although conservation of angular momentum would make the moon speed up a bit on separation as it coelesced into a sphere). Is the current theory about the origin of the Moon any different?

All seriousness aside for a moment, you should be a lot more concerned about the damming of the natural rivers of the Earth. Those lakes and powerplants have got to be ruining things. I'm pretty sure of it. And those Segways. Zipping around on electric thingies is just not natural. If all the Segways started driving in the same direction, it would totally screw up Daylight Savings Time. Then they would run off the edge of the contiinent, fall into the sea, and electrocute the whales. That would be bad.

I'm moving to a cabin in Montana.
# March 7, 2006 9:36 AM

DetroitJ said:

Bertrand: I think Roger's post "causing the Moon's orbit to recede." threw me off because you responded "Sure, I think that's what I was trying to say". I did not mean any disrespect.

The tides (or lack thereof) would not cause the moon's orbit to recede. The mass of the world's oceans are included in it's overall mass. The moon's orbit would decay due to it's orbital velocity being decreased by space particcles, comets, whatever else is up there crashing into the moon. Classical mecanics descibes gravity in the following; the standard formula for gravity is:

Gravitational force = (G * m1 * m2) / (d^2)
where G is the gravitational constant, m1 and m2 are the masses of the two objects for which you are calculating the force, and d is the distance between the centers of gravity of the two masses.

Given that G is a constant and m1, m2, and d would not be effected by any tides the gravitational force would be unefected.
# March 7, 2006 11:51 AM

Bertrand Le Roy said:

Walt: thanks for the funny post. On the serious stuff, I think you make a very good point. I have to admit I'm not a specialist of planetary system formation (and I quit physics altogether 10 years ago shortly after I got my PhD), but why would the moon be synchronized in its proper rotation and not the Earth? I think you'll agree with me that without any calculations it's easy to see that the minimum energy state for the moon is the synchronized state no matter what the initial state was. And maybe if the initial state was synchronized it was for a similar reason (i.e. minimum energy)?
On the other stuff, I want to reassure you: I'm not concerned at all and will continue happily driving my Hummer here in Seattle. You may want to stay away from Montana though. You know? Cause of the bears. They're the real threat to all Americans.

DetroitJ: good point: the "receding" part had failed to register in my brain. Of course it would not recede, that would mean bringing energy to the system instead of taking it away. I think Roger himself meant the opposite of what he said. Thanks for the formula for gravitation ;) You may want to try this one which has some nice additional features (but may make calculations a little trickier):
Guv = 8 pi G Tuv / c^4
# March 7, 2006 12:41 PM

Analgesia said:

I'm not an expert, but I read somewhere that the moon is very slowly moving away from earth. The lack of gravitational power coming from the moon rotating around the earth would make the earth spinning irregularly in stead of its current axle.
As far as I can tell getting power from the tide will only accelerate this process of the moon moving away.

some quotes I found:
"Tidal friction, caused by the movement of the tidal bulge around the Earth, takes energy out of the Earth and puts it into the Moon's orbit, making the Moon's orbit bigger"

"The Earth's rotation is slowing down because of this. One hundred years from now, the day will be 2 milliseconds longer than it is now."
source: http://curious.astro.cornell.edu/question.php?number=124
# March 8, 2006 8:10 AM

Bertrand Le Roy said:

Analgesia: thanks for the link. It confirms the story about the Moon's orbit locking down because of the tides, and it even tells how long it took (althoug it doesn't explain how this was measured or calculated). I'm surprised at the Moon actually receding because of the tides: instinctively, when I thought friction, I thought dissipation, but it seems like the energy is actually pumped from the rotational kinetic energy of the Earth into the gravitational energy of the system. The article makes a good job at explaining that.
Now, if I'm not mistaken, if you use the tidal energy (and block part of the tides), you'll divert part of this energy and dissipate it into whatever we do with it, which means that you's participate in the Moon slowing down its escape. In virtue of action and reaction, would it also slow down the slowing down of the Earth rotation? Maybe. Anybody wants to compute that?
# March 8, 2006 12:38 PM

Jb Evain said:

Hey Bertrand,

I've just learned how blocks can be simulated in JavaScript:

var x = 1;
if (true) {
____(function () {
____var x = 2;
____if (true) {
________(function () {
____________var x = 3;
____________alert (x);
________}) ();
____}
____alert (x);
____}) ();
}
alert (x);

Well, it's a trick :)

(From: http://www.application-servers.com/links.do?reqCode=showLink&lid=3092 )
# March 10, 2006 12:21 AM

Michel said:

The answer is in your post.
- With standards we don't have to write the same application several times => standards enrich the web.
- There is an Ajax boom although Ajax is not a standard => standards don't sterilize the web.
The fact that IE5/IE6 were much better than Netscape 4.x and that Netscape didn't improve sterilize the web.
The fact that IE6 had been put in sleep until Firefox was much better sterilize the web.
When standards (HTML, XHTML, CSS...) will be correctly implemented, we can say : that it's done. And then we can make still better things.
# March 10, 2006 2:29 AM

Joakim Sundén said:

Browser vendors must be able to come up with new innovations without having to wait for the standardization process; except that the audience would have to wait for new features the vendor would loose a competitive edge. But new innovations should be introduced with responsibility and good guidelines. Non-standardized web sites in many cases make it impossible for people with different disabilities to gain access to them. From this perspective the Ajax hype is worrying; we were finally getting somewhere with WAI/WCAG/Section 508, e.g., the built-in support in VS2005, when suddenly AJAX enters. I have not yet had the time to investigate what kind of problems AJAX introduces in this regard, but somehow it seems that developers does not want to let these considerations getting in the way of building cooler and cooler apps. I would love to see Atlas (help) handling this problem better than many AJAX web sites out there. Oops... I guess I wanderd off the topic there.
# March 10, 2006 3:22 AM

Wesley said:

I think your asking the wrong question.

If browsers fully support the standards... they can add as many extra's as they please! Nobody will be againts that! If browsers don't support the standards and bring in there own implementation and interpretation of standards... THAT'S a nasty thing. Two examples:

1) The boxmodel: Microsofts IE 5(I believe) did some strange thing in not implementing the boxmodel in the correct way. This resulted in a messed-up website if I built my website according to the standards. So I had to built one website for IE and one for all the standards compliant browsers. That's a nasty thing!

2) Filters: Microsofts IE has some very nice filter which can greatly enhance a javascript slideshow. This gives me the change to produce nice looking slideshows for IE and lesser looking slideshows for the other browsers by simply checking for the filter property. So this is a nice extra feature. (have a look at my site)

To my opinion it's good to EXTEND the standards in order to grow to a higher level and to give a feed for new standards. Unfortunately it takes a long time for a feature to become a standard. That's more of a problem that's caused by the stadardization authorities and definately not by the browsers or developers. Developers would be more than please to have a standard for AJAX. As of right now the have to implement 15 hacks to make it work on every browser!

And it's a very bad thing to simply not obey the standards.

Cheers,
Wes
# March 10, 2006 5:05 AM

Steve said:

Honestly? I think the teams of IE, Firefox, Netscape, Opera need to work closer together.

As far as XmlHttp - Isn't IE the only 'odd man out' since it uses ActiveX whereas with Firefox/Netscape it is not an ActiveX control?

I think you are better off to create good models for programming against the standards than to try to change the standards without all the members onboard.

It creates a nightmare for developers who have to create public facing webpages for 3-4 different browser standards.

Compliance and a common underlying browser model benefit the community.

Does it mean some cool things are left out? Yes. ie. I would like to also learn XUL for Mozilla - but it seems a waste of my time since I'll never be able to use it.

In summary of my opinion: if more work was done to to work together on standards with other browsers rather than just to try to extend their own, we'd be in a better place.

by the way: What ever happened to Javascript 2.0 ?
# March 10, 2006 7:34 AM

Micael Baerens said:

I don't think the problem is new features - the problem is when there IS a standard on the implementation of a feature, this standard should be followed.

Any browser innovations are, by definition, not anything other people have done before - so you would in reality be setting the standard.
# March 10, 2006 8:10 AM

Ruben said:

I don't think people gripe as much about implementing non-standards based functionality as you're suggesting. People gripe about not implementing standards.

For example, many modern browsers (such as Gecko-based browsers, but others as well) implemented XmlHttp and a drawing canvas, neither of which is standard. But they also provide standards support for silly things like (X)HTML, CSS2.1 and up, SVG.

It's an and-and thing. And in the past (and present) MS is taking the either-or approach. And always going for the non-standard approach, leaving half-implemented buggy standards implementations and yet-another-way-of-doing-things(tm) for the world to deal with.

Another thing that influences people's poor perception of MS (and IE in particular), is progress. IE has been on hyatus for incredibly long, while other browsers prospered, building on standards, whether official or defacto, and adding new ideas. Sure, the initial implementation of certain standards wasn't complete or flawless from the start. But a few months later it was better. And another few months later even more so.

Yet IE didn't even try, and still doesn't really; IE 7's rendering engine is just a 5.3 bugfix release (5.5=5.1, 6.0=5.2, if you're honest). That's what people gripe about.
# March 10, 2006 8:42 AM

Joe Fiorini said:

Standards are a very good thing. They enforce interconnectivity in a world where it is badly needed. Web developers need to be able to design a web site without fussing over how it looks in five different browsers (or even three). Web pages should be design once, and that's it.

However, I do think there is value in innovating with a browser, especially for those who know their userbase will be using a particular client. For example, I worked at a company that was standardized on IE5.5+. Therefore, I knew I could web apps with IE specific controls in them and not worry about it. However, this never would have flown if some people were using Netscape or Mozilla (Firefox was not around at the time).

Manufacturers really need to concentrate on making sure their browsers adopt the W3C CSS standards before they try to innovate. Once designers can create a web site that looks and feels exactly the same in Firefox, IE. and Safari, without having to include browser specific workarounds, then they can work on platform-specific innovations.

How can we help make this happen? I propose education. There aren't many official, professional resources out there for web standards. Most designers rely on Google and blog entries. What if Microsoft added a web design section to the patterns & practices group? This could go a long way in educating people on best practices for web design.

Just my $0.02,
Joe Fiorini
# March 10, 2006 9:20 AM

Stan Guss said:

It is sad that you would even ask the question. The fact is that standards are very innovative and one of the greatest lacks in innovation has been IE 6. I think that Netscape and Firefox are actually better browsers and support Web Standards much better.

I have been using VS 2005 for a couple of months now and there are things that I see that still convince me that there is a lack of understanding of what the standards bring to the table. Why do many of your controls, especially your navigation controls and validation controls still emit JavaScript instead of putting the script in a js file? Why, when you format a control using a properties window do the controls emit inline styles? Why do your navigation controls still emit table tags?

The real sad part is that front end development work for the web in VS 2005 is centered on trying to make is similar to building a Window form. Just mindlessly dragging and dropping controls onto a form. If you understood CSS and Style Sheets and some of the unbelievable things that you can do once you understand what a selector is I think that your view of standards would change. Many tasks such as building dropdown menus and flyouts are very simple using CSS and inheritance of elements with little to no JavaScript. All you have to know is unordered lists and how to format them using CSS and CSS Positioning.

Lastly, I have already encountered some very annoying things using VS and Master Content Pages. For instance, you cannot change the “id” of a form. Also, you cannot change or add JS events to the body tag. I use a literal control for my body tag and create the text in the “Page_LoadComplete” event. This would all seem probably very unimportant if you did not know CSS. It is also very annoying that you change the id of the controls to that ctl00_MasterContentControl_id format when the page is sent. Some of us like to do our own JavaScript and DHTML and like placing that script in a js file.

Finally, when I put my Masterpage File path in my web.config so that I do not have to put the path in the directive on each content page, I get errors under my asp controls in my content pages saying: ‘Unrecongnized tag prefix of device filter asp’. which disables my autocomplete. I generally use Source View to create my pages.

So yes, I think that Standards can enrich the web if Microsoft trully embraced them.

They say:
if (window.XMLHttpRequest){
req = new XMLHttpRequest();
req.open("GET", url, true);
req.send(null);

You say:

else if (window.ActiveXObject) {
req = new ActiveXObject("Microsoft.XMLHTTP");
if (req) {
req.open("GET", url, true);
req.send();

Let’s call the whole thing off…
# March 10, 2006 10:36 AM

Bob Campbell said:

Loose standards seem fine. But the current trend of "one size fits all" (ODF) is BS. There is a time and a place and a way to develop standards, ODF does not fit any of the criteria in my view. And I think strict aherence to standards in general stiffles innovation...especially in technology.

I think a good example of something that has not always followed standards but has proved to be an exceptional value on the web is none other then good old IE. Yes...I mean that. I have used IE since 4.1 and despite its shortcomings, it has stood up very well. And it has been the same in every company I've worked for... where would AJAX be if IE had strictly adhered to the standard du jour?
# March 10, 2006 12:55 PM

Bertrand Le Roy said:

JB: I think we read the same blogs ;) . I've seen this one. The problem with it is that it uses nested closures. I'm fine with closures when used reasonably, but this one for me is too much. I think it's not very readable, it has all the dangers of closures and it's just not worth the trouble.
I think it's best just to be conscious of this problem and deal with it without hacking around it.
# March 10, 2006 1:08 PM

Bertrand Le Roy said:

Excellent feedback guys, thanks all! I expected some to fail to notice the tongue in cheek, provocative quality of the title and I wasn't disappointed ;)
I also expected some interesting ideas and I got them too.
I'm updating the post with the most interesting feedback and my own comments in a moment.
# March 10, 2006 1:14 PM

Wilco Bauwer said:

I totally agree with this being a chicken and egg problem. Sometimes it’s almost frustrating to see what kind of fancy things you can do on the desktop, especially with WPF (Windows Presentation Foundation). When I compare this to how the web seems to be evolving, it sometimes feels that web developers are stuck in the past. I see a lot of cool things going on in for example WPF ranging from a high level of flexibility/extensibility to interesting concepts such as timelines which enable you to do visually interesting things. On the web, we only just had a hype about incremental updates using “AJAX”.

Ideally, the progress that we make on the desktop would be available on the web as well. It’s just much harder to push new technologies on the web, because people will generally avoid technologies that don’t work in the major browsers (even if it requires a download of some dependency). When people however target the desktop, they seem to care less about dependencies. Both the deployment options and (relatively often a specific) audience play an important role in this.

To embrace innovations on the web, I think at least the companies behind the modern browsers need to work close(r) together to work on providing 'universal technologies'. As long as that’s not going to happen, we’ll probably have to wait endlessly for new technologies to see the light in the world that is the web.
# March 10, 2006 1:52 PM

Wilco Bauwer said:

"If browsers fully support the standards... they can add as many extra's as they please! Nobody will be againts that!"

I'm not sure I agree with this. The problem I see with this approach is that this makes innovations harder. When different browsers each decide to add non-standard features, there's a chance that at some point things start to collide. I think it would be more effective if there was a roadmap that was shared by all modern browsers.
# March 10, 2006 1:57 PM

Aaron Seet (icelava) said:

Can somebody explain to me, the thousands upon thouands of high-rise buildings we have established around the earth, plus rows and rows of windmills, have no drag effect on global air currents?
# March 11, 2006 7:33 AM

Wesley said:

@Wilco Bauwer: first of all... Great weblog you have!

Second: Off course I don't want to encourage browser vendors to all invent a different approach for the same thing. Once something is invented and proves it value... let there be built a standard in a short timespan. Once there's a standard, other browsers can implement the same thing in a consistent manner.

And I - as a spare time developer - can built one website working on all browsers and wil have some extra's in other browsers. If slowly all other browsers would implement 'the extra' according to the standard being set... my extra's would work on all other browsers.

And sure you're right... if there was a roadmap, shared by all modern browsers... life would be much easier for us. And more boring perhaps;-)
# March 11, 2006 6:00 PM

Bertrand Le Roy said:

Well, Aaron, everything has an effect, and no energy comes free, but the question is how large the effect. If you consider the area of cities and windmill farms and compare that to the total area of the Earth, it's negligible.
# March 11, 2006 11:17 PM

Rick Strahl said:

A lot of people show their respective opinions in light of browser favorites here. I personally think that this isn't about browsers in general although they have their part to play. A lot of the difficulty of client side development would go away if browsers supported the standards correctly. While it's not easy to do this I'm sure, it shouldn't be a technological hurdle and it should get fixed, but I don't see this as likely. Instead the browser vendors point fingers at each other's implementation.

But the real issue I think that Bertrand is getting at is this: HTML and JavaScript standards have been stale for many, many years. Standards body or not there's been zero innovation in this space that reflects of what applications are actually being built ontop of the HTML platform. Think of the lack of more powerful controls like a decent scrollable multi-column list object (ie. like a ListView) or Tree control, or a better inline editing API. These are things that get re-invented over and over and over again by you and me as developers or by tool vendors in non-standard ways, resulting in much less uniformity and countless wasted hours on re-inventing the wheel.

It's clear that that sort of thing belongs in the platform (ie. the DOM) not the tools that ride ontop of it. Yet nobody bothers. These sort of things would be fairly easy to do, to extend the existing standard without breaking any existing functionality - there's no reason not to do this, yet nothing in this respect has happened.

So from that aspect I can certainly agree with Bertrand that stodgy standards are hurting any sort of forward momentum.

Every few years we some some other sort of 'exciting' UI technology come out that has a lot of this functionality, but it never gets off the ground because one or another big vendor is not going to support it and well, frankly, because it's not HTML. The only sizable contender to HTML at all is Flash and even Flash is completely dismissable in terms of mind-share for Web application development (not counting pure UI Glitz).

It's clear that HTML is going to continue to be the way to build Web uis for some time to come, even though richer UIs are available.

The question is: How do we drive some action into this direction? I admit - i have no anwers. But I can't imagine that there's a seasoned Web developer out there who's happy with what's available 'out of the box'.

# March 13, 2006 1:24 AM

ulu said:

Get a life NERDS
# March 13, 2006 2:10 AM

Bertrand Le Roy said:

Ulu: you know nothing of our lives, which may very well be a lot more interesting than yours for all I know.
# March 13, 2006 3:24 PM

Scott M. Stolz said:

This really is more of an "open-source" vs. "proprietary" type of argument here. On one side they say the standards should be open and agreed to by all and on the other side they say that people and businesses have a right to not disclose their code and create systems how they want. You have two camps and its more about politics than technology.

And then there is the issue of de facto standards and official standards. Open-source and standards advocates cringe when I say this, but quite honestly, anything that 80% of people use is a de facto standard regardless of whether or not it is an official standard. A perfect example is Microsoft Word documents. They are a de facto standard. At least 95% of computer users have encountered such documents, thanks to Microsoft Office being so popular and the fact that Microsoft Windows includes WordPad (which saves documents in Microsoft Word format) for free... and the fact that OfficeOffice.org and other programs open and save Microsoft Office documents.

Before people start arguing that Microsoft Word is not a standard, lets look up the meaning of the word standard. It means "Something, such as a practice or a product, that is widely recognized or employed, especially because of its excellence."

So, what we are really talking about is open standards agreed to by standards bodies and not talking about standards, which can be proprietary.

One thing that open standards do is allow smaller guys to be on the same page as the bigger guys. It also reassures the marketplace that they are spending money developing products that will be around for while. Look at the HD-DVD and Blu-ray. Many manufacturers are holding off because they are not sure which will become widely adopted. They don't want to spend money developing products that no one will use or that will get replaces with something else soon. Example: Betamax tapes.

So standards bodies provide some stability to the market, but that doesn't stop anyone with a good idea and some money for marketing to go out there and convince others to adopt his way. Which I think is a good thing. It keeps the standards bodies from becoming complacent, and it also encourages innovation.

The fact that there is a competition between open standards and proprietary ones is a good thing. And many of the proprietary ones become open standards (after much negotiating and compromising).
# March 13, 2006 3:53 PM

Collin said:

You can't always follow standards. I suggest you follow as many as possible but then decide if some neat new feature is great enough to justify dropping a percentage of users of a browser that may not have picked up that new method or way of doing things. Cross browser/cross platform is important but it's more important to look at the big picture.

Standards in no way have stopped innovation, it's just a matter of choosing which innovations are more important then 100% standards compliance.
# March 14, 2006 3:49 PM

Colin McGraw said:

While some here claim standards stifled innovation, I actually think the opposite is true. Standards are what has DRIVEN innovation for the past generation of technology.

The formation of the HTML standard represented a departure from proprietary document format which enabled us to create perhaps the biggest innovation of our generation: the Internet. The adoption of the standard and the portability it represented made it feasible to build a worldwide network. This simply wouldn't have happened if competing vendors presented 500 different viewing options for web documents.

Additionally, the ease of use and portability of HTML drove the formation of the XML standard which spawned SOAP and Web Services which then influenced people to consider the feasibility of an ultra-portable messaging architecture and the eventual adoption of SOA and hence the WCF. Sure you could have had SOA without XML and Web Services, but I firmly believe the idea never would have been as popular without their invention, standardization, and resulting widespread use.

So I’d say that standards (like HTML, XML, SOAP) are what drove progress the past few decades while proprietary technologies (DCOM, .NET remoting, Microsoft Office documents, IE filters) haven’t really resulting in anything earthshaking breakthroughs despite their quality and usefulness. Furthermore I think departure from standards only serves to undermine the assumption of universality and portability that drives progress, so I think IE can be a hinderance in this regard (and I say that as a die-hard Microsoft fan and IE user).

That said, I think what the Web needs is not a departure from standards, but increasingly better extensibility within the standards: Javascript needs to become object-oriented, and it wouldn’t hurt to push the concept of encapsulated UI in the markup itself (something like server control tags, but with a Javascript object or referenced XML/XHTML template driving the rendering on the client-side).
# March 14, 2006 7:34 PM

John said:

In response to Colin McGraw. Instead of adding extensibility options like your suggesting, why don't the browser manufacturers work on creating a joint coalition under which a new engine is produced. One that conforms to a set of standards that both companies can use and build around. Then as new features come into play they can decide what makes it and what doesn't, but in either case if it is approved, it will be approved across the board.

I don't think that we, as developers and designers, should be hampered by the vehicle we display our work in. The browser application should be the focus of the manufacturer. I don't think that this question is answerable in the current lack of compliance with any one solid set of standards.
# March 15, 2006 3:13 PM

Bigolnickthephysicsteacher said:

So when using tidal energy, are we slowing the moon down, or slowing the rotation of the earth?
# March 15, 2006 3:54 PM

Stan Guss said:

Hi Bertrand,

Well, first let me say that I have only been using VS 2005 for about 2 months and my comments were only first impressions. I am truly committed to using VS and do not know what else I would use. At this point, Dreamweaver is not an option… As for my joke about “XMLHttpRequest()”, that is all it was meant to be, I was just joking, not trying to take a cheap shot, truly.

Anyway, I love CSS and Web Standards. What can I say… This is the extent of my html code on my master page that I used to build my personal site at StanGuss.com:

<div id="wrap">
<div id="logo"></div>
<ul id="nav"></ul>
<asp:contentplaceholder id="Title" runat="server"></asp:contentplaceholder>
<asp:ContentPlaceHolder id="Content" runat="server"></asp:ContentPlaceHolder>
<asp:ContentPlaceHolder id="Sidebar" runat="server"></asp:ContentPlaceHolder>
<div id="footer"></div>
</div>

As for IE, it’s really not that I have anything against the browser, I continue to use it because it is so well integrated into the Office products and it is my default browser. It just seems that since Microsoft integrated IE into the operating system that not a whole lot has gone forward. In fact, there are now more browsers than ever before. I would just like to see Microsoft out in front of the pack and I think that supporting the W3C Standards goes a long way to that end. I am very much looking forward to 7.0.

As for navigation controls like the treeview control, I just dropped the control onto a form and I am still seeing the JavaScript embedded in the client source when I run the page. So I am not sure what I am doing wrong. But I also do realized how easy the control is to code and it does work in Mozilla so I did not mean to be so critical.

When you asked the standards question, I just assumed that you asked because you had not used technologies like CSS and CSS Positioning. To me, with very little effort anyone can produce beautiful web pages. I went to an interview recently for a .NET position where a fairly large company had farmed out the development of their corporate website to an outside entity. The reason was not that they did not have the resources, it was that: “We do not have the capabilities”. And the product that was delivered was not very flashy, in fact it was pathetic. I could go on, but it was just something that had been talked about in the interview. So I guess it was still resonating in my head that higher level developers cannot uses simple technologies like CSS. I’m sorry, it was a slack comment…

Anyway I am working on VS 2005 and did not want to give the impression that I had given up. Actually, it is very interesting to actually be interacting with you guy’s.
# March 15, 2006 4:06 PM

Bertrand Le Roy said:

Bigolnickthephysicsteacher: from what's been said above, I'm pretty sure it's slowing down the rotation of the Earth (by a very tiny amount of course). Also, it's established that tides transfer energy to the Moon-Earth couple and bring them farther apart. So I'd say that if you act against them by virtue of action and reaction you should be bringing them back together (relatively, I mean, the effect will be minuscule). Then again, no calculations done here, just hands reasoning so I may be wrong.
# March 15, 2006 4:13 PM

Bertrand Le Roy said:

Stan: I'm not sure what you mean by "JavaScript embedded in the client source". It may be the event handlers (onmouseover, etc.) or it may be the instance-specific initialization code at the bottom of the page. But the actual code for the control's logic is always in a separated resource file and is *never* embedded into the page. You can drop me email (bleroy at you know where) and we can discuss it.
# March 15, 2006 4:25 PM

Edgardo said:

Fantastic news.
# March 16, 2006 9:54 PM

Dflying said:

Really cool!
# March 17, 2006 2:28 AM

Wilco Bauwer said:

Hm. I better hurry up if I want to be the first ;). I've been working on exactly the same thing every now and then since last Christmas now. Here's a very little teaser:
http://www.wilcob.com/wilco/downloads/ruby005.png
# March 17, 2006 3:14 AM

relok said:

Wilco, so why not to join your forces with them?
# March 17, 2006 3:53 AM

Mischa Kroon said:

A bit further along is:
http://www.iunknown.com/

Have a look at it it looks slick :)
# March 17, 2006 5:18 AM

Mario said:

Try Boo, boo.codehaus.org Very ruby-esque and is supported (debugging, winforms development, refactoring) in SharpDevelop.
# March 17, 2006 10:13 AM

Clive said:

I think all the trees we cut dowl will allow the wind to blow more freely, so turbines are not a problem, tidal friction has been going on since water flowed on the earth, so tidal schemes are of no real effect. the main worry for me is all those solar panels, if we keep putting them out at the rate we are, we could end up using up all the sunshine and we could be plunged in to permant night! ;-))
# March 17, 2006 11:47 AM

Bertrand Le Roy said:

Mischa: if I'm not mistaken, this is a bridge between .NET and Ruby, it's not an implementation of Ruby on the CLR.
# March 17, 2006 3:09 PM

TrackBack said:

Rick continues the discussion on his blog
# March 17, 2006 4:13 PM

TrackBack said:

Ars Technica / M-Dollar points to this post.
# March 17, 2006 4:33 PM

TrackBack said:

The ServerSide .NET points to this post.
# March 17, 2006 4:33 PM

miguel jimenez said:

But a new language implementation is not what I would expect from Ruby... I would rather prefer an implementation of On Rails for .NET ... that would be great!!!
# March 18, 2006 8:12 AM

John Lam said:

Yes it is a bridge, but I suspect that for the 80+% case this is what most people want - have .NET and Ruby objects seamlessly integrated in the same Win32 process. It will be *very* difficult to get a real Ruby implementation up and running on the CLR - the language is just so, well, dynamic. The bridge is already pretty usable now - I've built Avalon apps as well as Windows Forms apps (not to mention most of RubyCLR itself) using Ruby.
# March 18, 2006 7:48 PM

Bertrand Le Roy said:

Bridges have not been trhat successful so far (no matter what the language is) so I really doubt that. IronPython shows us that it is possible to have a dynamic language perform very well in the CLR. Actually, I would express doubts the other way around: I doubt a bridge will utlimately perform well because it will have so much marshalling to do.
# March 19, 2006 12:06 AM

John Lam said:

Bridges are not about performance. Neither are dynamic languages (necessarily). What dynamic languages buy you is the flexibility to write less code, and (hopefully) better algorithms because there's less language noise that gets in the way.

Most apps spend most of their time not doing very much. Yes - there is marshaling that has to be done, but how expensive is the cost of marshaling some EventArgs into a Ruby block in a UI-based app that runs on a processor retiring several billion instructions per second?

It's not that I haven't paid attention to performance in my bridge; if you take a close look at the implementation, you'll see that I don't use Reflection at all at runtime - instead I generate compiled CIL shims that do the marshaling in the most performant manner possible.

Burn the CPU cycles in the name of programmer productivity - I make it trivial for folks to use native CLR code in their app wherever it is warranted.
# March 19, 2006 3:01 PM

Bertrand Le Roy said:

John, don't take this the wrong way, I'm sure you're building a great and useful product. It's just that I'm more convinced by a full CLR implementation of the language than by a bridge. I wish you a great success with your project.
And yes, it's all about developer productivity.
# March 19, 2006 4:15 PM

Tom Medhurst said:

No No No! Compiling Ruby just seems wrong!
Why not talk to the .NET Framework through standard ruby scripts?

http://www.iunknown.com/

All we need now is a decent IDE for ruby (I'm working on it guys?! :p)
# March 20, 2006 6:26 AM

Michael Bradley said:

For a .NET implementation of the Rails framework see http://www.castleproject.org/index.php/MonoRail
# March 20, 2006 1:05 PM

Bertrand Le Roy said:

Yes Yes Yes! Just look at IronPython and how well it works. Why would Ruby be any different?
# March 20, 2006 1:51 PM

Max Mulawa said:

Cool stuff, but .NET is still to slow for games :( but I wouldn't mind writing games for XBox 360 as .NET develper. What about Commodore 64 ? :)
# March 22, 2006 9:00 AM

Geoff Van Brunt said:

TI-99/4A? Wow, that brings back some memories. I remember hacking apart some of the default words the speech synthesis module could "say" into phomens so the computer could say anything. Of course the next step was teaching it to curse... :)
Nothing like hearing a computer say byte me...
# March 22, 2006 10:14 AM

Pieter Siegers said:

Thanx for the pointer Bertrand, I've managed to integrate the March Release into the ASPToday.com article.

What I'd like to know still is if you have any pointer to Atlas´ Roadmap - where are you heading with Atlas and how do you see integration into Vista or is Atlas more a temporary step?

Cheers, Pieter
# March 22, 2006 11:41 AM

Bertrand Le Roy said:

We're going to continue to release CTPs on a regular basis like we've done since the PDC but I can't give you a more precise roadmap than this for the moment.
# March 22, 2006 12:16 PM

Bertrand Le Roy said:

Max: the truth is that not many people have tried it but those few tries I know of showed performance between 50% and 80% and I'm suspecting that we still have to learn how to optimize managed code for games. Now consider this: how many times faster is the 360 when compared to the old Xbox? Would you say the Xbox is "too slow for games"?

I don't think so.

(to answer your other question, I have a Commodore 128 in my basement but I never developped any games for it)
# March 22, 2006 12:21 PM

Max Mulawa said:

Hi Bertrand,

The only technique to "optimize managed code for games" I could come up with is to use wrappers for Win32 functions for all graphical operations. What you would suggest?

I cannot agree to using XBox resources by managed code would make XBox users happier, but effectiveness of writing code is .NET is unquestionable.
# March 22, 2006 4:58 PM

Julien Ellie said:

There are many things that can be done to improve or just get good performance for games with .Net and the XNA Framework, both on the PC and on the Xbox 360. Performance is a very important part of what we do and as the platform evolves we are very confident that .Net can become a very good platform for many kinds of games both on PC and on Xbox 360. Not to sound closed to discussion or anything, but, as with any technology, the proof will be in what people actually do with it ;)
# March 22, 2006 5:47 PM

Jb Evain said:

IMHO, using their own PE writer is a big mistake for such a dynamic language as Ruby. If perfect for batch compilers, it's not very well suited for dynamics language where Reflection.Emit and LCG rocks.

At each assembly emitted, they will have it twice in memory...
# March 23, 2006 3:04 PM

Nils R Grotnes said:

There's a link to a PDF file at the bottom of http://www.badastronomy.com/bad/misc/tides.html that will give you many gory details of how to calculate these things. Well worth the read, you can for example learn there that the weight change of going upstairs is about five times larger than the weight change during a spring tide.
# March 24, 2006 7:43 PM

Mike 2006 said:

Doubtless the tidal energy comes from somewhere and it's not free?
The tides he have been dissipating energy on the Earth's coast for 3Byears approx.
If we extract energy from the tides it will not make the slightest difference to the moon's orbit. The moon will slow down over time and thus recede from the Earth as it has been for the past 3E9+ years.
# March 26, 2006 5:20 AM

Bertrand Le Roy said:

Mike, sure it will have *very little* effect, just like anything that diffuses the tidal energy, which is what I'm saying at the end of the post and what's been extensively discussed in previous comments. But you can't say that it won't "make the slightest difference" because it will.
# March 27, 2006 2:14 PM

Lindsey said:

Does anyone know the angle of the wake, what controls the angle, and who first discovered it? It's for a physics assignment, so any help is appreciated.
# March 27, 2006 5:39 PM

Bertrand Le Roy said:

Lindsey: I don't want to patronize you or anything but if this is an assignment, that's all the more reason not to give you a full answer, you need to work it out yourself. I'll give you some clues though.
Draw the following: one dot for the duck at instant 0, one for the duck at instant t. The duck emitted a wave front at instant 0 so that makes a circle centered on the first point. The speed of the wave front is the speed of waves at the surface, let's call this c. So the radius of the circle at instant t is c times t. At this moment, the radius of the circle the ducks emits at instant t is still zero. The distance between both points (duck at instant 0 and duck at instant t) is v times t where v is the speed of the duck.
The wake is formed by the enveloppe of all circles so its summit is the second point (duck at t) and it must be tangent to the circle emitted at zero. So if you draw a line that's tangent to the circle and goes through the second point, you've drawn the wake.
If you draw a line between the two points and a line from the first point to the point where the wake tangents the circle, you have drawn a triangle. This triangle has a 90 degree angle at the tangent point. You know one angle of the triangle, as well as the length of two sides. It's elementary trigonometry to find the angle of the wake.
# March 27, 2006 6:00 PM

Zman said:

Where's the evidence for 50-80%... sources please.... the cloest to official from MS is >95% and tha matches my experience too.

Plus take a look at any casual game - even it it was 50% who would notice. Nobody is suggesting writing half life 3 in managed code here.
# March 27, 2006 10:32 PM

Bertrand Le Roy said:

Hey, ZMan, I'm on your side here. I'm just being very conservative, and as you point out, even at 50% (which would be very poorly written managed code) it's still largely enough for even demanding casual games. These are figures that I gathered from various sources (I did say "those few tries I know of"), but if you take one of the earliest tries at that kind of things like the Quake port to managed C++, the perf without any optimization was around 80%. I haven't seen any >95% stuff nor have I seen that figure as an official MS figure but then again I haven't had the occasion to see any of the new Xbox CLR running. If confirmed, that would be awesome. Would this be on a technological demo or on a real complete game scenario?
Thanks for the info. You obviously know a lot more than me about that stuff (I'm just an ASP.NET dev you know).
# March 28, 2006 2:14 PM

Bryant Likes said:

Just wondering, the control in your post is showing some odd stuff:

A|Body Color
B|Dot Color
...

Is the accordian control supposed to be showing there?
# March 29, 2006 12:45 PM

Bertrand Le Roy said:

Bryant: no, as I said in the post, the accordion control doesn't render anything, it's pure behavior. These are just the headers that are in the HTML in the demo application.
# March 29, 2006 12:49 PM

TrackBack said:

Nikhil uses the accordion control to discuss the separation of UI and behavior.
# March 29, 2006 1:26 PM

TrackBack said:

Brad hosts the source code for the accordion control.
# March 29, 2006 1:30 PM

TrackBack said:

Scott has a nice collection of post-Mix Atlas samples, including the accordion.
# March 29, 2006 1:33 PM

Bryant Likes said:

Ok, then I'm just confused. You comment that the control "does pretty much what you expect, which is to show only one of its panes at a time." However, I don't see any panes changing or animations being done so the control doesn't really make sense to me. How does what is shown in the post relate to the accordian control? Is it just showing all the panes at once because of a javascript issue?
# March 29, 2006 2:46 PM

Bertrand Le Roy said:

Bryant: you probably failed to include the Atlas scripts. You can send me your page at bleroy (at Microsoft.com) and I'll have a look and tell you what's wrong.
# March 29, 2006 5:50 PM

Zman said:

The problems I see are that in directx (managed or native) is very easy to structure your program so that it is very very slow. YOu have to know how best to send stuff to the card and what to avoid. The naive way is almost always the slowest. So you get beginner DirectX programmers start with managed directx and hit these problems. Since beginner programmers are *never* wrong, it must be the technology so they go to the newsgroups and forums and bitch about how slow managed directX is when in reality native directX would be just as slow if they wrote their code in the same way.
The only large benchmark that I have found is this one http://realmforgewiki.castlegobs.nl/index.php/Main_Page which shows plenty of speed. (forget Quake.Net thats really not a good example of most things and its very old now). The Xbox CLR is too early to make speed comparisons, but all the simple demos at GDC ran with plenty of leftover fps.
# March 29, 2006 7:41 PM

TrackBack said:

Rédo points to this post.
# March 30, 2006 2:48 AM

Runi Thomsen said:

Im having trouble using the accordion - client only- control (accordion.js).
What steps are nessesary in order be able to run the above example? (besides downloading, installing march CTP and creating a Atlas project and copy the accordion.js to a script folder under the project?

Thanx
# March 30, 2006 4:35 AM

Bertrand Le Roy said:

Runi, I've updated the post to include the scaffolding you need.
# March 30, 2006 2:53 PM

Steve said:

I am just using the accordian setup and get the following err:

'Dice' is undefined.

I have the Accordian.js file in the scriptlibrary folder
--

<body>
<form id="form1" runat="server">

<atlas:ScriptManager ID="ScriptManager1" runat="server">
<Scripts>
<atlas:ScriptReference ScriptName="AtlasUIGlitz" />
<atlas:ScriptReference ScriptName="Custom" Path="~/ScriptLibrary/Accordion.js" />
</Scripts>
</atlas:ScriptManager>

<div id="accordion1">
<a href="javascript:;">Pane 1</a>
<div id="Pane 1">
This is Pane 1 in the accordion control.
</div>

<a href="javascript:;">Pane 2</a>
<div id="Pane 2">
This is Pane 2 in the accordion control.
</div>

<a href="javascript:;">Pane 3</a>
<div id="Pane 3">
This is Pane 3 in the accordion control.
</div>
</div>
</form>
<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005" xmlns:dice="http://schemas.microsoft.com/xml-script/2005/dice">
<components>
<dice:accordion id="accordion1"/>
</components>
</page>
</script>
</body>
# March 30, 2006 7:22 PM

Steve said:

Here is the fix - the accordian.js file was missing the top:
Type.registerNamespace('Dice');

It's also case sensitive - so I had to correct this:

<script type="text/xml-script">
<page xmlns:script="http://schemas.microsoft.com/xml-script/2005" xmlns:Dice="http://schemas.microsoft.com/xml-script/2005/dice">
<components>
<Dice:accordion id="accordion1"/>
</components>
</page>
</script>
# March 30, 2006 7:28 PM

Bertrand Le Roy said:

Steve: that's because Brad forgot to copy the namespace definition into accordion.js. Add this line at the top of the script file:
Type.registerNamespace('Dice');
I've sent mail to Brad so that he can fix the file.
# March 30, 2006 7:29 PM

Bertrand Le Roy said:

Steve: the Javascript namespace is Dice with a capital D, but the xml namespace should be kept dice with lower-case d. Otherwise, I think it will fail on some browsers.
So no, you don't have to and shouldn't correct the xml-script here.
# March 30, 2006 7:31 PM

Bertrand Le Roy said:

Steve: I should probably add for the sake of clarity that the namespace that is used in the Javascript is Dice as defined by the registerNamespace, whereas the xml namespace that is used in the xml-script comes from the
Sys.TypeDescriptor.addType('dice', 'accordion', Dice.Accordion);
line at the bottom of the file, and this one uses lowercase d.
# March 30, 2006 7:34 PM

Steve said:

thanks for the clarification - that helps
# March 30, 2006 10:53 PM

Stephane Rodriguez said:


I entirely disagree with the premise of this post.

"The transition of websites from isolated information silos to sources of content and functionality" : the bulk of blogs out there have no RSS feeds to subscribe to.

"This is the community aspect. It consists mainly of user-provided contents " : we are still in phase one where service providers freely give storage and feature almost for free only to reach critical mass. Once the critical mass gets reached, doors will be closed, and blood will follow.

"A more organized and categorized content" : RSS does not solve information overload. It calls for even more information consumption. I have personally switched from 30 minutes a day to 8 hours a day. It's a pathology. I can only remember the good ol' days of Internet over RTC 28.8kb where I would see only a handful of websites before I told myself that I had seen enough. Besides this, today's tools to reading hundreds of RSS feeds are just inapropriate. We certainly need ways to recoup information for us without us doing all the recouping info. In a way get facts without having to play journalists (that's time consuming).

"The resurgence of excitement around the possibilities of innovative web applications" : like what? What is innovative in the web right now? Nothing is done right now that could not be done back in 1998. And for the record, we are seeing rendering stacks like DirectAnimation, HTML+TIME being replaced with WPF/E. How do you call this? I call this a 10-year cycle. Everything old is new again.

# April 2, 2006 4:54 AM

Bertrand Le Roy said:

Stephane: you're answering the Wikipedia article about Web 2.0, not my post, which begins with "think what you want about web2.0". Ignore it if you want. It's not my point.
# April 3, 2006 2:31 AM

Christopher Bennage said:

Have you heard about Spore? It follows the Gaming 2.0 idea you outlined. User created content plays a significant (and innovate) part in the game. Here's a lenghty video of the game being demonstrated at GDC:
http://video.google.com/videoplay?docid=8372603330420559198
# April 3, 2006 9:55 AM

Bertrand Le Roy said:

Christopher: yes, you're absolutely right. I knew this video but for some reason it didn't register in my mind. Yes, Spore is a perfect example of what I'm talking about. I'll update the post.
# April 3, 2006 1:35 PM

Ryan Heath said:

Nice post!

I have already changed it into a behavior and added code so I can also close a section by clicking it again.

I also tried to add a fadeAnimation but removed it again since the collapsing wasnt smooth anymore ...

An other question: is it possible to somehow inject xml-script into the page via javascript code? Of cource xml-script has its javascript equivalence, but that is some much more verbose.

// Ryan
# April 5, 2006 5:36 AM

Bertrand Le Roy said:

Ryan: I suppose you could inject xml-script into the page, after all there's nothing we're doing that you couldn't do but we won't support that. If you're writing JavaScript, the supported way of adding stuff to the page will be to instantiate the controls and set the properties in JavaScript.
# April 5, 2006 1:56 PM

Ryan Heath said:

Thats a bummer. May I ask why you will not support it?

See it as the counter part of innerHTML.

doing:

.innerHTML = "<div><div>etc etc"

is so much more easier to do (and to maintain) than:

var div = document.createElement("DIV"); etc etc

// Ryan
# April 5, 2006 4:03 PM

Bertrand Le Roy said:

I see your point, Ryan. I'll relay your suggestion.
# April 5, 2006 4:19 PM

Brian said:

Is it possible to do the accordion in an update panel? I'm trying it, but the accordion effect is lost.. Is there any way to get the effect back and not have a lot of screen refresh/flicker? I keep trying to find a way to use the UpdateProgess to fire off some javascript, but I can't get anything to work.

I was using Rico.Accordion (another opensource accordion solution) but the same thing happened with it. I can reset the accordion with rico manually (which still doesn't acheieve the effect I'm looking for), but I still can't find any way to reset the accordion effect after the update panel completes the update.
# April 5, 2006 4:27 PM

Ryan Heath said:

I think you meant Ryan? ;)

My scenario is as followed:

I'd like to have a certain functionality available on a lot of pages, but to me it seems a bit of waste to send the UI of the functionality with each and every page request, but not the code of the functionality (javascript).

So I'd like to create the UI from javascript. Right now I am using your suggestion to create the components and set their properties through javascript.
But its so verbose, right now I am not sure if I coded it right, it is working, but still ...

It would be far more easier to have the same xml-script functionality available at the javascript level, actually, all the parsing code is already there ;)

// Ryan
# April 6, 2006 4:46 AM

Bertrand Le Roy said:

Brian: UpdatePanel really is for server controls. What is your scenario exactly?
# April 6, 2006 2:32 PM

Bertrand Le Roy said:

No, I meant Brian but I answered the wrong post... Sorry you had to write this additional post :)
I did relay your suggestion and opened a work item for it so if it is accepted it will be implemented in a future release.
In the meantime, I suppose you could do what updatepanel is doing but these APIs in their present state are meant for internal use so they may be a little difficult.
# April 6, 2006 2:35 PM

Ryan Heath said:

Ah many thanks!
Keep us updated ;)

Meanwhile I'll have a look at those APIs updatepanel is using.

// Ryan
# April 6, 2006 3:49 PM

Ryan Heath said:

var xmlScript = new XMLDOM( "<page etc etc
Sys.Application._loadIncremental( xmlScript.childNodes[0]);
delete xmlScript;

did the trick I was after.

Thanks again.
// Ryan
# April 7, 2006 7:35 AM

Scott said:

No malice here. That's what I've been prescribing for some time. Since you can't extend IE, it's best to treat it like the slow child ("yes, IE you can keep using innerText"(pats IE on head)) and have the other browsers implement it's quirks.

It's all about spackling the DOM model sad to say.

http://www.lazycoder.com/weblog/index.php/archives/2005/02/08/adding-innertext-to-mozilla-and-other-browsers/
# April 8, 2006 2:22 PM

Wayne Kelly said:


As I understand it, Reflection.Emit does a number of other things beyond generating PE files (such as performing verification). Our PE writer performs only the work that is required.

And just because Ruby is a dynamic language, doesn't mean it can't be compiled.
Only features such as eval require the compiler to be invoked at runtime, and Ruby programmers already expect eval to be slow.

We may very well have performance issues, but I doubt our PE writer will be the most critical.
# April 11, 2006 3:37 AM

RAJIV said:

SOME FLICKERING IS THERE WHILE USING ACCORDION . ANY SOLUTION FOR THAT
# April 11, 2006 8:56 AM

Bertrand Le Roy said:

Rajiv: no need to shout ;) I don't see any flickering. What browser is that on? Maybe the animation could be made more fluid by using a composite animation (the control uses two simultaneous animations: one to reduce the old pane, the other to make the new one appear). This is only a sample so I went for the simplest solution but there are certainly more than a few ways to improve on that.
# April 11, 2006 1:10 PM

Brian said:

I am using the update panel for a server control. The server control connects to a web service for weather info and returns nested divs that I then want to apply the accordion effect to. The nested divs then act as a list of buttons for each day that expand out and show that days forecast (when the accordion control is applied). The problem is I'm wanting to use the updatepanel to refresh the weather information periodically. The updatepanel is working and the accordion control is working, the problem is that the accordion effect is lost when the updatepanel refershes. If i could find a way to call some javascript after the updatepanel runs I could fix it, but I'm guessing it would have lots of flicker.

My weather control is basically a .net implementation of:
http://openrico.org/rico/demos.page?demo=rico_weather
My control hooks into Active Directory to get the users location and then gets the appropriate weather info.
# April 11, 2006 5:19 PM

Bertrand Le Roy said:

Brian, as I said, UpdatePanel is for server controls. We're considering enabling some limited support for xml-script inside UpdatePanel but that would be in a future release.
There are at least two things you can do.
First, you can put UpdatePanels inside the divs of the accordion.
Second, and that's what I would recommend, you can build a server control that implements IScriptComponent and spits out the accordion's xml-script.
# April 11, 2006 5:27 PM

Dion said:

Great example. Is this an example of what we can expect from the Atlas Control Pack?

About the accordion control: I made a very small modification to the original accordion.js code, so clicking on an already expanded DIV will now cause it to callapse again (more logical I guess).

This is the modified code for the set_viewIndex function (even less code!):

this.set_viewIndex = function(value) {
_viewIndex = (_viewIndex == value) ? -1 : value;
_ShowCurrentPane.call(this, true);
this.raisePropertyChanged('viewIndex');
}
# April 12, 2006 5:34 PM

Dflying said:

very cool!
# April 13, 2006 9:21 PM

Olivier said:

De toute façon dès qu'on essaye de faire un produit qui va satisifaire tout le monde Microsoft comme libre, ça geule du côté libre ...
Faut pas trop se prendre la tête, Atlas ROCKS!!! ;)

Continuez votre bon boulot les gars!
# April 14, 2006 4:27 AM

Andrey Skvortsov said:

Excuse me,I'm not impressed,look at http://jquery.com/demo/accord/-it's much,much more convenient and simple.I don't see clear benefits Atlas bring to this example,except obfuscate things a little enforcing "framework" burden;-)
It seems to me you're not solving real problems.Atlas binded to server side more than other JS frameworks and tring to adhere "server side" principles using .NET BCL guidlines,asp.net controls model etc.,and it dosen't looks very nice because you think on the "other" side and approximate server to client and not vise versa,that is more natural IMHO:-)

Regards.
# April 14, 2006 8:11 AM

Richard Hillman said:

How will IE7 affect this?
# April 14, 2006 9:13 AM

Keith said:

I believe what you are doing is good. But I ran into a problem with an open source javascript calendar that wouldn't work in Firefox because the compatiblity layer made the events IE like and the calendar knew it was running under Firefox. This was with the March CTP. Maybe it was fixed with the April CTP, but I haven't tested it. It is a basic mistake and I am surprised more 3rd party controls don't fail under Firefox.

I understand trying to make javascript with work all browsers is a difficult thing, god knows I do. It just means you guys really have your work cut out for you to not make mistakes like this.

http://forums.asp.net/thread/1256274.aspx
# April 14, 2006 9:20 AM

Scott said:

"Safari is making things difficult: how do you dynamically load arbitrary script and get notified when the script is done loading?"

Actually, I don't think Safari is supporting the standard here. From what I understand, the big sticking point is supporting onLoad for any DOM element. I belive the "standards" specifiy that onLoad should be supported on any HTMLElement, but safari only supports it on the BODY element. Been waiting, and watching the webkit repository, for them to support this for a while so live.com will work in Safari.

BTW, the Atlas tool kit has a lot of issues in Safari. It's odd that other toolkits, Dojo, Scriptaculous, Mochikit, etc... can get accordian panels and drag-drop workingin Safari, but Atlas can't. Perhaps the Atlas script library needs to be re-worked a little. It seems to me that MS started going down one architecture path with Atlas, and then checked to see what browsers worked with that architecture after the fact. Not sure if it's malace or lack of time. I always attribute anything that seems to be malace to a tight schedule instead.
# April 14, 2006 1:15 PM

Bertrand Le Roy said:

Keith: I don't understand. Is this component doing browser detection? If it is, that's why it's not working, not because of the Atlas compat layer. It should be doing capability detection, not browser detection.

Richard: this will affect IE7 only where they remove old IEisms from the object model, which they're not doing in a way that affects Atlas for the moment.

Scott: Drag and drop works in Safari. There are other things that don't work currently in Safari but we're not even in beta, so give us some time here.
# April 14, 2006 3:09 PM

Bertrand Le Roy said:

Andrey: reusable components, declarative syntax and a consistent framework.
# April 14, 2006 3:12 PM

Scott said:

Bertrand,

You're right. The drag drop does work in Safari. I just tried the Drag Panel example at the Atlas control toolkit page. I first tried the re-order list example and it did not work.
# April 14, 2006 5:26 PM

Bertrand Le Roy said:

Hey Scott, thanks for the heads up. I'll relay that to the right people. We're really committed to Atlas being cross-browser but there sure is some more work.
One thing that should probably be mentioned is that sometimes, when the compat layer method can't work, we're reverting to one of the other two.
# April 14, 2006 5:31 PM

Robert McLaws said:

It hasn't been ratified yet so it's not a standard.
# April 14, 2006 6:19 PM

Bertrand Le Roy said:

Robert: that's why I mentioned that it's a draft.
# April 14, 2006 6:27 PM

ruby said:

Here's Ruby on linux. Live. Unabridged. Open. Fine-tuned. Also works on Mac OSX or any other unix. Get a life.
# April 14, 2006 9:51 PM

Bertrand Le Roy said:

Dear Ruby, thanks for your suggestion to get a life, but I already have one and I suspect it's more interesting than yours seeing how you waste your time on such comments.
# April 14, 2006 9:56 PM

Andrey Skvortsov said:

Does XmlHttpRequest object works in latest IE7 CTP drop?
Previous versions throw "not implemented" exception.

Thanks for info.
# April 15, 2006 12:32 PM

Andrey Skvortsov said:

You mean components written for Atlas and declarative syntax for binding that components to BOM/DOM?Why you need another client markup beside of DOM?To support declarative part of framework?But what if framework not so consistent as you think?I always thought "consistent" means easy and jquery is more easier IMHO(in this example)-all other JS frameworks has their own components and level of consistency too.
By the way,I prefer client DOM counterpart implementation on server side instead of ASP.NET control model,why not other way around-DOM on server?;-)

P.S.
I don't say that xml marup syntax is bad-it's beautiful solution by itself,but it's simply declarative part of framework and framework in turn looks not so beautiful compared to other frameworks.
# April 15, 2006 12:56 PM

Brian said:

I'll check out the IScriptComponent. btw - I totally understand that UpdatePanel is for server controls. I'm sure a lot of people create server controls with client-side functionality, animation, etc.. Going forward, lots of people will be mixing client-side controls with server controls. I thought that was the whole point of Atlas.
# April 15, 2006 11:40 PM

Bertrand Le Roy said:

Andrey: you're entitled to your preferences, choose whichever framework you find the most elegant. The xml-script declarative syntax expresses concepts that are entirely different from the XHTML DOM. We're not replacing XHTML here or even extending it. We're keeping it as is (it is adapted to what it's for: expressing the semantics and structure of your document). What we're doing with xml-script is attaching JavaScript behavior to the existing markup. This is exactly similar to what any well-designed component framework is doing with the difference that Atlas can do it declaratively with a clean separation between document structure (XHTML) and behavior (xml-script).
To be more precise about the example you show, it does reproduce the accordion behavior, but in a way that is not encapsulated and easily reusable.
# April 16, 2006 3:10 AM

Bertrand Le Roy said:

Brian: there are constraints in how you can do it. Our first approach to this was to reproduce the client-side model server-side (that was the September/PDC CTP) so that pure client-side components can interact with the server-side controls. This didn't work out too well and we actually hit showstoppers in doing so, in addition to a model that was just too clumsy. So we moved to a model where the server-side model is closer to the ASP.NET model and farther from the client-side Atlas model.
What you do now is that server-side controls can emit self-contained client-side code that only has pre-defined client-side interaction with the rest of the page. In particularwhile it is possible to build an entire application using the client-side components, we discourage the mixing of the client markup and the server markup. If you make the choice of server controls, you should only use server controls (which may emit client-side xml-script).
# April 16, 2006 3:21 AM

Michael Geary said:

onload may not work in Safari, but you can certainly use dynamic script insertion, where the way you are "notified" is that your script runs. Combine this with a JSONP-style callback and you are golden.
# April 16, 2006 4:57 PM

Sander said:

But isn't the benefit of using the "detect capabilities" approach that when browsers will implement said capabilities your library will automatically work without you having to do any work to it?

Writing to capabilities seem to make more sense then writing to browsers as browsers change but capabilities won't (unless they get respecifieid of course).

Also you say about detecting capabilities:
Adding a new browser means touching all of the code base.

But if you write to capabilities it means it's browser independent, you don't have to add a new browser? I'm probably not understanding your argumentation fully but would be interested in hearing more about it. Thanks :)
# April 17, 2006 5:00 AM

AO said:

W3 XMLHttpRequest object standard (draft) - http://www.w3.org/TR/XMLHttpRequest
# April 17, 2006 8:40 AM

AO said:

This was posted on forums.asp.net a little under a month ago... http://forums.asp.net/1242119/ShowThread.aspx

Some browser modes will need testing in lines such as: if (child.nodeName == 'UL') for child != null or some browsers (Opera, NS if I remember correctly) will give some errors at times.
# April 17, 2006 8:49 AM

Bertrand Le Roy said:

Michael: we know how to work around it, it was more an illustration of the fact that standard-compliant browsers do not eliminate the need for a compat layer.
With the solution you describe, in the general case, you need the server's collaboration to inject the callback/notofication at the end of the script, or you need the script to be executable at a non-global scope (which is fine for data). It becomes more difficult if you need to be able to dynamically load and execute an arbitrary script and be notified. We know a way to do it but it doesn't work cross-domain, which limits its usefulness in an environment like live.com.

Sander: you misunderstood me. The important part about the first solution is not "detect capabilities", it's "every time you need them". In the third solution (the one we're using), we *are* detecting capabilities, but only once, when the compat layer is initialized. If a capability is not there, we implement it so the rest of the code can just assume it's there from this moment on.
Even writing like that, and even with standard-compliant browsers, there are things that you can't detect just by looking at capabilities because they are there but are implemented with subtle differences. The extension mechanism may also vary from a browser to another. All that makes it necessary to add new layers even with standard-compliant browsers (Opera would need a new compat layer for example).

AO: yes, I know, see this post: http://weblogs.asp.net/bleroy/archive/2006/04/14/442970.aspx
# April 17, 2006 3:28 PM

Bryant Likes said:

a;lksjdfka;jds?

al;kjdfj! hsldhfsdfs shdlfhwe lhksdfjlsfd.sdf.

slkdfjsd!
# April 17, 2006 7:34 PM

David Findley said:

I can not stop laughing.....
asdasd
asdas
dasd
asdas
dasd
# April 17, 2006 7:50 PM

Paula Boléo said:

Hahahhaha

Its called Globalization, one can find any thing unless its something real important lol

I hgdgf you forever
# April 18, 2006 7:01 AM

Tran Nguyen said:

hahaha, this is so funny
# April 18, 2006 11:47 AM

Tobias said:

Yes it does!
But no longer as ActiveX control but as native XmlHttpRequest.
More details: http://blogs.msdn.com/ie/archive/2006/01/23/516393.aspx
# April 18, 2006 1:39 PM

Brian H said:

The amazing thing is someone has already bought the album. Goes to show you people have too much money, time, and ignorance.
# April 18, 2006 2:38 PM

Peter Bromberg said:

Bertrand,
This is hilarious. I ek2eowdk sdsdk sdskhgdf!


# April 18, 2006 3:33 PM

TrackBack said:

I guess I'm becoming a regular source of news for these guys :D I like that, I'm a fan. They're one of my main sources of tech news.
# April 19, 2006 3:41 AM

TrackBack said:

Shawn leads the Atlas Toolkit team.
# April 19, 2006 3:43 AM

TrackBack said:

I can't read a word there but it doesn't look like spam as far as I can tell...
# April 19, 2006 3:45 AM

TrackBack said:

Ars Technica points to this blog (again). Can't complain...
# April 19, 2006 3:47 AM

TrackBack said:

a19s points to this post
# April 19, 2006 3:49 AM

Bruno Alexandre said:

# April 19, 2006 9:16 AM

Andrey Skvortsov said:

How about support of IE's event model?Is there onfocusout/onmouseenter/onmouseleave support in firefox?

Thanks.
# April 19, 2006 11:25 AM

Bertrand Le Roy said:

Andrey: there is support for the IE event model in general (attachEvent, detachEvent, window.event, etc.) but not for specific events for the moment. We may add these in the future if there's enough demand for it.
# April 19, 2006 4:33 PM

kevin delafield said:

does this include previous downloads of Visual Studio express edition,
which have already been registered?

thanks,

kevin
# April 19, 2006 11:30 PM

Prasad P. Khandekar said:

It's really a nice move by Microsoft. I am really finding these tools very helpful.
# April 20, 2006 1:20 AM

Bertrand Le Roy said:

Yes, Kevin, of course :)
# April 20, 2006 1:48 AM

ender++ said:

is it possible to have mutliple version installed?
ie C# express along with C++ Express and Web Developer Express ?

# April 20, 2006 12:46 PM

Hugh J. Frazer said:

I have been reading and downloading plenty of 'free' stuff on ASP.NET. I am a retired software/hardware engineer from the old Rockwell International Missile Division (now Boeing). Running into a shortage of the cash for I have only a fixed income retirement and ss. So I decided to get back to my old living; and thanks to Microsoft learning; I am remembering alot of my old history in the Electronic Field.
So all you keep it up and I will try and akai write a few things. But I have alot of Republican hateful actions here and that will slow me up. May the Sun shine on our old bones (75) and keep the old Microsoft thinkings going.

Hughy or hu hu ha hi (ha hi is from my ham days wb6njr).
# April 20, 2006 1:20 PM

Bertrand Le Roy said:

Ender: not 100% sure, but I think yes.
# April 20, 2006 2:49 PM

Herleson said:

Hi, Ender

Yes, you can install all Express Editions without any trouble.
# April 20, 2006 3:02 PM

richardc said:

yo man, cu ;-))) (Thursday)
# April 20, 2006 6:43 PM

Shawn Burke said:

Lucky guy. I love Nice...
# April 20, 2006 10:10 PM

Heemanshu Dave said:

ha ha ha ha ..I am thing to design a software language in which we have to write code in this format.

# April 21, 2006 6:47 AM

Can Erten said:

Now google gives 202 results :) So it doesn't suggest anymore.
# April 24, 2006 1:59 AM

Saudhall said:

Looks good, and i hope it describe every thing in detail that too from scratch.

Thanks,
Saurabh
# April 30, 2006 11:57 PM

Plip said:

Mike Taulty posted a review here too where he raved about the book: -

http://mtaulty.com/blog/archive/2006/04/15/9307.aspx
# May 1, 2006 10:49 AM

kris said:

hi,

i still don't understand why there is a full blown compatibility layer in Atlas. javascript, (x)html, css ... are all well defined by the w3c.

so if you use the standards (as they should be used) it will work in any modern browser. i'd say only in 5% you will have to to a dirty trick to make your scripts work in ie. because ie6's implementation of standards is quite poor.l

also there a so many opensource js libraries that already figured out the flaws of ie and correct them. just take a look at dojo, prototype, script.aculo.us, behaviour.js and so on. why reinvent the wheel?

regards,
kris

ps. i dont want to be rude.... just a little provocation with a hope of getting answers :)
# May 2, 2006 9:41 AM

Bertrand Le Roy said:

Kris: that's only the theory. I really wish it was true but it's not. The standard implementation is incomplete or inconsistent in *all* browsers (although I agree that IE6 is the worst on that point (but on the other hand, it implements non-standard stuff that's absolutely necassary like pixelLeft and that other browsers are slowly implementing despite the non-standardness because they are just useful and were oversights of the standards but I digress)). The incompleteness can especially be felt in Safari (example: the lack of onload event on all elements) and the inconsistencies comes from the fact that many standards are vague in places and open to interpretation.
Plus, the 5% you're talking about is a huge number for us as framework developers who need to make it as easy as possible for third party developers to develop new components. These 5% (or whatever is the real number) is precisely what we need to abstract. These are very complex problems that the average developer just hasn't time to investigate and solve. Look at how complex it is to get the pixel coordinates of an element relative to the top-left corner of the page. It is absolutely necessary to abstract that. Look at the differences in the event models (IE is the one that's wrong here of course but I don't care about who's wrong, I just need to fix it). We just can't constantly deal with two incompatible event models, we need to make that consistent.
It's absolutely true that there are already other libraries out there that do a good job at cross-browser support but you need to take into account that:
* they all have some form of compat layer even if it's implemented differently.
* they do a lot less than Atlas (none of them do anything like xml-script for example).
* Atlas has constraints that other frameworks don't have (such as back-compat with ASP.NET, including third-party controls).
* Atlas is not even in beta state. We're fixing bugs actively.
# May 2, 2006 12:54 PM

Reinaldo Torrales said:

I use Professional ASP.NET 2.0 from WROX and even that some areas could use some re-work, in general the book is fairly decent. I think the sections that explains Callbacks and SqlBulkCopy could use rework. I write a lot of code that deals with huge amounts of data transfers and even that I use SQL DTS / SSIS this is not always an option. As for the Callbacks, I think Atlas is the best way to go.
# May 2, 2006 3:12 PM

lordabdul said:

I've already got CLR via C# (for .NET 2.0)... Is it worth it to get Practical .NET too?
Btw, now wonder that book is great... Patrick Smacchia is a french guy who studied at the ENSEEIHT school of computer engineering which incidentally is where I studied :) Yeeeaaaah!
# May 4, 2006 1:50 AM

Sigurdur G. Gunnarsson said:

Lol that's nothing! Try playing World of Warcraft, or rather.. don't :)
# May 15, 2006 5:54 AM

Greg Kniffin said:

I am with you on Oblivion. There are many nights when I have been playing the game when I should have been doing other things (blogging, sleeping, etc.) It is a great game, rich in content, and a good storyline - which I have on pause currently as I build my character.

The overall ROI of the game is great, just reflect on how many hours of entertainment you get out of a $60 game. I'm Glad to see I'm not the only one spending too much time with this game.
# May 15, 2006 8:13 AM

AndrewSeven said:

I was told it was a little bit shorter than Morrowind...
# May 15, 2006 8:59 AM

the numbers don't match said:

April, 2006 contains your second highest post count. 2.5 weeks still exist in May, 2006.
# May 15, 2006 9:58 AM

Bertrand Le Roy said:

Andrew: then Morrowind must have been very very long. A friend of mine spent about 250 hours on it and he's only 92% through the game (not the main quest, of course, all of them).
# May 15, 2006 12:55 PM

Martin Smith said:

Picture doesn't show up? Clicking on it takes you to Flickr sign up screen!
# May 16, 2006 3:19 PM

DotNetCoder said:

Let's see... 122 hours total in Oblivion...

Main Quest: Completed
Arena Quest: Completed
Mages Guild: Barely started
Fighters Guild: about 60% completed
Theives Guild: about 70% complted
Dark Brotherhoon: about 50% completed

AND... that is not counting all the exploring of the various ruins, caves, and landmarks...

The game is simply massive! Morrowwind didn't hold a candle to Oblivion. I'm even planning on starting a new character just to figure out some of the other race/class abilities.
# May 16, 2006 3:50 PM

Ducky said:

Well since I am stuck at work all week-end I had planned to bring Oblivion....Glad to know I wont finish it :)
# May 18, 2006 11:15 AM

Mini said:

That's nothing compared to world of warcraft, i have played 14 days now, and i ain't halfways complete. :)
# May 18, 2006 2:48 PM

Pierre said:

excellente information pour aider les Newbies a debugger :-)
# May 20, 2006 3:05 PM

Jason Haley said:

# May 22, 2006 10:26 AM

ScottGu's Blog said:

http://atlas.asp.net is the best place to visit to learn more and download the latest Atlas CTP Release...
# May 23, 2006 2:14 AM

ナオキにASP.NET(仮) said:

Nikhil&amp;nbsp; さんと Bleroy さんの blog &amp;nbsp;からです。
&amp;nbsp;
Script# Prototype
Script# brings compile-time...
# May 24, 2006 1:41 AM

Nikhil Kothari said:

Thanks for the link, Bertrand!

I should mention that Bertrand actually was a great person to ping and discuss ideas with all along.

In fact, one of the things Bertrand proposed was a cool way to model foreach C# statements to enumerate dictionaries into for (var .. in) script statements, which is one of a few C# & script constructs I really wanted to support.
# May 24, 2006 2:29 PM

Pierre said:

Live Local now displays traffic (and more), example : http://snurl.com/SeattleLiveLocalMap :-)
# May 25, 2006 6:40 PM

Rohit said:

Has anyone here faced a problem when using the client callback functionailty of ASP.NET 2.0 while having an iframe in the contentpage?

I have used an iframe in my contentpage since I use to display a calendar. However, upon doing so, the client callback no longer works. Upon trying to dig into this,  I realized that the postData variable in WebForm_DoCallback is initialized to a different value. Any help on this will be highly appreciated.
# May 26, 2006 12:05 PM

Andrew said:

The PrtScn situation really pisses me off... What's the Ctrl Alt Shift Vulcan sleeper hold combination to use PrtScn?
# May 27, 2006 1:07 AM

Mike Parsons said:

Hi Bertrand ...

Be interested in your opinion of this

http://www.michaelparsons.ca/ajax/MyAJAXToolKit.html

# May 27, 2006 7:07 AM

Bertrand Le Roy said:

Rohit: if you choose to use an iFrame, what's inside the iFrame is basically another page so I wouldn't even use callbacks in this situation, I would just point the frame to a page that contains only the calendar and does regular postbacks.
Even better, don't use an iFrame...
# May 27, 2006 7:34 AM

Bertrand Le Roy said:

Mike: I've watched the video and I think this is really cool. But it's very different from what we're trying to achieve for a number of reasons.
The main one is that you're not really creating a web application but rather running a Windows Forms application in a web environment (which is still pretty cool).
It seems to be really close to what XAMLON is doing. They have an engine that can run a Windows Forms application in Flash or DHTML (which is exactly what you're doing). I saw it at the PDC in September and it is pretty cool too.
One thing that's not shown in the video is how you create the web services that you're calling and if they are secured.
Also, you're only showing labels and textboxes. What about more complex controls? What about control authoring? What about existing third party controls that your customers may assume can be used directly?
# May 28, 2006 2:02 PM

<script> said:

<script>
</script>
# May 29, 2006 8:11 AM

Pieter Siegers said:

Hi Bertrand, I'm Pieter.

Do you know where an exact diagram can be downloaded? The link seems dead.

I need to look up why some events do fire twice during a postback; for instance having a gridview, why is the RowCreated event fired twice for each subsequent postback, for each header / row / footer / pager? How do I workaround when I only want RowCreated to execute some code only once a postback?

Many TIA!
# May 30, 2006 4:52 PM

Pieter Siegers said:

Hey, this sounds cool Bertrand - I'll recommend the book here at work! :-)
# May 30, 2006 4:54 PM

Labhesh Shrimali said:

I have asp.net 2.0 application, i have tryed using front controller to implement MVC in the Application.
I could able to get the IhttpHandler for the page.
but on my page i have some controls like text box, drop down etc. I would like to have values of those controls to be populated. so that i can do some operation.

In Base Line: I have page for AddUser & Edit User. So when i want to add the user the control goes to IhttpHandler and it checks that the Mode is to add user. but how do i get the user name from Page.- textbox. in ihttphandler or Controller.

If you have any problem in understanding me, please do write me. please respose as soon as possiable.


--
Desperately seeking closure
Labhesh Shrimali
http://www.shrimalis.com/
Bangalore-India
# May 31, 2006 8:23 AM

Bertrand Le Roy said:

Pieter: I'll ask Léon where the diagram can be downloaded.
In the meantime, the RowCreated event is fired twice if the grid is created twice. So look in your code for stuff like binding too late: I'd bet you're databinding on every postback after viewstate has been restored. Just a wild guess.
# June 1, 2006 12:14 PM

Bertrand Le Roy said:

Labhesh: I think you're trying too hard to use the MVC pattern which is not as natural in ASP.NET as it is in Java for example. There are quite a few MVC frameworks for ASP.NET, but I recommend that you read Martin Fowler's Patterns of Enterprise Application Architecture and in particular the Page Controller pattern which describes the natural pattern for ASP.NET. I hope you'll find that it's a reasonable approach that works well with ASP.NET. Accessing control values will then become absolutely natural.
# June 1, 2006 12:22 PM

Dexter McCloud said:

Will this book be published in hard-cover as well?
# June 1, 2006 2:29 PM

Bertrand Le Roy said:

For the moment it's PDF only as it's a short book that will probably be updated regularly (at no extra charge).
# June 1, 2006 2:32 PM

neks said:

this is great
# June 1, 2006 9:04 PM

Richard Becker said:

I purchased this work and want to thank you for making me look like a hero!  No more flashing :-)

However, I have a problem:
I have a button, list box, and two radio button lists on my form.  The radion button lists are causing a full postback, even though I've coded the triggers as follows (radio button lists are triggers #3 and #4):

<atlas:UpdatePanel runat="server" ID="chartPanel" Mode="Conditional">
 <Triggers>
   <atlas:ControlEventTrigger ControlID="btnChart" EventName="Click" />
   <atlas:ControlEventTrigger ControlID="ddlBenefits" EventName="SelectedIndexChanged" />
   <atlas:ControlEventTrigger ControlID="rblChart" EventName="SelectedIndexChanged" />
   <atlas:ControlEventTrigger ControlID="rblSort" EventName="SelectedIndexChanged" />
 </Triggers>
 <ContentTemplate>
     <asp:Image runat="server" ID="chart" CssClass="chart" />
 </ContentTemplate>
</atlas:UpdatePanel>
# June 2, 2006 11:27 AM

Bertrand Le Roy said:

Richard, I'll investigate that. Thanks for buying the book :)
# June 2, 2006 11:49 AM

Richard Becker said:

Thanks Bertrand.

One additional piece of info that might be helpful; I have a CustomValidator control coded between the two controls that work and the two that don't.  I commented the CustomValidator, but this didn't solve the problem.
# June 2, 2006 12:24 PM

Bertrand Le Roy said:

Richard, I've reproduced the problem and have opened a bug to track the issue. Thanks.
# June 2, 2006 8:06 PM

this is very good said:

this is related article
# June 3, 2006 8:31 AM

Myself said:

"Nevertheless, many climate researchers have been unable to explain why evaporation figures have decreased in areas where rainfall and cloudiness have become more prevalent. If less water vapor is moving into the atmosphere, how could more rain and clouds be forming?"

The above comments was witdrawn from a CNN report on the evaporation "paradox". However, there is no paradox as well as there are no other paradoxes in this area, and the CORRECT AND REAL solution to these questions you find in http://noparadoxes.tripod.com. These "paradoxes" appeared only due to the lack of a suitable background on the evaporation and atmospheric processes. That is really THE solution.


# June 3, 2006 5:10 PM

Bertrand Le Roy said:

"Myself": what does this have to do with black hole evaporation???
# June 4, 2006 4:26 PM

Richard Becker said:

Sorry to be a bother, but is this the url to be used for support info (i.e., info on bug fixes, updates, etc)?

Thanks again for this control.
# June 6, 2006 4:19 PM

Bertrand Le Roy said:

Richard: the best place for support currently are the ASP.NET forums:
http://forums.asp.net/1007/ShowForum.aspx
Info on updates is published on the Atlas blog:
http://atlas.asp.net/default.aspx?tabid=47
# June 6, 2006 4:26 PM

Steve said:

Quick question: Do updatepanels have a 'timeout' value?

A coworker is using the updatepanel and progress indicator for a long running process - with scriptmanager disabling partial refresh, the code finishes.  With SM enabling partial refresh - it eventually just stops running with no error, etc...

Any ideas?
# June 10, 2006 8:54 AM

steve said:

Microsoft Atlas make developer life easier in creating Ajax Website. New Microsoft Atlas Resources is created at : http://www.AtlasASP.com/
# June 11, 2006 1:30 AM

Bertrand Le Roy said:

Steve: good question. I'll open a bug to track that issue.
About your website, if you had dropped me a quick message through the contact page, maybe I would have made a post to point at it, but seeing that you posted it as an off-topic comment like the average spammer, it will have to stay in the comments ;)
# June 12, 2006 2:17 PM

Jeff W. Barnes said:

A lot of cool stuff on the wire this week:

Consequence of leaving debug=&quot;true&quot; enabled
Rick Strahl...
# June 12, 2006 4:18 PM

Jeff W. Barnes said:


Vista Release Date Speculation
Windows Workflow Foundation Beta 2.2 Released
New IE7 Release for...
# June 12, 2006 4:30 PM

Ryan O'Connor said:

This is one of the most useful pages I've found on overriding equals and gethashcode. It clears up so much, and applies equally to Java too! Thanks!
# June 14, 2006 6:08 AM

jvierra said:

That's why  Ihave been using XMLHTTP since it was made available.  It works, it's straght out useable and it looked like a good bet for a standard.

MSXML objects are very user friendly unlike th eearly days of "ADO".

# June 15, 2006 7:35 PM

Tooky said:

This stuff is all so cool.
Im 14 and wish to go into this field later on.
Is there any such thing as a worm hole?
i dont think there is but if there is what is it??
# June 21, 2006 2:46 PM

NiklasEngfelt said:

Thanks alot for a very cool component. It would be even nicer if you could start a slide show in which you could choose how many seconds you want it to wait between each fully loaded picture. Perhaps some Ajax/Atlas could take care of that?
# June 21, 2006 3:32 PM

Kevin R Hurst said:

Collin Yeadon,

As far as your code sample, do you just put it on a page? It didn't really work when that was tried. any suggestions?
# June 21, 2006 5:02 PM

Bertrand Le Roy said:

Tooky: wormholes are a theoretical possibility in many cosmological models but nothing has been observed so far. They are connections between parts of a spacetime that are otherwise remote in time and/or space. Imagine cutting two holes in a sheet of paper and gluing them together. If you had to travel from the place where one hole is to the other, if the holes weren't there you'd need to follow a path on the sheet. Now, with the holes, you can travel instantly from one place to the other. Furthermore, you could even theoretically travel to otherwise inaccessible places like the past. It's a shortcut in spacetime, if you want.
# June 21, 2006 6:51 PM

Bertrand Le Roy said:

NiklasEngfelt: Yes, this is on the list of things to do.
# June 21, 2006 6:52 PM

Rio said:

Can u tell me how implement this.
I mean that how to create simple album application.
Pls
# June 27, 2006 4:11 AM

Bertrand Le Roy said:

Rio, why don't you start by downloading the source code and studying it?
# June 27, 2006 4:19 AM

Adrian said:

The problem is not present in IE7. However, I very much appreciate the solutiion presented above. IE6 will be around for some time yet.
# June 28, 2006 7:08 AM

Timo said:

Another happy book owner :) I don't know if this one falls in to the category "Dealing with Caveats", but I'm having issues with nested UpdatePanels. I have an "UpdatePaneled" Wizard-control and it works partially ok. However in one wizard step I'm using PopUpControlExtender so that whenever user clicks the form field, a popup calendar is displayed. So whenever I'm trying to step in to that wizardstep I get an JavaScript error: 'null' is null or not an object. This extender works ok when there is only one UpdatePanel present (with PopUpControlExtender), but not with both set (on the wizard and extender). Any ideas?
# June 29, 2006 1:54 AM

Jason Kealey said:

Brian: I think I had the same problem you did with openrico accordion. My accordion behaviour was still working, but the accordion lost all its styling (background colors, etc.). Turns out that I was linking to my stylesheet using outside of my head. I added my stylesheet the right way (server-side) and not it works fine. public void addCss(string url) { if (Page.Header != null) { HtmlLink cssLink = new HtmlLink(); cssLink.Href = url; cssLink.Attributes.Add("rel", "stylesheet"); cssLink.Attributes.Add("type", "text/css"); Page.Header.Controls.Add(cssLink); } } } My accordion is not inside an update panel though...
# June 29, 2006 11:22 AM

Bertrand Le Roy said:

Timo, please send me a repro page at bleroy (at microsoft).

# June 29, 2006 1:28 PM

Skinny Runt said:

dork :D
# June 29, 2006 6:05 PM

Bertrand Le Roy said:

I know :|

# June 29, 2006 6:07 PM

dave said:

that's hilarious :-/
# June 29, 2006 7:37 PM

ced said:

good work
# June 29, 2006 9:35 PM

Mukesh said:

Hi... Thanks for .... Can you give one more example of this in detail. Mukesh
# June 30, 2006 3:15 AM

Chris said:

It is wrong to be as amused as I am. And yet, I am. :)
# June 30, 2006 11:20 AM

Michael Beebe said:

folks, I have made multiple tries/uninstal/reinstall & etc. to install Atlas on my VS 2005 app with OS=Win 2003 server/SP1 and the template will not show up when I try to create a new web site. Altas seems to install and files are in the proper directory, but template is never available. When I try to simply copy web config inform into web config file (and dll into Bin folder) I get multiple web config errors. HELP, please. Thanks, M.Beebe PS I have IIS loaded, too & SQL server 2000
# July 2, 2006 4:23 PM

おがわみつぎの SQL Server な BLOG said:

[ASP.NET]Atlas CTP June 2006

# July 2, 2006 10:40 PM

Gregor Suttie said:

Cool cant wait to try it out and get a look at the updated pdf.
# July 3, 2006 4:08 AM

Bertrand Le Roy said:

Michael, please contact me directly and describe the multiple errors that you get. bleroy (at microsoft).

# July 3, 2006 2:20 PM

Atlas notes said:

Info and download here. Be sure to checkthis post by Bertrand LeRoythis post by Nikhil Kothari

# July 4, 2006 3:40 AM

My2Cents said:

Well, seems I was censored first time, so let us put it mildly now. I know Ruby is a great success and has a good web framework called Rails, well, I still don't see the reason for such a brouhaha, given Ruby's similarity to Smalltalk. Clever guys knew twenty years ago that dynamic languages are good, hipsters just need all those "Rails" and "pragmatic programming" books and websites to jump in.
# July 5, 2006 6:00 AM

Kalimuthu govindasamy said:

Hi., plz, give the demo version controls.,
# July 5, 2006 6:27 AM

Bertrand Le Roy said:

My2Cents: you were not censored by me. Maybe you got filtered by the automatic filters the first time. I didn't see another comment from you.

I don't think I'm making a brouhaha, but it's more exciting and interesting from my point of view to see Ruby being adapted to .NET for two reasons. First, it hasn't been done before. Second, Ruby is being immensely more successful than Smalltalk ever was so having it for .NET is just more significant. I'm not judging in terms of quality, just in terms of success and reach. Maybe there's a reason why Smalltalk never really took off, by the way?

If you need Smalltalk for .NET, it seems like there are already several implementations:

http://www.refactory.com/Software/SharpSmalltalk/

http://www.smallscript.net/Community/community_home.asp

# July 5, 2006 2:33 PM

Bertrand Le Roy said:

Kalimuthu: I don't understand what you mean by "demo version controls".

# July 5, 2006 2:34 PM

Cyril 's Blog said:

Bertrand Leroy, un des d&#233;veloppeurs du projet Atlas de Microsoft a fait une interview o&#249;&amp;nbsp;il parle...

# July 7, 2006 3:48 AM

Cyril said:

Peux t'on savoir quand a été tourné la vidéo ? et où en êtes vous au niveau du support d'opéra? :-)
# July 7, 2006 3:52 AM

Nico Oosthuizen said:

I cant get this to work could somebody please help
# July 7, 2006 8:40 AM

Bertrand Le Roy said:

La vidéo a été tournée ce printemps, je ne sais plus exactement quand.

Opera: On y travaille, rien n'est fermement décidé, donc tout feedback est apprécié. :)

Quel niveau de priorité Opera représente-t-il pour toi et/ou tes clients?

# July 7, 2006 2:21 PM

Bertrand Le Roy said:

Nico, please give me more details by mail. bleroy (at microsoft).

# July 7, 2006 2:22 PM

cyril said:

Opéra n'est pas trés important pour moi. J'aime bien ce navigateur pour ces diverses fonctionalités mais malheureusement le JavaScript est trop bridé ... :s J'ai vaguement regardé où était le problème entre Opéra et Atlas et j'ai vraiment envie de voir comment vous allez contourné le problème ;-) Je pense néanmoins qu'il est important d'être compatible avec Opéra pour ne pas laisser dire qu'une fois de plus Ms ne fais rien de standard etc ...
# July 8, 2006 7:42 PM

cyril said:

Opéra n'est pas trés important pour moi. Mais si Opéra n'est pas pris en charge c'est laisser une porte ouverte aux trolleurs : "Ms ne fais que des trucs non standards" etc blablabla ... Voici pourquoi d'aprés moi Opéra est important : pour l'image ... :-/
# July 9, 2006 1:08 PM

Bertrand Le Roy said:

Cyril: merci de ta réponse. C'est triste à dire, mais ceci est à peu près la seule raison qui nous pousserait à supporter Opera...

# July 10, 2006 1:56 PM

Cyril said:

Bon courage :-)
# July 11, 2006 3:49 AM

Lee said:

Thanks for the code. Because Atlas is still so new it really is frustrating when no working example of the code is displayed.
# July 11, 2006 10:17 PM

EzecKiel said:

Je pense qu'il est effectivement très important que Microsoft supporte Opera. C'est un navigateur qu'il ne faut pas négliger même s'il est beaucoup moins utilisé que les 2 autres. A mon avis ce serait une erreur de ne pas le supporter. (D'autant que c'est un navigateur de bonne facture). Bon maintenant, c'est vrai, c'est facile à dire et je ne sais pas vraiment ce que çà représente de supporter un navigateur de plus.
# July 18, 2006 10:54 AM

Bertrand Le Roy said:

Ezeckiel: je suis personnellement en faveur de le supporter, mais il faut bien admettre que tes arguments n'en sont pas vraiment. As-tu des raisons plus... business que "ce serait une erreur" de ne pas le faire?

# July 18, 2006 1:53 PM

Derek said:

This control does not work properly with Master Pages. The callback from an Alert never fires.
# July 18, 2006 2:37 PM

Bertrand Le Roy said:

Derek: this has been fixed more than six months ago in release 1.0.1 that you can download from here:

http://www.gotdotnet.com/workspaces/filesharehtml/filesharehtml.aspx?id=30be1e25-30c6-44ed-8a0e-f9713a22b175

The source code also reflects that change.

# July 18, 2006 4:56 PM

Derek said:

Yes. Using the 1.0.1 Release, it still does not fire the event.
# July 18, 2006 5:20 PM

Bertrand Le Roy said:

Derek, you'll need to send me a repro of your problem. I retested this morning with a master page and didn't see a problem.

Ideally, file a bug here:

http://www.gotdotnet.com/workspaces/bugtracker/home.aspx?id=30be1e25-30c6-44ed-8a0e-f9713a22b175

# July 18, 2006 5:24 PM

Derek said:

Alrighty. I contacted you via GotDotNet's system with a URL to download a sample of it. I hope this helps some.
# July 18, 2006 5:36 PM

Bertrand Le Roy said:

The bug is fixed in 1.0.2 that I just uploaded. Thanks for the bug report.

# July 18, 2006 9:31 PM

Christophe Lauer, Blog Edition said:

La question du partage des variables de sessions revient assez souvent, pas plus tard qu'hier pendant...

# July 19, 2006 5:15 PM

Masoud Shokri said:

I like to mention these(Though I am not sure if people read these at the bottom of the list) 1 - ASP.net 2.0 comes with the GREATE PROVIDER MODEL 2 - You can deploy your dlls without registering them , this is a very great leap! 3 - You can use the same library for Console app, Windows App and Web App 4 - Masterpage, Themes and skins (More comment needed?) 5 - the View State stuff! All of you forgot it. 6 - The very great language (mr C#) 7 - The portal framework 8 - You can use Enterprise Library Anything else? Yes, I see the day that PHP dies, sorry for saying that. But I see that day. Like java appletes. Who uses them now? Flash is out there, and it kills java applets, and If you want to use something but ASP.NET why do not you try Cold Fusion or JSP? And about the price, it is not really different on a shared hosting is it?
# July 19, 2006 7:32 PM

Masoud Shokri said:

Ahh, how many people use MAC? a few. How many people use Linux? a little more. So why hackers attach MS? Have you ever know the rich guy hasn't so many friends?
# July 19, 2006 8:01 PM

Masoud Shokri said:

http://www.zend.com/news/zendpr.php?id=108 take a look here, does it work for you?
# July 19, 2006 9:00 PM

EzecKiel said:

Je ne voulais pas argumenter mais simplement donner mon avis et aller dans le sens de Cyril. Qualifier le Framework de "Cross-Browser" et ne pas supporter Opéra est un peu gênant même si effectivement Opéra est utilisé par une minorité d’utilisateurs (1% des navigateurs utilisés en Juillet je crois). Cependant Safari est aussi utilisé par une minorité d’internautes. Et je crois qu’Opéra est utilisé par de plus en plus d’utilisateurs alors que Safari est abandonné au profit d’autres navigateurs. Je pense comme Cyril que c’est une question de réputation. Pour la majorité des développeurs, Microsoft n’a pas le droit à l’erreur. Et c’est de cette réputation que va dépendre (entre autre, il ne faut pas exagérer non plus) le succès d’Atlas. Après côté Business, je ne sais pas quel coût représente le fait de supporter un navigateur de plus, je ne peux effectivement pas peser le pour et le contre d’une telle prise de décision. Maintenant c’est clair que je me fais l’avocat du diable et que quoiqu’il en soit, Atlas est très prometteur et je l’utiliserai de toutes façons !
# July 20, 2006 5:53 AM

Bertrand Le Roy said:

Masoud: what is supposed to be on this page? It comes out empty for me.

# July 20, 2006 1:52 PM

Bertrand Le Roy said:

Comme je l'ai dit plus haut, je suis en faveur de le supporter, mais nous n'avons toujours pas trouvé d'autre raison de le faire que "nos ennemis vont s'en servir contre nous si on ne le fait pas". C'est triste.

Opera gagne un tout petit peu de terrain depuis qu'il est gratuit, et il en gagnera encore en termes de navigateur mobile, mais il en perd aussi au profit de Firefox. Ça reste aux alentours de 1%.

Je ne crois pas que Safari perde du terrain, au contraire. Les Macs se vendent bien en ce moment et c'est le navigateur par défaut sur cette plate-forme, ce qui est un argument fort pour le support de ce navigateur, bien plus que sa part de marché, qui avec 2% est dans la même catégorie qu'Opera. ne pas supporter Safari, c'est ne pas supporter le Mac en tant que plate-forme, alors que ne pas supporter Opera, c'est juste ne pas supporter un navigateur marginal.

Pour répondre à la deuxième partie de ta question, supporter un nouveau navigateur coûte cher en test, pas tellement en développement. Sans vouloir faire la langue de pute, c'est pour ça que d'autres frameworks dont le support est assuré par la communauté ou par quelques personnes, sans engagement contractuel, peuvent se permettre beaucoup plus facilement de supporter 120 browsers différents. Ils peuvent se le permettre car ils ne les supportent pas vraiment...

# July 20, 2006 2:00 PM

Masoud Shokri said:

It is supposed to be one of the zend's website's pages, talking about relationships between zend and oracle, but it doesn't work for me, like many pages in zend.com I had this experience with so many php sites, Why?
# July 20, 2006 2:58 PM

Masoud Shokri said:

And something else, where can I ask some questions about Atlas? I am new to Atlas.
# July 20, 2006 2:59 PM

Bertrand Le Roy said:

Masoud: you'd have to ask them why their pages don't work ;)

About Atlas, I encourage you to visit http://atlas.asp.net. The site has lots of information and forums where you can get assistance.

# July 20, 2006 3:06 PM

Masoud Shokri said:

Thanks, I have seen it, Its cool though it was much better if they had this documents in pdf format!
# July 20, 2006 6:30 PM

EzecKiel said:

Hmmm... je ne vois pas d'autres raisons à part pour l'Image et le fait que ce soit compatible tous navigateurs. Par contre je pense que c'est une raison suffisante, même si çà coûte cher en test. Je pense que çà incitera les chefs de projets à utiliser ce framework si il est 'compatible tous navigateurs' (je pense notamment aux projets web pour les administrations en France qui veulent des trucs pas croyables genre site xhtml 2.0 + css compatible Netscape 2.0 :-) Il faut reconnaitre que ce serait un sacré gain de temps pour les développeurs de ne pas avoir à se pastiller les tests de compatibilité Opéra. Ca peut peut-être même entrainer les développeurs / chefs de projet à changer de technos... JSP -> ASP.NET par exemple. Il faut voir çà comme un investissement. Je pense que la compatibilité tous navigateurs sera un gage supplémentaire de la qualité du Framework Atlas et donc çà poussera davantage les développeurs à l'utiliser. Quand penses-tu que la décision sera prise ? Tiens nous au courant et bon courage ;-)
# July 21, 2006 9:42 AM

Bertrand Le Roy said:

On ne supportera jamais "tous" les navigateurs. Par exemple, nous ne supportons officiellement que la dernière version de Safari et Firefox, et les deux dernières d'IE. Si nous supportons Opera, ça sera pareil: dernière version seulement.

# July 21, 2006 2:12 PM

Tariq said:

hi...i want the code that admin alert that the database is updated or alert the admin ..that user have a compalin....
# July 22, 2006 8:21 PM

Andres said:

Thanks for this tip! I was looking exactly that.
# July 23, 2006 2:28 AM

EzecKiel said:

Oui c'est sur, faut pas non plus tomber dans l'extrême !!! C'est déjà pas mal. Et maintenant j'arrête çà frise le flood :)
# July 24, 2006 3:52 AM

Bertrand Le Roy said:

Tariq: can you be a little more explicit about what you're trying to achieve? If you're trying to send mail alerts, you should try to go to http://www.systemnetmail.com/

# July 24, 2006 2:54 PM

Stine said:

Thanks a lot for the hack!! I was not at all happy with hiding my selects..... Now I am just wondering if there is any reason not to put the content of my div into the iframe instead?:)
# July 25, 2006 8:30 AM

Bertrand Le Roy said:

Stine: yes, there is a very good reason not to do that. If the select is in the iFrame, it will be in a different page, and thus in a different form, so you won't see it when you post.

# July 25, 2006 1:55 PM

cathartik said:

Scroll lock is often used in unix to scroll up the console. Print Screen is a good key to have, hit printscreen, go into photoshop and ctrl+v. Instant screenshot. I'm not sure why some of these people are having trouble with PrtScn... you press the key... ooooh tough. No key combo required.
# July 27, 2006 11:45 AM

Bertrand Le Roy said:

Cathartik: from memory, how do you take a screenshot of the current window? Anyway, you missed the point: on these newer keyboards with the ridiculous F-key, just hitting the print screen key does not work, you need a key combination to get it to work. Please don't make fun of people unless you're sure you understood what they were talking about (<sarcasm>thank you so much for teaching me what the print screen key is for</sarcasm>).

# July 27, 2006 2:53 PM

Alexis Kennedy said:

I second Ryan's comment - you've cleared a gathering headache, thanks.
# July 29, 2006 8:46 AM

Kris van der Mast said:

Hi, great example. But in order to get it to work I had to import the namespace System.ComponentModel and create a Button_Click eventhandler. The Button_Click event can be easily added by selecting Edit Template on the DataList control and double clicking the button. The namespace can be imported by adding this statement to the top of the page: <%@ Import Namespace="System.ComponentModel" %> Grz, Kris.
# July 29, 2006 9:42 AM

Jason Haley said:

# July 29, 2006 11:46 AM

Bertrand Le Roy said:

Kris: you're right. I've simplified the sample and removed these requirements so that one can concentrate on the datasource, which is the really important part. Thanks for the heads up.

# July 29, 2006 3:06 PM

mike said:

Note that XmlDataSource defaults to assuming that "column values" are represented as attributes rather than child elements; in the latter case, you have to add a transform for it to work. Also, inline XML can't be updated, right? So if your sample wants to illustrate update, things are a bit more complex ...
# July 29, 2006 3:56 PM

Kevin Nixon said:

how do i set an id in xml that will increment by one every time i add a new table? ex red blue
# July 29, 2006 9:22 PM

Bertrand Le Roy said:

Kevin: not sure I understand the question. This is literal contents, so you just set any id attribute you want to each of the records.

# July 30, 2006 4:07 AM

Ronny said:

You can not compaire it with java script
# July 31, 2006 10:58 AM

Bertrand Le Roy said:

Ronny: I don't have the slightest idea what you're talking about but I'm pretty sure I didn't compare anything to JavaScript in this post. Can you please elaborate?

# July 31, 2006 12:18 PM

Nis Wilson Nissen said:

I agree with you that if you don't buy into the whole unit testing thing then you are just hoping for the best with dynamic languages. But to say that unit testing is just there to do the job of the compiler (in statically typed world) is false statement I believe. In a statically typed world unit testing has many benefits too. Also, I believe that the ability to treat objects that exhibit the same characteristics in a uniform way is powerful. In a dynamically typed world I believe it is easier to utilize this, because you are not dependent on some object to implement some interface. For instance, if your daugther plays the role of a duck in a school play, she'll need to participate as a duck and answer to that interface if you will. Your daugther does not implement the duck interface because the designers didn't think of that and refactoring your daugther to implement that interface may not be an option. Still she's able to play the part of a duck in a school play. Things often exhibit dynamic properties that their designers hadn't thought of - which is what I like about dynamic languages. Cheers, Nis
# August 1, 2006 4:47 AM

ナオキにASP.NET(仮) said:

More Atlas stuff&amp;nbsp;からです。 &amp;nbsp; Using the XmlDataSource Data property for easy samples &amp;nbsp;...

# August 1, 2006 6:37 AM

Bertrand Le Roy said:

Nis: I never said that. We're using TDD here and we completely buy into unit tests. I did not say that unit testing is just there to do the job of a compiler. Quite the reverse actually, I said that using unit tests to do the job of a compiler is a vain exercise.

I think the crux of the discussion is that both duck typing and interface based programming are about contracts. The point is that duck typing is a very loose and unexplicit (when not completely hidden) contract. How and by whom this contract is fulfilled is irrelevant, it's the contract that matters.

This blog post aims at finding a way to enable interface based contracts that work in a dynamic language and to understand why duck typing is considered such an important aspect of dynamic languages. We have a few ideas in the Atlas team about this but the feedback is important to us.

# August 1, 2006 1:56 PM

ASP.NET Team Blogs said:

It's the second time in just a few days that I see blog comments attack Atlas on its compatibility layer.

# August 1, 2006 2:48 PM

Mike Moore said:

I've been using Ruby for a while now and, yes, there are problems. But the expressiveness of the language and the ability to design my code in a pure Object Oriented way eliminates my need for interfaces and static compilations. I think duck typing is an easy way to show how different dynamic languages are. Being able to take a string variable and make it an array cuts to the core of the language differences. I've found that I can wring my hands about the lack of X or the differences of Y, but to me the point is that once you give yourself to it you will code differently. And you will be a better programmer - in any language. And I happen to think that code will be better.
# August 1, 2006 6:54 PM

Bertrand Le Roy said:

Mike: that's interesting feedback. I'm curious about the string thing: in .NET, a string pretty much behaves like a char array if you want it to. It has an integer indexer, you can foreach it, etc. So what more does Ruby buy you in this case?

Also, how do you answer the points about duck-typing contracts being hidden and difficult to discover? What about explicit error messages when it fails? Do we care more about that because we are framework developers and have more users or is it a universal concern that app devs face too?

# August 1, 2006 9:05 PM

Simone said:

Bertrand, did you actually read it? The language he uses is almost incomprehensible. Thumbs down to the editor, I would never publish such a book.I agree on the value of the contents, but reading it is a pain.
# August 1, 2006 11:58 PM

Nis Wilson Nissen said:

Hi Bertrand, sorry if I misread your statement about unittesting. I was probably skimming too fast :-) I see your point about contracts being important. It would be neat if you could somehow check if an object adheres to a certain interface (contract) at runtime without the object explicitly implementing that interface. It is often easy to do that manually, but I'm thinking more in terms of some language construct like "is_a" or just "is". Also, some languages (like Javascript) allows you to add methods to classes (and some also objects) so the contract might only be fullfilled at some point later during runtime. If you mixin a number of methods at runtime, it would be nice if these methods could carry with them an interface that belonged to that particular mixin.
# August 2, 2006 3:56 AM

Bertrand Le Roy said:

Simone: I've read the French edition. The English one seems to be self-translated and I've heard from a few folks other than yourself that it could take some serious editing.

# August 2, 2006 12:56 PM

Bertrand Le Roy said:

Nis: that's an interesting idea (checking against an interface's members even if the interface itself was not declared). My thoughts were more leaning towards the second option of allowing for modifications to the type information of the object at mixin time. This way, one can be sure that the code that did the mixin actually intended on fulfilling the contract.

# August 2, 2006 1:04 PM

Mike Moore said:

Bertrand, I'm working on a blog entry to give a more detailed response. But to address your second question about duck-typing contracts being difficult to discover I'm going to simply say that if you find yourself wanting to implement interfaces then your design is too complex and should be refactored. Dynamic languages allow you to simplify your domain more than system languages like Java and C#. What I need an interface to do in C# I can do simpler with open classes in Ruby. I hope to have a more concrete example in my blog entry.
# August 2, 2006 5:11 PM

ASP.NET Team Blogs said:

We already knew that JavaScript had some issues with semantics. Here&#39;s another funny one. Guess what

# August 2, 2006 7:38 PM

EricW said:

Not as silly as you think. NaN is a property of the Number object. It is intended to be uses in comparisons, not as a value (object or not) of its own. You can think of it as a special form of Number or as a special type within the Number object. Number is really a helper object, mainly to deal with conversions to strings. So if you keep in mind that NaN is intended to be used -- by javascript -- as a test value for the function IsNaN, it perfectly makes sence.
# August 3, 2006 3:44 AM

Development Odyssey said:

Bertrand LaRoy, over at More Atlas Stuff, has discovered some truly weird JavaScript behavior. Apparently...

# August 3, 2006 11:19 AM

Bertrand Le Roy said:

Eric: sure, I was just pointing out that it's funny. Please notice that I didn't say it was stupid ;) but I wouldn't go so far as saying it "perfectly makes sense".

# August 3, 2006 1:58 PM

Abo Saqr said:

Dear Sir, Can you please send the code in VB to my email: abosaqrs@yahoo.co.uk thanks
# August 4, 2006 6:30 PM

Bertrand Le Roy said:

Abo: the VB source code is available from the GotDotNet workspace. Just follow the link.

# August 4, 2006 6:32 PM

Kori Francis said:

Wow .. I think the idea is novel, but the name ... could use some work (imo).
# August 5, 2006 4:11 AM

Bertrand Le Roy said:

Kori: actually no, it's not a new concept, nor is the name. Look it up in wikipedia:

http://en.wikipedia.org/wiki/Mixin

# August 5, 2006 3:08 PM

Travis James said:

This is very cool stuff that was highlighted as an important and powerful language feature at the recent Lang.NET Symposium.
# August 6, 2006 7:12 AM

InfinitiesLoop said:

Even if its not strictly "necessary", just the fact its comparable to extention methods in C# makes it a good fit for Atlas. Atlas has many analogies to .net, why not take extentions methods too? In fact, why not call it an extention method instead of a mixin (even if that is what it is).
# August 6, 2006 2:00 PM

InfinitiesLoop said:

It's almost too bad you can't reassign other primitives. It would open the door to a whole new world of client-side obfuscation! :)
# August 6, 2006 2:04 PM

Zach Parrish said:

I would go so far as to say that is strictly "necessary". I'm glad to see someone do it for Atlas coding. I use Prototype quite a bit and it would be pretty useless to me without its Object.extend functionality, which is essentially the same idea.
# August 7, 2006 9:18 AM

David Taylor said:

Yeah...it probably makes sense given many developers will be learning about extension methods in C# anyway. On another topic: It would be great to see Atlas or the control toolkit to include a Tab (TabbedPanel) control allowing you to move between different tabs and have different panels show. The accordian control is great, but a tab control would be more useful for most people. I dont know if you remember...but back in 2002 Microsoft release a DHTML ASP.NET control that did this for IE only, but for all other browsers it fell back to postbacks. David Taylor
# August 7, 2006 12:07 PM

Bertrand Le Roy said:

David: I'll hand that comment over to the toolkit folks.

Zach: I didn't know prototype did that. I'll have a look at their public docs.

# August 7, 2006 2:35 PM

Billy said:

Any suggestion on how to alter the viewIndex that is used on page load? I have used these panels in a window that pops up, but certain times I would like the first panel to be displayed, and other times I would like the second panel to be expanded initially.
# August 7, 2006 4:11 PM

Bertrand Le Roy said:

Billy: yes, you can set the viewIndex from the xml-script tag. This way, it will change without playing the animation. If you're not using xml-script, just set the index before you call initialize.

Maybe what you want to do is make sure only the pane that you want is shown, even before the scripts are initialized and the control gets a chance to hide the other panes? If that's the case, you'll have to do that in the HTML and CSS, by setting the overflow to hidden and the height to 1px on the other panes.

# August 7, 2006 4:35 PM

Brian said:

"BLOCKED SCRIPT;" as the src still causes the warning message to show on https pages for me in ie6sp2... I have found that src="BLOCKED SCRIPTfalse;" works perfectly (though in firefox the iframe will display 'false', so make sure to set a background for the div above it). The reasoning behind this still eludes me - meh.
# August 9, 2006 7:03 PM

mike said:

yeah, thats one of the key things that keeps me using prototype is the mixins, along with extending the dom element to do quick styling or using css selector to bind to many elements. Being about to do $('id').setStyle({position: 'absolute', zIndex: 99}); is just wicked. however you do have the xml script and the nice intregration with asp.net server control going for the atlas project, those i wish it was somehow more simplified. I'm sure whenever they upgrade Vs to handle javascript intellisence that it will take care of much of that issue. I know its not easy to please everyone and that you have to make it easy for the common developer who knows nothing of javascript, so thanks for extra hard work and time for pushing MS technologies forward. and i can't wait for c# 3.0
# August 10, 2006 6:15 AM

genium said:

You are not alone ;-) Similar for me :)
# August 11, 2006 2:22 AM

Paul E said:

Awesome, gotta get me one of those ;-)
# August 11, 2006 4:05 AM

ナオキにASP.NET(仮) said:

ScottGu's Blogからです。 August 9th ASP.NET Link-Listing 今回の投稿では Scott さんが発見した素敵な記事のリンクとそれぞれの紹介コメントが書かれています。見てみたところ、全て英語(当然)ですが内容はやはり濃かったです。個人的に特に気になったのは...

# August 11, 2006 5:28 AM

I'm just pasting this here for the case that somebody would need it. said:

using System; using System.Data; using System.ComponentModel; using System.ComponentModel.Design.Serialization; using System.Globalization; using System.Reflection; using System.Configuration; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; namespace OmaAvaruus { public class Oma : WebControl { private Toinen m_Testi; [TypeConverter(typeof(Toinen.Converter))] public Toinen Testi { get { return m_Testi; } set { m_Testi = value; } } } [TypeConverter(typeof(Toinen.Converter))] public class Toinen { private string m_Nimi; public Toinen(string nimi) { m_Nimi = nimi; } public Toinen() { } internal class Converter : TypeConverter { public override bool CanConvertTo(ITypeDescriptorContext context, Type destinationType) { if (destinationType == typeof(InstanceDescriptor)) { return true; } // Always call the base to see if it can perform the conversion. return base.CanConvertTo(context, destinationType); } // This code performs the actual conversion from a Triangle to an InstanceDescriptor. public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) { if (destinationType == typeof(InstanceDescriptor)) { ConstructorInfo ci = typeof(Toinen).GetConstructor(new Type[]{typeof(string)}); Toinen t = (Toinen)value; return new InstanceDescriptor(ci, new object[] { t.ToString() }); } // Always call base, even if you can't convert. return base.ConvertTo(context, culture, value, destinationType); } public override bool CanConvertFrom( ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) return true; return base.CanConvertFrom(context, sourceType); } public override object ConvertFrom(ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object name) { if (name != null) if (name is string) return new Toinen((string)name); return base.ConvertFrom(context, culture, name); } } } }
# August 11, 2006 7:15 AM

Albert Pascual said:

How did you test that?
# August 11, 2006 11:26 AM

WoZoI said:

Hi, No need to say it's a game! How could you grip to this kind of results? As a scientist you know the truth! your cells are dying more and more numerous each day... Did I already said that I'am younger than you? ;o) hin hin hin WoZoI
# August 11, 2006 12:31 PM

Bertrand Le Roy said:

Albert: this is Nintendo's Brain Age DS game.

Wozoi: all right, you're younger, but that won't last. Wait?!

# August 11, 2006 1:44 PM

Sebastian G. said:

Have you guys tried Big Brain Academy for the DS? It measures your intelligence in terms of your brain's estimated weight.
# August 14, 2006 4:29 AM

Bertrand Le Roy said:

Sebastian: yes, I have that one too. It's actually a little more fun than Brain Age, and it doesn't try to recognize your handwriting or your voice, which makes it a lot easier to use, and immensely less error-prone (one of the most annoying things in Brain age is when you give the right answer but don't get credit for it because the stupid recognition algorithms are too lame).

# August 14, 2006 2:26 PM

Alan Le said:

Thanks for posting this. I put up a demo of the code here: http://blogs.vertigosoftware.com/alanl/archive/2006/08/14/Atlas_TabStrip.aspx
# August 14, 2006 6:38 PM

Kenneth Elliott said:

Pretty Cool.. Same here!!!
# August 15, 2006 9:26 AM

Devil's Advocate said:

Since IE doesn't follow the W3C standard for events: http://www.w3.org/TR/2000/REC-DOM-Level-2-Events-20001113/ Wouldn't it have made more sense to provide compatibility scripts for IE to get it up-to-speed with the standard instead of dragging the other browsers down?
# August 15, 2006 12:45 PM

Colin said:

I really think you made the wrong decision with the compat layer and all the window.event stuff. If you're not going to adhere to standards, and you're creating such a rich, proprietary javascript API anyway, then why not have a new function for observing events like the Prototype Framework does with Event.observe()? Basically you're asking developers to learn a beautiful library which introduces things like inheritance, Atlas XML script, etc. Asking developers to learn two new functions: observe() and stopObserving(), for example, would be extremely trivial. Also, I think your worry about changing the entire code-base upon introduction of a new browser is unwarrented. A properly engineered system can simply provide self-registering strategies which would require no change to the code-base, only a new strategy file. E.g. //expose some function like: Atlas.MapEventModel( browserEventStrategy ){} Assuming that each browser/compatibility strategy implements the proper contract, all the functionality needed to map DOM events to the Atlas framework would be taken care of compositionally in an extensible and maintainable manner. As it is now, you're claiming that the reason you implmented the compat layer the way you did is because other browsers are extensible in ways IE isn't. This implies the assumption that any new browser that comes out will be as extensible as the rest which is very very dangerous. What if a browser comes out that doesn't allow you to hook up window.event? It's very possible! The suggested alternative, on the other hand, is more likely to be able to work around the quirks of browser/capability event incompatibilities present and future. Event handling would happen through a consistant interface that is easy to learn, and the underlying details of providing the mapping to the consistent interface would be properly encapsulated into files such that each are independently updatable and easy to introduce as new browsers with different capabilities come along.
# August 15, 2006 1:27 PM

Bertrand Le Roy said:

Devil's advocate: see http://weblogs.asp.net/bleroy/archive/2006/04/13/442815.aspx where I explain that: "why did we extend Firefox and Safari and not IE? Simply because Firefox and in a lesser extent Safari are far more extensible than IE [...] If IE had the same extensibility, we would happily have made it converge to the standard instead of bringing Firefox and Safari to implement the IEisms. We would have absolutely loved that but it's simply not possible."

# August 15, 2006 1:58 PM

Bertrand Le Roy said:

Colin: these are great points. We had arrived to the same conclusion about the extensibility of the model. The new solution we're developing is more conventional and won't perform as well, but it will be easier to add new browsers even if they don't provide good extensibility points.

Fortunately, Atlas did not ship yet, so we can still take user feedback into account and revise what seemed to be good decisions at the time.

# August 15, 2006 2:03 PM

Colin said:

That's very good to hear! I'm consistently impressed by the overall coolness of Atlas and am excited to see it grow. There are a few kinks to work out, but I have no doubt the Atlas client libraries will eventually wipe the floor with other AJAX/JavaScript frameworks.
# August 15, 2006 3:13 PM

More Atlas stuff said:

It seems like I&#39;m not alone in my hatred for useless keys.I mean, who hasn&#39;t pressed Caps Lock

# August 17, 2006 1:52 PM

Adam said:

I think it should be moved near the Scroll Lock/Num Lock keys... makes sense doesn't it? Still not as useless as the Windows key, however. (Yes, I said it) I still can't believe it was put between the 2 most widely used shortcut keys - at least that is where it is located on my keyboard. There is nothing more frustrating than working in Photoshop and accidently triggering the start bar or some other strange windows action.
# August 17, 2006 4:09 PM

K4GDW said:

Hmmm... I think it'd be a great idea to move the caps lock key somewhere out of the way. I do find myself using it frequently when writing SQL statements and occaisionally in writing *nix shell scripts. Perhaps put it somewhere near the Num Lock key.
# August 17, 2006 4:57 PM

Bertrand Le Roy said:

Yes, the consensus seems to be to move it to some other place. Personally, I don't care as long as it's out of the way.

As for the Windows key, for me it's one of the most useful, maybe because I'm using Vista. Hit Windows, type photo, return, and boom, Photoshop is launched. A huge time saver for me. But I do agree that it gets in the way sometimes, especially in games (but I only play on the 360 and the DS now so it's not a problem for me).

# August 17, 2006 6:01 PM

Eric Wild said:

Don't forget the insert key! That is the most useless key.
# August 18, 2006 3:55 PM

Mike said:

Caps Lock is prime keyboard real estate, immediately adjacent to home row. So don't remove it -- remap it! With standard keyboards, Ctrl is the most popular remapping. On a Kinesis Ergo (that I happen to use), Escape is the most popular, since the default Escape key is in a crappy spot.
# August 18, 2006 4:52 PM

Disappointed said:

Tried Response.Redirect("~/blah.aspx", false) ... I still have the same issue. I've seen a lot of "I have teh SOLUTIONZ!!!111" articles on this issue, but have yet to see anyone with a real fix. :(
# August 19, 2006 12:18 PM

Manish said:

I think caps lock is placed at that location coz in the typewriters, this is the location where the key to hold shift key down is placed, if you've seen a typewriter, the shift and caps lock (i dont know what it is called in typewriter) are joined to the same shaft, only the (so called) caps lock has a locking system attached. About windows key, i've no idea why the placed it here, it is really sometimes very frustrating.
# August 21, 2006 3:46 AM

Caps Mishaps said:

If you are writing SQL statements it is a godsent to be in the position that it is. Why not try pressing shift 5 times quickly on your keyboard and enable the beep sound for when you toggle the capslock option? Then at least you would have a reminder for when you hit it. The other option would be to not look at your keyboard while you were typing.
# August 21, 2006 4:54 AM

Gary Taylor said:

I use a keyborad that allows me to turn of the windows key, so I no longer accidently get the start menu. (The keyboard has been designed for gamers but I find usefull in my coding).
# August 21, 2006 8:44 AM

FDumlao said:

The question is... what goes in the Caps Lock key's place? A blank space on the keyboard is going to be ugly, as well as a waste of space, especially on my laptop's keyboard. As far as the Windows key, that is a nice feature Bertrand, I know because I have been using it for more that a year on Mac OS X. However the Windows key is not needed in this instance. On the Mac you get to this feature by using "Command + Space Bar" which is easy enough because these are right next to each other, on windows we have the "alt + Space Bar" used to access the title-bar menu (is this the same on Vista?) but perhaps we could use the unmapped "crtl + Space Bar" to do the same thing?
# August 21, 2006 9:16 AM

vizeetor said:

CAPS lock key has never bothered me and I do use it every now and then. But I do agree, it makes sense to move it somewhere else but then the question arises, what should be placed there instead? :-)
# August 21, 2006 12:07 PM

Carol said:

> Response.Redirect("default.aspx", true); > Response.Redirect("default.aspx", false); > Response.Redirect("default.aspx"); Should I be losing Session() variables 'sometimes' or 'always' when I redirect? I tried all 3 of the above in a small bit of test-code... and didn't seem to lose any vars, ever. But my production code (about 500 lines) does lose session() vars... but only at randoms times. I can't seem to "make" it happen (with redirect... or without.) Help!
# August 21, 2006 8:42 PM

A voice said:

I really really... really really hate f-lock. I use the print screen key often and have one of these stupid keyboards. I can't get the print screen key to work at all, what is this combination. To make things worse the knockoff keyboard I have doesn't let you turn on f-lock until windows is booting for some reason... so you guessed it, I need a different keyboard to get bios or safe mode, yay! About the num-lock key, I used those numbers frequently and I hate it when I turn numlock off and instead of typing my cursor flies all over the screen. I need to disable that... I've also been a victim of the sleep and power down keys, instead of silicon I just took them out and crushed them. The last annoying thing has already been mentioned, the forward slash under enter and to the right of shift, arrrrrrrg! Not much fun when you trying to create html and type in a URL. Although, I did learn ninja fast speeds at hitting delete to remove mistaken slashes and carriage returns.
# August 22, 2006 4:41 AM

Tom said:

Adam, the windows key is not useless. It can be very useful for shortcuts. Try hitting window-r and see what happens, or windows-l, or windows-d. There are many useful shortcuts with the windows key. I am sure there is a list out there somewhere. I definitely would not consider the windows key useless. You can buy a keyboard that does not have the windows key on it.
# August 22, 2006 8:08 AM

MJL said:

I think they should develop a keyboard for developers, one designed by a developer, they could call it Microsoft Developer Keyboard. It could be both good for games and development. For extended usage, and the short cut keys should be - extended find and replace and things like debugging. As for the cap lock + window keys - these are both keys I would never dream of using. I too would love to see them gone!
# August 22, 2006 11:01 AM

Bertrand Le Roy said:

Caps Mishaps: I'm clueless about what you mean when you say that not looking at the keyboard while typing (which all reasonably fast typers do) helps in any way in not hitting the caps lock key... I would argue that it helps in accidentally hitting it, that's the point.

# August 22, 2006 1:52 PM

Bertrand Le Roy said:

Disappointed: drop me e-mail using the "e-mail" page of this blog with a simple repro (avoid dependancies if you can, try to make it as simple as possible) and I'll try to find what's wrong.

Carol: you will only lose session variables if the session does not yet exist when you do the redirect. What doesn't get set here is not the session variable in itself, it's the cookie that identifies the session.

# August 22, 2006 1:59 PM

Patrick Spieler said:

Why not just remap these keys? http://www.usnetizen.com/fix_capslock.html I use an IBM Laptop and missed the Windows-Key. So I just remapt the Caps Lock. - Now, Caps Lock make sense for me! ;-)
# August 23, 2006 12:22 PM

LFX said:

I personally would prefer the caps-lock to be a shortcut (shift + alt + control + C) I don't care how long, as long as it out of the way!
# August 23, 2006 5:28 PM

Rick Strahl said:

Bertrand, I agree. This is an excellent book even with the horrible editing in the English version . I've used this book as a reference continuously for the last 3 months and it's become indispensable. It covers an incredible amount of content for a single book. I don't know if I would say it's incomprehensible Simone . It's definitely not smooth English but getting the author's meaning hasn't been a problem in my case. Maybe it's my European background ...
# August 24, 2006 2:58 AM

tom said:

F##k! I'm going crazy! I bought a new microsoft wireless keyboard (700), finally without the damned F-BLOCK key, but now, I can't use combos with CTRL+ALT+SHIFT, so I lost many shortcuts, such as the "save for web" on photoshop [ctrl+alt+shift+s] or I can't write the "{" anymore [ctrl+alt+shif+è]... Die microsoft, DIE!
# August 24, 2006 5:52 AM

Sick and Tired said:

Do you guys want some cheese with that whine?
# August 24, 2006 10:21 PM

vikram said:

This is a good stuff. THis would help me when providing with example to some other people
# August 25, 2006 1:06 AM

vikram said:

I love asp.net and one thing that is not talked about here is the httphandler and http modules provided to us by ASP.NET. How can you not take that into account while talking about this
# August 25, 2006 2:22 AM

Martin Bennedik said:

Hi Bertrand, yes, I like the force feedback wheels too - but is it just me or is there really no support for them in the newer games? Some of the old devices you cannot even plug into a modern computer anymore - PC joystick port anyone?
# August 25, 2006 4:50 AM

Not an XBox fanboy said:

I didn't realise the XBox controller was 'effective against more than one toxin or strain of micro-organism'. But anyway, the Wii controller comes with the nunchuck extension that'll allow you to lie on your sofa eating pies to your heart's content.
# August 25, 2006 6:48 AM

jag said:

Have you had the oppurtunity to use the Wii controller? Or are you just going by what you see in nintendo's insane ads? I've seen several videos of people playing the new zelda game, and they are barely moving the nunchuk (controller) around. It's just like a regular control but slightly different in the way it moves. I think the impression that you HAVE to do cartwheels while you are using it is way off. Also, i think involving more parts of the hand instead of your thumbs only is a good thing. My friend said he'd play games until his thumbs blead. It will help against RSI and other issues that arise from doing any activity for a long time.
# August 25, 2006 1:35 PM

Bertrand Le Roy said:

Jag: no, I haven't used it and I may very well be completely wrong about all this. I'm just skeptical about the whole motion sensing stuff because it's been tried before and it failed miserably, but Nintendo may very well succeed where everybody else failed. I guess we'll have to wait and see the execution of all that.

# August 25, 2006 2:55 PM

Bertrand Le Roy said:

Not an Xbox fanboy: sorry about that, I updated the post to use a better word. Bear with me here, English is not my first language and in French, polyvalent is a synonym of versatile.

# August 25, 2006 3:54 PM

Kenneth Elliott said:

I am not a great fan of the new nintendo game controller. I don't feel that it will lend itself well to game play. Of course I have not used it yet, but with all the information that I have read so far I believe it will be very awkward.
# August 25, 2006 4:47 PM

Scott Mitchell said:

I haven't played the Wii, but the concept seems fun. The controller and gameplay - from what I've read - has already got me excited about picking up a Wii once they're available. I have an (old school) XBOX, but I've not played it in over three months. I just hope the Wii controller doesn't turn out to be as disasterous as this "well-conceived" product: http://www.videosift.com/story.php?id=7901
# August 25, 2006 5:15 PM

Carol said:

> you will only lose session variables if the > session does not yet exist You are going to have to explain that 1. How can I lose something... that doesn't exist? Can you give an example in asp.net v1.1? I need code that I can run... and watch my session vars disappear *EVERY* time. (Not the current "randomly" method... that I can't seem to track down or prevent.) Thanks.
# August 26, 2006 2:37 AM

Jeorge Lukasing said:

Very many thanks for a good work. Nice and useful. Like it!
# August 27, 2006 2:47 PM

Bertrand Le Roy said:

Carol: if the session does not exist yet, *then* you set a session variable and redirect right after, the session variable you just set will not persist.

(this, by the way, is the example in the post)

If the session already existed before this request, the session cookie is already set and everything should work fine.

# August 28, 2006 12:42 AM

Lonnie Best said:

Leave off the var operator and you will have your global scope. Don't var unless you want the variable to be local in scope.
# August 28, 2006 3:06 PM

Bertrand Le Roy said:

Lonnie: if you do that, you'll get warnings from Firefox in strict mode. If you want global scope, you can use expandos off window. Unfortunately, EcmaScript doesn't standardize on a consistent global object, so this won't work in other hosts than browsers.

# August 28, 2006 3:58 PM

Brad said:

Would be really interested in the chat room example. ay idea when it will be available?
# August 29, 2006 3:42 AM

Lee Fear said:

I think your comments are way off the mark and sound very much like someone who has been born into the playstation generation! I have a 360 and I am already becoming bored and annoyed with it. £50 for a game that I can get on the pc for £30!!! why? I would not mind paying £50 for a 360 exclusive but not one that is available elsewhere for cheaper. Also it is not exactly innovative, the graphics have improved but don't look (so far) 5 times better than the xbox or even 3 times better for that matter. The only Stand out feature is Live Arcade (which is still not innovative as it appeared on the original xbox!). This has great potential although so far not many original games have appeared. The other thing that is annoying is the backwards compatability. The vast majority of my xbox collection is still unplayable (Please can microsoft forget 'Shamu's Deep Sea Adventures','Shadow The Hedgehog' and 'Barbie Horse Adventures Wild Horse Rescue' and get on with converting Streetfighter collection, Outrun 2 and Pro Evo 4?) and even some that have conversions still do not work (Half Life 2 just goes to a black screen during the game!). Also While we are on the subject of controlers, can microsoft one day work on designing a good digital pad? have you ever tried playing a 2D fighter with the original x-box or 360 controllers? it is almost impossible due being less than directionally positive, pressing slightly up when wanting to move left and so on. Maybe this is something that you can take from nintendos controllers. The Wii will be the only true Next Gen console as it is the only one really doing something the current ones don't. And don't forget that there is also a normal controller available for it to play normal games with too.
# August 29, 2006 5:10 AM

Bertrand Le Roy said:

Lee: funny that you would say such a thing. You couldn't be farther from the truth: I played my first video games in the 70s (Pong and its variants), got my first computer in 1980 and published my first professional video game in 1982. Since then, I've never ceased to play. I've had dozens of computers, some of which I built, a Sega Genesis, a classic XBox, *almost all* GameBoys that Nintendo put on the market, a GameCube and now a 360. I also have a very capable gaming PC that I don't use because the games are nicer to play from the couch on the big screen TV, and because console games don't require setup or take 2GB on my hard drive.

You're also way off topic: this post is about controllers, not which console I/you prefer. But if you want to go down that road, fine.

If you like to play on the PC and find the same games for a lower price, fine, go for it. As for me, I prefer to play it on the console even if it costs me more. Guess I'm not the only one or the prices would be different. <sarcasm>mmmh... Maybe there's a reason why games are cheaper on the PC... Let's try to remember our Economics 101... Oh, maybe that would be because nobody wants to buy them?</sarcasm>

I don't know how to evaluate "5 times better" graphics. What I know is that the graphics are incredibly sharper on the 360 than they were on the Xbox and that a lot more stuff can move on the screen at once: just look at the battles in 99 nights (I know, baaaad game, but still) or Kameo.

I think the innovation in the 360 version of Live are the achievements and gamer scores. This is the thing that will make gamers buy more games (and ultimately that's what makes or breaks a console).

Back-compat? I couldn't care less. I still have my classic Xbox and it works fine. Plus, I spend too much time playing my 360 games to go back to the Xbox games.

And don't pretend you don't know why Barbie works and not more interesting titles (but my choice would have been waaaaay different from yours: Outrun??). The minor titles work more easily because

A. They are simpler technically.

B. They are side effects of making other, more interesting games work.

Ultimately, back compat is only interesting in the beginning of a console's lifetime.

The D-Pad issue has only become important with the release of Street Fighter and Pac-Man. Before that, the controller only got praise and now it's the worst controller ever? Give me a break. Actually, if you read my post, this was kind of my point: no controller is good for everything but the default controller should be fine for all games. Quoting myself: "an arcade stick will be better for Street Fighter and Pac-Man". There is such a stick already (the DOA arcade stick) and more are in preparation (Mad Catz is doing one, and Microsoft gave some hints about alternate controllers). But yes, it would be great if they could improve the built-in one.

By the way, the worst thumb numbness I got because of bad D-Pads were from GameBoys and I don't remember anyone being vocal about those. They were reasonably precise but really painful, which again, made me play less (and hence buy less games).

Your sentence about the Wii being the only true "Next Gen" is just hilarious. Yes, and the PS3 is the only "true hi-def". Right. At least Sony was right on one thing: the Wii isn't hi-def (which is something you can define accurately, contrary to "Next Gen").

But the greatest thing is that you're making my points: "[...] there is also a normal controller available for it to play normal games with too". Exactly, the normal controller is the option, and the exotic one is the norm. All I've been saying is that it should be the other way around. Plus, it's not exactly a normal controller, it's more like a normalish wart that you add to the wiimote.

# August 29, 2006 3:24 PM

grgran said:

no face plate
# August 30, 2006 1:24 AM

miechu said:

you can always remap keyboard via windwos registry: 1. open regedit 2. HKEY_LOCAL_MACHINE\SYSTEM\ControlSet001\Control\Keyboard Layout 3. right click & add a new binary value named: Scancode Map 4. enter value: 00 00 00 00 00 00 00 00 02 00 00 00 00 00 52 e0 00 00 00 00 5. log out; log in; - last four numbers mean: zamien 52 e0 (insert) to 00 00 (null) - the first lone 2 number describes te amount of remaped keys + terminator - at the end there's gotta be a terminator (null) - you can add more binds, just add another four increse the first numer, and don'tforget that terminator this way you can rebind every key :D die insert, die! ;) best regards miechu (wanna thank me? ;) mail me at: miechu # miechu.pl)
# August 30, 2006 5:09 AM

Lee Fear said:

I didn't say you were playstation generation. I said you were sounding like one. You point out that the 360 has some new arcade controllers. Is this not the same thing as the Wii having an optional controller too? I don't think my comment about Wii being the only true next gen is 'Hilarious'. I do not consider Hi-Def (or Graphics at all) to define Next Gen, In fact in Europe (Especially the UK) Hi-Def Tvs have only been on sale a short time and are incredibly expensive (around $3,500 for a medium size one!). We will not be seeing even a moderate perentage of 360s connected to Hi-Def here for at least 3 or 4 years. So The fact that Wii is not Hi-Def is not of particular importance (Especially if it helps make the games cheaper and hence I will buy more of them). --Quote-- If you like to play on the PC and find the same games for a lower price, fine, go for it. As for me, I prefer to play it on the console even if it costs me more. Guess I'm not the only one or the prices would be different. mmmh... Maybe there's a reason why games are cheaper on the PC... Let's try to remember our Economics 101... Oh, maybe that would be because nobody wants to buy them? ---- Most of the people I know do not even own a 360 due to the prohibitive price of the console, the lack of many good games and the price of the games. I too prefer playing most games on a console but I fully understand why my friends use their PC's. Prey for £50, took 2 days to complete and the multiplayer is not that great either!!! now that is good value.. NOT! When I talk about the graphics on the 360 I am not denying that the graphics look crisper but I was not blown away like I was when I first viewed the PS2 after the PS1. I am told that Project Gotham 3 has as many polygons in 1 car than PGR2 had in the entire game world. I can fully believe this but it does not show so much in the finished product. Yes they look a lot crisper but not that much crisper! This just goes to prove to me that Nintendo were correct in moving in a different direction. ---Quote--- I think the innovation in the 360 version of Live are the achievements and gamer scores. This is the thing that will make gamers buy more games (and ultimately that's what makes or breaks a console). -------- I have to disagree. This has not made me buy more games. It just gets annoying in multiplayer when people are concentrating on getting achievements rather than playing the game. The Purchasing of extra content is a nice option but I am worried that it will be taken too far especially with microsoft suggesting consumable content which wears out leading you into buying new ones. I have thought of one feature that has made my gaming life better and that is the ability to stream music from my pc into the game. Now that is cool!
# August 30, 2006 5:26 AM

Dustin Halstead said:

I can't believe how much you discount the idea (or hard evidence) of backwards compatibility. It obviously wasn’t the biggest selling point when the PS2 came out since PS1 and PS2 games looked like night and day graphically (it was hard to go back) … regardless, the classics have still lived on (thank God the PS2 can still run Final Fantasy VII). In addition, the lack of backwards compatibility only added to the shadow over Nintendo’s weakening presence (people still love the SNES to this day and consider it the heyday of gaming). While it may not be the biggest selling point, it still plays a major role (Nintendo learned their lesson the hard way and have preserved the backwards compatibility within the handheld systems). How many ‘old’ games do you know of that people still play and love regardless of graphic advancements (StarCraft anyone?). Magazines, like GameInformer, and even G4tv recommend classic titles that gamers may have missed at one time … leading me (and countless others) to buy and enjoy sleeper-hits and overlooked classics. Now-a-days backwards compatibility is more important than even because consoles can’t make the same level of advancements that they once did … and games that looked amazing 3-4 years ago, still look good today (Halo anyone?). Microsoft knew backwards compatibility was important, that’s why they promised it before the release of the 360 … unfortunately, they have yet to fully deliver on that promise; and if you’re not playing 360 online, then forget about it completely. In short, consoles can no longer depend on graphic improvements and extra buttons to sell their product, especially since games have already reached a visual level that most people are satisfied with … and without an HDTV, it’s hard to notice anyways. So now, more than even, it takes more than that … it takes support for the library of great games that already exist, and innovation that goes beyond “graphic improvements”. Networking gamers and providing online play is a definite plus, but gamers cannot live on MMOs alone. It’s not surprising that Microsoft hasn’t realized this yet (they still think IE6 is ‘good enough’) … and Sony seems to think that everyone has a 6 figure income (and with a poor track record for building quality electronics (PS1 overheating and the flimsy PSP)). This is Nintendo’s chance to make a comeback, and I sincerely hope they do. Despite their history of poor decisions (VirtualBoy anyone?) Nintendo has proved that they have learned from their mistakes … something that Sony and Microsoft have failed to do. Not only does the Wii offer the possibility of a more immersive environment to gamers, but it will appeal to parents of the gaming youth, eager to see a console that will help thwart the obesity that plagues children today.
# August 30, 2006 7:03 PM

Bertrand Le Roy said:

(crap, my comment was eaten by community server... I guess I'll have to rewrite)

Lee: I don't know what defines "next gen" if it's not the new wave of consoles, which includes all three. I do not consider hi-def to define next gen either, I'm just saying it's something that you can objectively define. I know that in Europe, hi-def sets are still very expensive, but here in the US, they're getting mainstream and relatively cheap. By the end of this generation, not having hi-def will be a strong handicap. Even though it may not hurt the Wii in the beginning, it will eventually.

I don't think the price of the 360 is prohibitive. If you look back on the price of past generations, it sits exactly in the launch price range of all successful consoles.

You make an excellent point about games being cheaper on the Wii making people buy more.

Then again, Prey may be very short for the price, it doesn't mean that's a general thing with 360 games: just look at Oblivion or the Half-Life 2 package.

And the thing about graphics is that it takes increasingly more power to achieve ever smaller improvements. So yes, the difference between PS1 and PS2 was more impressive than what you'll observe in this generation (even with a hi-def setup), and I bet that the next one is going to be even less impressive. <sarcasm>On the other hand, this begs for another question: why didn't Nintendo just release the Wiimote for the GameCube if it's all about fun and gameplay?</sarcasm> Seriously?

You may think what you want about achievements and gamer score, but the fact is that the 360 has a *very* high attachment rate. Also, my friends who own a 360 care about their gamerscore and achievements and compete with each other, so your mileage may vary.

I also agree that the optional contents thing may go too far. Hey, it already has... The Oblivion horse armor was a joke and... it didn't sell. This stuff will self regulate. The consumable contents thing will flop in my opinion (except in places where it really makes sense, like in Second Life or the Sims).

Dustin: I don't discount the problem of back compat: "Back-compat? *I* couldn't care less. *I* still have my classic Xbox and it works fine. Plus, *I* spend too much time playing my 360 games to go back to the Xbox games." (emphasis added) So again your mileage may vary. I'm just saying that for *me*, it's unimportant, and I just tend to think that if you own xbox games, it means you have an xbox. But yes, I may be totally wrong about back compat only mattering in the beginning of the console's lifetime. Classic gaming is a distinct thing though and XBLA does a good job of offering classic games on the 360. Classic gaming != xbox classic games.

Apart from that, there are a few unfounded assertions in your post:

Sony has a "poor track record for building quality electronics"??? What? I'd say they have one of the best track records in the industry for that...

Nintendo has a "history of poor decisions"? No company can always succeed with all of its products or chances are they're not being creative. You could say that of any successful company (let's try... "Apple has a history of poor decisions (Newton or Lisa anyone?)", etc. etc.)

"Microsoft hasn't realized [gamers cannot live on MMOs alone] (they still think IE6 is 'good enough')". Well, I don't know where you got that quote of yours, but last time I checked, IE7 was in RC1. Also, I personally don't play much online, and I didn't realize that my 360 prevented me from playing offline games. Oblivion is an MMO? Hell, there isn't even one MMO on the 360...

"Nintendo has proved that they have learned from their mistakes … something that Sony and Microsoft have failed to do". Can you substantiate that claim?

Anyway, this blog post is *not* a flame war about which next gen console is the best, it is about whether or not it's a good strategy to have an exotic default controller.

So you are both waaaay off topic.

# August 30, 2006 8:44 PM

Simon said:

I think the quality of the games will be key to the success of this type of controller. Surely there's nothing to stop Microsoft (or Sony for that matter) from producing their own version of the Wii controller for their consoles if they think it's worthwhile? Maybe future generations of consoles will ship with several different types of controller. With regards to the 'HD isnt next gen' debate. I just bought an HD TV for my 360, and it's definately made a BIG difference in the quality of the visuals. HD sets are stil expensive though (I live in the UK).
# August 31, 2006 9:37 AM

miechu said:

argh! where did those "\n\r" go?!
# August 31, 2006 4:23 PM

LoooooL said:

The angle of the wake of a body moving steadily in deep water is always 2arcsin(1/3)
# August 31, 2006 10:48 PM

Bertrand Le Roy said:

Right. I should have done my homework more seriously. Updating the post.

# September 1, 2006 2:03 AM

Dustin Halstead said:

Holy crap Bertrand!  It sounds like you read only what you wanted to read.  If you don’t think that my comments have deep rooted foundation, then you lack the understanding to make “game predictions.”

Allow me to provide some backup to my “claims”:

>> Sony has a "poor track record for building quality electronics"?

--- um yeah.  The first PS1 systems overheated themselves.  The original PS2 design has suffered from constant lens failures and featherweight controllers that “rattle” and exhibit dead buttons after extended use.  The slim PS2 had overheating adapters, resulting in Sony recalling/replacing around 960,000 adapters (Of course the Xbox had it fair share of recalls due to fire hazards as well).  The PSP is the most flimsy handheld system to date (unless you want to call the Noki N-Gage a handheld system … which would be a joke) … not to mention, the PSP cases (that encompass the UMD) are poorly made and have a tendency to fall apart, dead and/or lit pixels, poor screen durability, and self ejecting UMD (if the unit is ever twisted … which shouldn’t have been possible in the first place).  Also, when G4 performed “stress tests” on the GameCube, PS2, and Xbox.  The PS2 broke into pieces after test one … the Xbox held up a little better … but the GameCube was the ONLY system that survived every test (although these tests were extreme, you can easily see the flimsiness of the PS2).

You can watch it here (Or search for: GameCube vs PS2 vs Xbox):

http://www.youtube.com/watch?v=PUWFpZ7DksI

Do your homework pal … Case closed.

>> Nintendo has a "history of poor decisions"?

--- Obviously most companies DO make poor business decisions from time to time, my point was, it seems they learn from it where-as Microsoft and Sony have NOT.

>> "Microsoft hasn't realized [gamers cannot live on MMOs alone] (they still think IE6 is 'good enough')".

--- Now you’re misquoting me.  I said: “Networking gamers and providing online play is a definite plus, but gamers cannot live on MMOs alone.”  I’m simply stating that you can’t sell a console with online capabilities alone (there has to be more to offer)… and that encompasses a lot more than World of Warcraft type games.

Concerning Microsoft … Internet Explorer 6 turned 5 YEARS OLD on Aug 28, 2006 ... 4 days ago.  Webdesigners (I’m one myself) are forced to use code hacks and can’t embrace the full CSS support that EVERY OTHER BROWSER has.  Let’s not even mention the poor OS support M$ has shown over the years (WindowsME anyone?).  Strange how Mozilla can out-perform a company that has enough money to buy and sell them 100 times over.  Although I will admit that Microsoft has shown better support towards the Xbox … which is kinda sad.  Although, It’s probably because Microsoft actually has competition in the console arena … so maybe if the 'Google OS' rumors come true, M$ will finally get on the ball.

Also, If you haven’t seen the IE7 blog, now would be a good time: http://blogs.msdn.com/ie/default.aspx

(See what I mean?  You can actually feel the disgust from webdesigners everywhere.)

Although Nintendo has made mistakes, they’ve never done anything as obviously and as consistently retarded as Sony or Microsoft … such as piss off EVERY person that uses their system.

Nintendo may disappoint, but never have they created the hatred that exists for Microsoft.

>> So you are both waaaay off topic.

--- Then you missed my point completely.  The point I was making is that MORE innovation has to exist than better graphics.  It comes down to many factors … not just controllers, not just online connectivity, and not just backwards compatibility.  Nintendo seems to be taking much more into consideration than Microsoft or Sony, so I wouldn’t go around blasting them for their innovative (albeit risky) controller design and assuming that it will solely determine the outcome of it’s success.

# September 1, 2006 3:32 AM

More Atlas stuff said:

It&#39;s the second time in just a few days that I see blog comments attack Atlas on its compatibility

# September 1, 2006 3:56 AM

astopford said:

Does'nt explain why smith and neo was suddenly able to cross both worlds if they are were so predictable and why neo was granted a deal in return for destroying smith. My theory is that the real world was another Matrix but populated by machines and humans, it took six attempts to see if the boundary could be crossed but the machines never counted on Smith and in return for his destruction Neo was granted his freedom.
# September 1, 2006 5:01 AM

Steve said:

Well Mr. Bertrand Le Roy, I am a huge fan of the matrix and I can't deny that everytime I watch I figure out things I didn't knew or noticed before. The Architect did declare that five previous versions of the matrix existed. well let's try to think of it as a computer program where u install the first release then you install another pacth and another and another then u do the update then an upgrade probably. What u said about a super-matrix is not exactly what I had in mind but close ot it. What if the real world which the Neo, Morpheus, Trinity and Zion think they exist in is nothing but a previous version of the matrix. What happened is that simply when quit the 6th version they woke up in the 5th... think of it as a hierarchical structure whee Matrix version 1 comes first then second then third.etc...etc.. As for forseeing some1's actions... well if I make you choose between say (for the sake of the example): dying a very painfull death or maybe running a 100 meters... then I am sure you'll go for the 100 meters. after all it wasnt really a choice. Concerning Neo's name... I also thought of that, but then again it doesn't mean it's true. Lastely, if as you said. The human race was wiped and some programs are running to make the machine working. then I think the agents & the so called humans (neo, trinity, morpheus) could be canceled without impacting the operation of the whole system... they will even free system resources ;-) That's all i have to say for now. I realize I may not have the best answers. But I guess the thrill of everyone believing what they want to believe is what count.
# September 1, 2006 5:46 AM

vikram said:

Good write up. I liked the writing skill
# September 1, 2006 7:05 AM

WTF? said:

Why is this an "Atlas Blog" ?????
# September 1, 2006 7:18 AM

Mads said:

In the Matrix Trilogy DVD Collection, on the Matrix Revolutions disc, there is an interesting commentary from two philosophers about all this. They also have a theory on Neo’s powers in the real world. You should check it out :)
# September 1, 2006 7:36 AM

Amit said:

Very interesting! Loved your comment about SQL Server - that would be ideal whenever a Matrix spoof comes out (wasn't there one in the making?)
# September 1, 2006 8:18 AM

ali said:

"The Oracle, according to its name, is the Matrix's database (I guess Sql Server would have been too obvious )" Now you mention it, its funny !
# September 1, 2006 9:07 AM

Nadim said:

wait wait wait, from what i understood is that the oracle beleived that there was someone ( or should i put it a program )in the matrix(i.e. Neo ) who could come to the real world and be more human than the previuos 7 or 8 ( cnat remember the exact number ) versions. the Oracle had seen previous versions before Neo and that is why she new what was happening. She wanted everythign Neo did to be based on his CHOICE. ( i.e to see whether his decisions will be more human ).... Personally i think it was something like a bet between the Oracle and the Architect. Coz at the end of 3 when the Architect walked to the Oracle , the little agirl and the chinese guy, the chinese guy asked her how did she know, and shes goes "Because I Beleived"
# September 1, 2006 10:09 AM

Mike said:

When you realize that all the machines had to do was to build nuclear reactors for power instead of using humans for it, you realize the whole thing unfortunately falls apart. From seeing what they were able to accomplish in their city, there's no way they couldn't have throw some reactors together. :) Still some of my favorite movies of all time though.
# September 1, 2006 10:31 AM

David Taylor said:

This is very dangerous territory for you to be covering Bertrand - people are quite opinionated on this. I think that we all watched the Matrix; loved the first; loved the second....then we all had time to think about what the 3rd would be. Then it was a total let down to the point of not making sense or being consistent. Thus people like yourself, in their frustration try to give the Wachowski more credit then they deserve by coming up with very imaginative plots to make it a good movie when it wasnt.
# September 1, 2006 11:53 AM

Bertrand Le Roy said:

For some reason, Dustin's comment was eaten by Community Server (again).

Here it is as salvaged from my mailbox. Not sure it was worth salvaging but for the sake of freedom of speech...

"Dustin Halstead said:

Holy crap Bertrand!  It sounds like you read only what you wanted to read.  If you don’t think that my comments have deep rooted foundation, then you lack the understanding to make “game predictions.”

Allow me to provide some backup to my “claims”:

>> Sony has a "poor track record for building quality electronics"?

--- um yeah.  The first PS1 systems overheated themselves.  The original PS2 design has suffered from constant lens failures and featherweight controllers that “rattle” and exhibit dead buttons after extended use.  The slim PS2 had overheating adapters, resulting in Sony recalling/replacing around 960,000 adapters (Of course the Xbox had it fair share of recalls due to fire hazards as well).  The PSP is the most flimsy handheld system to date (unless you want to call the Noki N-Gage a handheld system … which would be a joke) … not to mention, the PSP cases (that encompass the UMD) are poorly made and have a tendency to fall apart, dead and/or lit pixels, poor screen durability, and self ejecting UMD (if the unit is ever twisted … which shouldn’t have been possible in the first place).  Also, when G4 performed “stress tests” on the GameCube, PS2, and Xbox.  The PS2 broke into pieces after test one … the Xbox held up a little better … but the GameCube was the ONLY system that survived every test (although these tests were extreme, you can easily see the flimsiness of the PS2).

You can watch it here (Or search for: GameCube vs PS2 vs Xbox):

http://www.youtube.com/watch?v=PUWFpZ7DksI

Do your homework pal … Case closed.

>> Nintendo has a "history of poor decisions"?

--- Obviously most companies DO make poor business decisions from time to time, my point was, it seems they learn from it where-as Microsoft and Sony have NOT.

>> "Microsoft hasn't realized [gamers cannot live on MMOs alone] (they still think IE6 is 'good enough')".

--- Now you’re misquoting me.  I said: “Networking gamers and providing online play is a definite plus, but gamers cannot live on MMOs alone.”  I’m simply stating that you can’t sell a console with online capabilities alone (there has to be more to offer)… and that encompasses a lot more than World of Warcraft type games.

Concerning Microsoft … Internet Explorer 6 turned 5 YEARS OLD on Aug 28, 2006 ... 4 days ago.  Webdesigners (I’m one myself) are forced to use code hacks and can’t embrace the full CSS support that EVERY OTHER BROWSER has.  Let’s not even mention the poor OS support M$ has shown over the years (WindowsME anyone?).  Strange how Mozilla can out-perform a company that has enough money to buy and sell them 100 times over.  Although I will admit that Microsoft has shown better support towards the Xbox … which is kinda sad.  Although, It’s probably because Microsoft actually has competition in the console arena … so maybe if the 'Google OS' rumors come true, M$ will finally get on the ball.

Also, If you haven’t seen the IE7 blog, now would be a good time: http://blogs.msdn.com/ie/default.aspx

(See what I mean?  You can actually feel the disgust from webdesigners everywhere.)

Although Nintendo has made mistakes, they’ve never done anything as obviously and as consistently retarded as Sony or Microsoft … such as piss off EVERY person that uses their system.

Nintendo may disappoint, but never have they created the hatred that exists for Microsoft.

>> So you are both waaaay off topic.

--- Then you missed my point completely.  The point I was making is that MORE innovation has to exist than better graphics.  It comes down to many factors … not just controllers, not just online connectivity, and not just backwards compatibility.  Nintendo seems to be taking much more into consideration than Microsoft or Sony, so I wouldn’t go around blasting them for their innovative (albeit risky) controller design and assuming that it will solely determine the outcome of it’s success."

# September 1, 2006 1:38 PM

Bertrand Le Roy said:

First, Dustin, let me tell you that I love how your opening comment amounts to saying that if I don't agree with you, I'm not qualified or too dumb to make ""game predictions"". The quotes here are yours. I don't try to "predict" anything. This is my blog and that makes me perfectly qualified to give my opinion here. I don't expect everybody to agree with me and I may be wrong on a lot of things (I know I've been on more than a few occasions). You, on the other hand, are a guest here.

Your claim about Sony was not exclusively about game consoles but about electronics in general. Their consoles may not be the most robust things they built, but consoles are sold at a loss, so you can't really expect the same quality they put into their TV sets for example. I don't know what their return numbers are on the PS2 or the PSP and they may be higher than the other guy's, that's entirely possible, and I concede you that point if it's the case, but don't say that Sony in general doesn't know how to build good electronics because that's just not true. The G4 stress tests (which I had already seen) were a *joke*. Didn't you notice the funny german accent and stuff? Man, here I am, defending Sony. Who would have thought?

(Oh, and I'm not your "pal".)

I don't know about Sony (but you may want to check this piece in Wired: http://www.wired.com/wired/archive/14.09/sony.html?pg=1&topic=sony&topic_set= ) but saying that MS doesn't learn from its mistakes is unsubstantiated BS. Putting "not" in uppercase doesn't bring more weight to your argument.

"M$"? What's that? Oooh, I get it. How clever. You replaced the S with a dollar.

I'm not especially defending IE and the lack of evolution it's showed over the last few years. That was a very bad thing for the industry. I was just answering your "they still think IE6 is ‘good enough’" remark, which is just plain wrong. They just don't or IE7 wouldn't exist. I agree that the team started working on it waaaay to late and that there is still a lot of work to do. But as a web developer myself I'm a lot more annoyed by Safari than I am by IE. But your mileage may vary. Saying that Sony and MS pissed off "EVERY" person that uses their system is completely out of proportion. Think about it for just a minute. Would both companies have any customer left if that were the case? I just think that both are companies that some people love to hate (partly because they are so huge) and that those people are very vocal while the immense majority of their customers are just satisfied (silently). But then again, I'm biased, I work for Microsoft on a product that I believe is a good one.

You're right about this console war not being about just one thing, but you have to admit Nintendo centered its communication around the controller. That's what I'm doubting. You're doubting the 360 focus on online play, fair enough.

# September 1, 2006 4:08 PM

Kash said:

Huge fan of the movie. I think it is same as Microsoft (Architect & Oracle) inviting hackers (Neo) or creating automated tests (Smith) to break vista (The Matrix) security so they can fix the flaws and make it a better OS that will make more cash(energy). The programers have access to all the versions (Matrix or real world) of application(The matrix) through backdoors(Trains). well it might not be very good review but more later i guess.
# September 1, 2006 4:38 PM

Christophe said:

Bravo pour l'analyse... ça donne envie de les revoir :) Thanks
# September 1, 2006 7:18 PM

cowgaR said:

thank you David Taylor, I could'nt write it better. Exactly. The Matrix 1 is a cult movie. The 2nd one is quite good, althought far away from the qualities of the 1st one despite it brings new ideas and explanations. Becasue it is bringing also some confusions...maybe for the misch-masch 3rd part, which is, really...not a good movie. Do not give credit for spaghetti glued trillogy. Give credit to one of the best sci-fi movie ever made, which Matrix One is.
# September 2, 2006 5:49 AM

Eddie said:

Thanks, This is an excellent control. I am having problems getting server side code output to display in the pop-up page. I set a public string variable based upon a particular error in a If block in VB.NET code-beside, and I have the ALERT control setup to display the variable using an <% # %> block. The message does not display. Does this have to happen at page load time? Thanks
# September 2, 2006 8:38 PM

Bertrand Le Roy said:

Eddie: without seeing your code it's hard to say. You can drop me e-mail at bleroy (at microsoft.com) and I'll have a look. Try to remove any dependancies from the code and make it as simple as possible, so that I can easily run it. Thanks.

# September 3, 2006 3:02 AM

Steve said:

It was my understanding that the 2nd and 3rd movies were filmed in conjunction, as one long movie, a la "lord of the rings". I for one felt that both movies were similarly lacking in substance compared to the first which I found to be brilliant. But both do seem to act as foder for mind games to be played on ourselves for and indefinate amount of time, so i guess they've done their job.
# September 3, 2006 3:27 PM

AJ said:

You guys do realise that ITS NOT REAL!!!!!
# September 3, 2006 5:32 PM

Bertrand Le Roy said:

Errrrr... Sure... No need to shout. You?

# September 3, 2006 5:39 PM

terraslate said:

oh leave it alone. everyones trying to come out with something new. there are more ways to do the same thing coming out than you can shake a stick at. yeah i've been a developer for over a decade, i've seen it all i reckon, and this is just one more of those things that someone has come out with in the hope that we'll all think - wow - how did i ever do my job without it. sure if it makes your life more interesting keep at it - me - i don't need one more thing that nobody needs.
# September 4, 2006 9:32 AM

Matrice64 said:

I think Mr. Bertrand Le Roy, that you did a very good job of describing your take on all three movies. I think the 3rd movie requires you to see alittle more than the previous versions, and some people can analyze metaphors better than others. Your view on it is certainly one that I found more interesting than others :-).
# September 4, 2006 4:17 PM

Bertrand Le Roy said:

Terraslate: I understand what you're saying and that's precisely the reason why we're submitting this to public feedback. I'd like to point out once more though that this is actually nothing new and that this concept is present in quite a few dynamic languages.

# September 4, 2006 5:07 PM

lukerk said:

Again, why is this an 'Atlas Blog'???
# September 5, 2006 1:16 PM

Bertrand Le Roy said:

lukerk: This is my blog and I get to choose the contents. The most common contents you'll find here is Atlas because that's what I'm working on currently but there will be other topics too. Feel free to ignore them.

# September 5, 2006 3:18 PM

周晖(Cola) said:

ASP.NET Event Validation

# September 5, 2006 11:33 PM

EMCF said:

I'd like to pipe in for a moment, the Wii-mote (as it's affectionately being called by some) does in no way need to be waved around like you're retarded. The motions can be large and craz-o, or small and refined. No more than you naturally move the controller as you play games with a normal controller. You'll still be able to lay on your back with the controller on your stomach for most games. Something like Wiisports might require an upright stance at first, but you will learn to play those too on your back. Though it might take away from the realism (baseball is played standing up, not on a couch :D).
# September 6, 2006 1:51 AM

Bertrand Le Roy said:

Yes, I've read that argument a lot, but there's still something bothering me: the smaller the movements, the more precise the detectors need to be. This kind of device has been notoriously imprecise in past attempts so while Nintendo may have perfected the technique, it remains doubtful to me you can have both precise control and small amplitude movements. But yes, until we get a chance to test it (which only Reggie knows when that may be) we won't know for sure. As I've said before, all this is only conjectures and I may very well be completely wrong.

# September 6, 2006 2:33 AM

Bertrand Le Roy said:

Then again, the Gyration remotes are fairly precise even with relatively small movements, so yes, why not? I guess we'll see how the games exploit that.

# September 6, 2006 2:38 AM

Blogs said:

Very Cool
# September 6, 2006 2:40 PM

Test 1 2 3 said:

Test 1 2 3 This is exactly what I was looking for...Thank you...
# September 6, 2006 2:50 PM

Mirza said:

I really like your view. Never thought in that way. great thinking.... n yeh matrix trilogy is great sci fi movie
# September 6, 2006 8:31 PM

Eddie said:

Bertrand LeRoy, Thanks, Sorry it took so long to get back to you, I have been swamped. I actually figured it out. I had partial rendering on the page and needed to add an update panel with a trigger. It works great now. Eddie
# September 6, 2006 9:48 PM

Keith Bradley said:

I can get the control to work but a message comes up and says Page Can Not Be Displayed. I have tired on several test pages and the same thing appears. The Popup works as it is supposed to but the text and buttons will NEVER appear a web error comes up saying the page can not be displayed. Does anyone have any clues to what I am doing wrong. Thanks.
# September 7, 2006 2:26 PM

Bertrand Le Roy said:

Keith: without seeing your code it's hard to say. You can drop me e-mail at bleroy (at microsoft.com) and I'll have a look. Try to remove any dependancies from the code and make it as simple as possible, so that I can easily run it. Thanks.

# September 7, 2006 3:21 PM

Sektor said:

When I watch de 3rd film, I thought just like you Bertrand. But after checking out the 1st film I easely changed my mine. Now I'm think that it was meant to be only one film, but with the 1st film's success they tryed to continue the idea. To my disapoint it was a failure. Aldo the 2nd was very nice whit that martial arts. (Sorry, my english is not so good)
# September 8, 2006 6:19 AM

Xander Pascal said:

@David Taylor, I think people are a bit confused when it comes to the Trilogy. It's not a Trilogy in the sense of one. Matrix 1 was great, Matrix 2 was cool, Matrix three was confusing, Animatrix hey wait lets watch Matrix three again, Matrix three NOW it makes sense. The Animatrix has a lot of information that clearifies things in the third one. But still how does this relate to Atlas?
# September 8, 2006 7:03 AM

Bertrand Le Roy said:

Xander: it doesn't have anything to do with Atlas but see above comments.

# September 8, 2006 1:34 PM

Suneil said:

Just writing a test message to see how Atlas is being used.
# September 9, 2006 7:43 AM

Paul said:

I've had similar thoughts, although yours I think are better formed. The best I'd come up with was that Zion was exception handling like a try...catch block. Rogue 'programs' (in my concept still of human origin, but I like your take that nothing was human) would be 'handled' by getting sent to the error trap of zion and then later cleaned up by garbage collection. . . To this day my Exception object names are all called 'zion'. :D try { //something } catch (Exception zion) { //handle zion } :D
# September 9, 2006 9:37 AM

Robert Cowart said:

Ctrl was immediately left of the A key for ever, before IBM decided to rearrange the PC keyboard on the IBM AT in the '80's. Computer terminals such as the famous ADM 3A all had it there. IBM decided to make the keyboard more like a typewriter. Big mistake, since virtually anyone using a PC for word processing was using WordStar which used the Ctrl key for editing, scrolling, cutting and pasting, block moves, and everything else. I still use those commands and can edit fast as heck with them (way faster than with a mouse, pgup, PgDn, arrow keys, and backspace. I can do all kinds of things like delete to end of line (Ctrl-P), delete line (Ctrl-Y) using macros I wrote for Word that emulate Wordstar. SO I always have to remap the keys. I put Ctrl where CapsLock is, put Alt where Ctrl is, and put Caps lock where ALt is. Much better layout. Currently writing about Windows Vista and realize my trust program RemapKey isn't working in Vista because it can't find the registry....:( Bob Cowart Author of 20 books about Windows including "Using Windows XP" (Que) upcoming...Using Windows Vista
# September 10, 2006 2:52 AM

Bertrand Le Roy said:

Suneil: ooooh, do you mean that all the comments about this not being about Atlas are really wondering how Atlas is being *used* by/in this blog?

Well, writing a blogging engine is serious business (it's so much more than Post 1 * n Comments) that I leave to others who do it much better than I would. Me, I have enough work developing Atlas itself, and working on my own private projects.

In the same way that I did not write the word processor or the OS I use everyday, I did not write this blog engine (if you have to know it's Community Server which is built by the smart people at Telligent on top of ASP.NET 2.0).

I hope this clarifies.

# September 10, 2006 3:46 AM

Carlos said:

No, no, no... the Oracle is just error-handling and Neo is exception. :O
# September 10, 2006 3:33 PM

Slava Naumenko said:

Here is an example of a menu using iframes and z-index to shield select element in IE. http://www.menu4web.com/demo/d_ml.html
# September 13, 2006 10:33 AM

emortal said:

Works with https, no message.
# September 13, 2006 10:54 AM

emortal said:

Sorry that should have been BLOCKED SCRIPTfalse; NOT BLOCKED SCRIPTreturn false;
# September 13, 2006 10:56 AM

zois said:

i was watching a sientific show on tv long time ago , about going back to the past and forword in to the future , they sead the only way to acive that task is to use computer emulation,also that will be possible in to the future,with the atvancment of our computer technology. Then one ask the guestion"if we are in a program that simulate the past,how we know who is real and who is not (The Matrix)? Dream on , we still sleeping.
# September 14, 2006 9:00 AM

JF Trichard said:

It works fine with IE7
# September 14, 2006 10:03 AM

Bertrand Le Roy said:

Zois: wow, I wonder where they got that from, but that certainly wasn't a scientific show ;)

# September 14, 2006 1:01 PM

Ludmal's Blog said:

Really good post about Creating Session variables and Redirecting the page.http://weblogs.asp.net/bleroy/archive/2004/08/03/207486.asp...

# September 15, 2006 12:40 PM

Yale said:

I have a parent DropDownList (like province)and dependent DropDownList(like city). after callback, i update the city dropdown list. when I do a postback, the second list items are all gone due to the ViewState not refreshed during the callback. How should I deal with this situation?
# September 16, 2006 2:13 PM

Peter said:

It is very Good for learning Atlas.
# September 18, 2006 2:49 AM

Bertrand Le Roy said:

Yale: short answer is to start using Atlas (Microsoft AJAX). An UpdatePanel should make that scenario ultra-easy. Even better, use the chained drop down lists from the Atlas Toolkit which I think are doing exactly what you want to do. Long answer, you need to keep track (in a hidden field usually) of the client-side changes. On the next postback, look at this field and "replay" the changes that happened client-side so that the server-side state can catch up. That's what the TreeView is doing. But really, you should check out Atlas. Hope this helps.

# September 18, 2006 12:51 PM

InfinitiesLoop said:

The crew actually being programs in a supermatrix is what I always suspected. The whole notion of "the body cannot live without the mind" is kind of a stretch -- I mean, you fall in the matrix and it makes your lip bleed? The mind is tricky and powerful but it's not THAT accurate! But if you think of them as programs in a supermatrix you can attribute this behavior to the rules programmed in the supermatrix. Also, their program is transfered into the sub-matrix while they are plugged in (or at least interfacing with it at some level), and not disconnecting it properly (pulling the plug out of their heads) causes it to enter an unsupported state. I guess they dont implement IDisposable, pitty.
# September 18, 2006 5:24 PM

ナオキにASP.NET(仮) said:

Nikhil さん と Bleroy さん の blog からです。 Script# Prototype Script# brings compile-time and C# niceties to JavaScript

# September 19, 2006 3:29 AM

Infinity said:

possible to support bmp, gif and png also ?
# September 20, 2006 3:01 AM

Bertrand Le Roy said:

Infinity: it's shared source, so feel free to implement that, but I won't in the near future, jpeg being the dominant format for photos. Sorry.

# September 20, 2006 7:53 PM

ナオキにASP.NET(仮) said:

nikhilk.net と Atlas and more と ScottGu's Blog からです。 Back Button Support for Atlas UpdatePanels ( nikhilk.net

# September 22, 2006 4:54 AM

John fron OK said:

Keyboard: Microsoft Ergonomic 4000 I thought F-lock would be an issue but it really is not – it stays on and the light at the bottom of the keyboard is both visible and unobstrusive. But what to make of the key functions themselves? “Close” – F6 – is a ctrl-F4, not an alt-F4. The ergonomic layout now makes either of these combinations ergonomically painful, so I mapped one of my 5 “favorite” buttons to do alt-F4, and occasionally turn the F-lock off if I need repeated ctrl-F4’s. “Send” – F9 – does not “send/receive” in Outlook. F9 does. Which F-key? Why, it’s the one with “Send/F9” written on it. So I get the benefit of the new function without actually resorting to that function. I have yet to figure any rational purpose for the other “alternate” functions. Why was is it so hard to use ctrl-Z, ctrl-P, ctrl-S, that they had to give them their own keys? Thanks for the tip on Excel and Scrlk. Thanks for the original rant, too. PrtScn,Sysrq,Scrlk,Pause,Break have always been a mystery. Num-lock drives my coworkers nuts.
# September 22, 2006 12:13 PM

John Porter said:

I've got the lattest 60914 Prod dll but when I add it to my toolbox I have the accordion component but do not seem to have the AccordionPane component and so am ubale to use this. Is anyone else having the same problem? How do I go about fixing it?
# September 22, 2006 7:18 PM

Bertrand Le Roy said:

John: I have no idea what dll you're talking about. If you're using the Toolkit's Accordion, you should ask this question on the toolkit forums:

http://forums.asp.net/1022/ShowForum.aspx

# September 22, 2006 7:26 PM

John Porter said:

Sorry yes I'm using the toolkit on, my bad thought this was the same one.
# September 22, 2006 7:31 PM

Bertrand Le Roy said:

No, this one was written way before. I'll update the post to make that clearer and to point people to the toolkit one (which should be used instead of this sample).

# September 22, 2006 7:37 PM

Atlas and more said:

I thought I&#39;d write a few posts about the controls I&#39;ve created for Brad&#39;s Mix06 demo, which

# September 22, 2006 7:40 PM

STFO said:

I think the Wii, is aimed for a different audience. PS2 and Xbox are mostly played by teenagers and older men. But this can bring in children and the elderly. Also I think they will have normal games as well. Because they also have an anologue stick (whatever you call them)

# September 23, 2006 2:15 AM

Troubled said:

Hello Bertrand Le Roy, I'm using : Session["MemberNo"] = 5; Response.Redirect("~/ViewMember.aspx", false); and i'm still losing the sesion value once steping over Response.Redirect. What might be the reason causing this behavior.
# September 23, 2006 4:14 PM

ASP.NET Chinese Blogs said:

[来源:Bertrand Le Roy] 传统的web应用一般含有多个页面,用户在浏览时,浏览器地址框里的地址会随着页面的变动而更新。用户可以bookmark页面把网页地址收藏,之后通过收藏夹里的地址回到同个页面。用户在网站浏览时,也可以使用浏览器的向前/向后按钮来回访问多个网页。

# September 23, 2006 5:10 PM

Bertrand Le Roy said:

Troubled: send me mail at bleroy at microsoft com with code to reproduce the problem and I'll have a look.

# September 24, 2006 12:56 AM

Marcelo said:

Keith: I found the same problem as you did, and I got to solve it by copying the folder Alert that comes with the source code to the root of my website. Then everything started to work. I hope this helps you. Bye.
# September 27, 2006 4:55 PM

InfinitiesLoop said:

We shall call it "the double negative trick" :)
# September 29, 2006 4:09 PM

InfinitiesLoop said:

Isaac Asimov: The most exciting phrase to hear in science, the one that heralds new discoveries, is not Eureka! (I found it!) but rather, "hmm.... that's funny...."
# September 29, 2006 8:51 PM

Dan's Bloggings said:

Normally I wouldn't expect myself to find a reason to blog about Javascript. After all, for anyone who's gone through the browser wars having tried to do dhtml the hard way and be browser friendly, Ja ...

# September 29, 2006 10:45 PM

Vikram said:

"Electricity wasn't discovered by trying to improve the candle." to add to that neither was Asp.Net discovered in trying to improve ASP.
# September 30, 2006 7:22 AM

Nick said:

Is it possible to open a web page with accordion to open with a particular pane? For example if i have pane1 pane2 and pane3 and when I call a page, it will start with pane2 open. Thanks.
# September 30, 2006 1:14 PM

Bertrand Le Roy said:

Nick: of course. Just set the current pane before initialization (which is easy if you're using xml-script, just write the attribute). When the page loads, all panes will be visible until initialization (this is desirable because if people visit your page with JavaScript disabled, they will see all panes and should still be able to use your application) but as soon as initialization happens, the panes other than the current one will collapse without animating.

# September 30, 2006 8:44 PM

ScottGu's Blog said:

SQL Injection attacks are reallynasty security vulnerabilities, and something all web developers (regardless

# October 1, 2006 12:29 AM

Christophe Lauer, Blog Edition said:

C'est une annonce relayée coup sur coup sur les blogs de Bertrand Le Roy et de Scott Guthrie : ComponentArt...

# October 1, 2006 11:42 AM

Showme said:

MS said SQL Reports will work in Firefox, it doesn't. MS said ClickOnce will work in all browsers, it's IE only. MS said Atlas will work in Firefox, it .... give me a break. (It's not done until Lotus 123 won't run)
# October 1, 2006 8:44 PM

Mal said:

I'm no Javascript whizz, but if I were you, I'd stick to your previous technique (the ternary operator), as it's more explicit in its use of Boolean values. Just feels like it gives more clarity.
# October 2, 2006 6:54 AM

Bertrand Le Roy said:

Showme: I don't know about the other products you mention but Atlas *already* works on Firefox. You can very this yourself as it's a free download.

So yes, MS said Atlas will work in Firefox and it already does.

# October 2, 2006 3:07 PM

Bertrand Le Roy said:

Mal: I would usually agree with you but in this context, we need the Atlas script files to be as small as possible even if it means that they are a little less readable. Plus, we're far from the extreme C++ samples that come to mind when you look at such code.

Ideally, a JavaScript cruncher should be able to translate X?true:false into !!X.

# October 2, 2006 3:20 PM

Alex said:

I'm just getting this error: Parser Error Message: User control source files must have a .ascx file extension. Any suggestions?
# October 3, 2006 2:40 PM

Bertrand Le Roy said:

Alex: can you give me a little more context? What version of ASP.NET are you using? What did you do exactly, etc.? Drop me e-mail at bleroy (microsoft.com)

# October 3, 2006 2:45 PM

Mike said:

Has anyone used this? Thoughts?
# October 5, 2006 7:20 PM

sys1jal said:

I am somewhat new to the Asp.Net environment. I'd also like to get the VB code but I can't locate it. Could you be a little more explicit in your directions where it is. I have looked... Thanks.
# October 6, 2006 12:16 PM

sys1jal said:

Bertrand, Thank you for the link for the VB code. I copied the files to my PC, but I am getting multiple errors when I try to run Default.Aspx and the page won't open. I am new to the environment, so I am sure that it is something basic that I have done incorrectly. These are typical: "Element 'Alert' is not a known element. This can occur if there is a compilation error in the website" Element 'ConfirmButton' is not a known element. This can occur if there is a compilation error in the Web site. 'AlertButtons' is ambiguous in the namespace 'Microsoft.Samples.Alert'. Name 'ServerAlert' is not declared. Thx.
# October 6, 2006 6:27 PM

Bertrand Le Roy said:

Many possible causes to that but the most likely is that you didn't copy the folder that contains the VB code as a web application. So ASP.NET is probably not even looking at the App_Code folder because it's not at the root of an applicaiton.

# October 6, 2006 6:47 PM

Rick Strahl said:

I've run into this on a few occasions, and it's one of those things that are totally non-obvious about JavaScript - until you hit it... I've come to think of prototype like a sort of static interface with closures being more like a typical instance interface. It depends on the situation, but it seems to me one should be really careful with assigning protypes because you may never know how a class is used.
# October 8, 2006 5:23 AM

Manuel Abadia said:

Bertrand, the output in both cases is: Bar #1[object Object] Bar #2[object Object] as stuff is an object. Anyway, going to the root of the post, to be on the safe side when using the prototype based approach, use null when defining properties that will hold objects in the prototype and create the object in the constructor. In this case just changing the stuff definition for: Foo.Bar.prototype.stuff = null; and using the first constructor for the second case works. As you mention, the prototype based approach is better for memory (specially if there are a lot of functions) so my question is why most of the atlas classes use the closure style??? I posted something a bit related to this when talking about atlas javascript OOP enhancements: http://www.manuelabadia.com/blog/PermaLink,guid,c59facc0-301e-4e30-898d-428038828dcd.aspx
# October 8, 2006 6:20 AM

Bertrand Le Roy said:

Manuel, you'll see in the next CTP that all Atlas classes are now prototype-based.

I'll fix the post.

# October 9, 2006 12:02 AM

Manuel Abadia said:

Bertrand, that's good news! Is the next CTP comming out soon? :)
# October 9, 2006 3:08 AM

Garbin said:

Hi, I still remember that headache... I've read about this tip only in a book entirely dedicated to JavaScript. Thanks for sharing it.
# October 9, 2006 1:46 PM

Bertrand Le Roy said:

Manuel: we're working really hard on the new CTP currently. I can't tell you when it will be ready exactly yet, but we're doing everthing we can to get that into your hands as soon as possible.

I'll make another post soon about the transition from closure to prototype, its motivations and caveats.

# October 9, 2006 2:49 PM

Manuel Abadia said:

Bertrand: Thanks for the information. As the last release was a few months ago I'm a bit impatient to get the latests bits in my hands. The post you talk about sounds really interesting...
# October 9, 2006 6:24 PM

Manuel Abadia's ASP.NET stuff said:

This posts completes the Microsoft AJAX library OOP enhancements, giving a lot o

# October 11, 2006 7:20 AM

Craig Serold said:

Hey guys, I'm pretty green on javascript/Atlas script. do you guys have any suggested reading for learning more about the prototype and closure references you make here? Thanks!
# October 11, 2006 8:01 AM

Travis James said:

This is a great article. I suppose in the next installment you will cover how prototypes can be dangerous when expecting "virtual" function behavior and the fact that prototypes are static instances that, once defined, change the behavior of all versions of the function called after a new prototype has been defined? Because the Atlas closure model with the "getTypeDescriptor()" semantic allows for overriding and calling "base class implementations" it might be confusing to make the right decision about what model to use.
# October 11, 2006 8:51 AM

michael said:

what about the following? same thing, just seems easier to read/associate the grouping. function Point(x, y){ this._x = x; this._y = y; } Point.prototype = { get_x: function() { return this._x; }, get_y: function() { return this._y; } } var x = new Point(2,5); alert(x.get_x());
# October 11, 2006 10:05 AM

Wallym said:

Awesome. Thansk Bertrand.
# October 11, 2006 10:20 AM

Matt G said:

Since I came across this post I was curious if a problem I'm have getting Response.Redirect working with an UpdatePanel is related to this issue. According to what I've seen this issue was resolved a while back, but response.redirect does not seem to work for me.
# October 11, 2006 11:34 AM

Bertrand Le Roy said:

# October 11, 2006 12:18 PM

Bertrand Le Roy said:

Michael: yes, absolutely, this will be covered in part 2, and it is the style we're using in our own classes but I wanted to stay out of any Atlas-isms in the first part. There's something missing in your example though, as if you set the prototype this way, you also need to (re)set the constructor. If using Atlas, this is taken care of when registering the class. More on that later.

# October 11, 2006 12:22 PM

Bertrand Le Roy said:

Matt: send me a simple repro of your problem at bleroy (at microsoft). I'll have a look.

# October 11, 2006 12:41 PM

Atlas notes said:

It seems that the next MS AJAX preview will be very, very different from the previous CTP. Bertrand Le

# October 11, 2006 1:52 PM

Atlas notes said:

It seems that the next MS AJAX preview will be very, very different from the previous CTP. Bertrand Le

# October 11, 2006 3:45 PM

David Barkol said:

So it's been a while since the last Atlas CTP was released (July). By now, if you've been following...

# October 12, 2006 3:07 AM

Jportelas said:

I like the: if(typeof(VariableName)=='undefined'){...} It works fine.
# October 12, 2006 11:10 AM

Atlas and more said:

Here are three common mistakes I&#39;ve seen recently in script files.Undefined is not null.If you&#39;ve

# October 12, 2006 2:32 PM

Kelly White said:

Betrand Le Roy of Atlas fame has an interesting writeup on what he understood from the Matrix Trilogy.

# October 12, 2006 4:11 PM

Marc said:

Cant get this work with Masterpages and script manager in Master... :s could not reference to object named "_PageRequestManager" for "datacontext" property on object of Type "sys.Binding" any help ? its working on standalone but in masterpages :s
# October 13, 2006 1:51 PM

Bertrand Le Roy said:

Marc: I don't think this has anything to do with the code sample in this post, which only uses client-side logic and thus will not be affected by anything server-side. I'm suspecting that removing the accordion from the page entirely you would still have the problem.

Anyway, you should probably start using the Atlas Toolkit's accordion control, which is open-source and more advanced than this sample.

# October 13, 2006 3:08 PM

Atlas and more said:

In part 1 of this post, I exposed the differences between the closure and the prototype patterns to define

# October 14, 2006 3:22 AM

Atlas and more said:

In part 1 of this post, I exposed the differences between the closure and the prototype patterns to define

# October 14, 2006 3:28 AM

Marc Brooks said:

With the ambiguity about reference versus value types for fields, why not ALWAYS put the fields in the constructor and never in the prototype? It would be simpler and more consistent, not to mention faster since the lookup against the object instance always occurs before the lookup against the prototype. You example translation even stops there, but the guidelines then get ambiguous. Please, before this gets too far, can we rethink these guidelines and aim for something that is far less likely to result in accidental errors?
# October 14, 2006 3:57 AM

Luis Abreu said:

hello. in my opinion, _baz should be declared inside the constructor, not inside the object that it's assigned to the prototype property. in other words, it should be: Foo.Bar = function() { this._baz = ""; } Foo.Bar.prototype = { }
# October 14, 2006 11:36 AM

Luis Abreu said:

not sure if my previous comment was submitted, so i'll put it here again. in my opinion, private constructor variables should be assigned inside the constructor and not in the object assigned to the prototype property. ex.: Foo.Bar = function() { this._baz = ""; } Foo.Bar.prototype = { } i think that prototype may not give you the semantics you want in all cases...
# October 14, 2006 11:41 AM

Bertrand Le Roy said:

You're both right, I fixed the post. Luis: I explained that in this post:

http://weblogs.asp.net/bleroy/archive/2006/10/07/Careful-with-that-prototype_2C00_-Eugene.aspx

In principle, null and value types are fine to initialize from the prototype, but it does make clearer guidelines to do them all from the constructor.

# October 14, 2006 12:17 PM

Marc Brooks said:

One other thought... I much prefer doing the seperator comma as a leading instead of trailing comma. This prevents accidentally leaving that dangling comma. I do the same thing in SQL queries.
# October 15, 2006 2:00 AM

Luis Abreu said:

hi. yep, you're right...i've missed that post...
# October 15, 2006 2:16 PM

Alex said:

you left it out and a crackhead stole it and sold it for a dollar
# October 15, 2006 7:02 PM

Ryan Heath said:

[quote] Note the convention that private members (fields and methods) are prefixed with an underscore. This convention will be adopted by Visual Studio Orcas in IntelliSense. [/quote] We need to prefix the variables with this. to access them, so why the extra _ prefix? // Ryan
# October 16, 2006 3:43 AM

Alex Osipov said:

Bertrand - do you have any benchmarks on these changes when compared to closure based Atlas? What kind of improvements can we expect? I only ask this because in experimenting with different optimization in js I have found very far and few improvements.
# October 16, 2006 11:22 AM

Bertrand Le Roy said:

Ryan: from the *outside*, you need a way to tell public and private members apart. Users of your classes (and Visual Studio) must be able to determine easily if Foo.bar() or Foo._bar() is public or private.

Alex: from our benchmarks, creating an instance is between 3.5 and 16 times faster depending on the browser. Firefox is getting the biggest benefits. Calling members is a little slower on all browsers (between 8 and 58 percent) because of the need to lookup on the instance, then the prototype. But the biggest benefit is in terms of working set with the prototype model taking about 30 times less memory than closures. Finally, parsing times are about twice as fast on IE with closures, and four times as fast with prototypes on Firefox.

So all in all, closures are generally a little faster on IE, but prototypes really shine on Firefox. All this was with IE6 but I don't think the JavaScript engine was changed in IE7.

Of course, all those are micro-benchmarks so your mileage may vary, depending on your type of application.

# October 16, 2006 8:04 PM

Rick Strahl said:

Bertrand, does this mean the syntax conventions will make it possible to forgo the type descriptor interface that's required in the current builds?
# October 16, 2006 8:54 PM

Bertrand Le Roy said:

Rick: this in principle doesn't change anything to type descriptors, which still need additional type information. The design for type descriptors *did* change, but for different reasons. More on that later.

# October 16, 2006 9:03 PM

Michael Stuart said:

I had heard that the next release would be sometime this week. Do you know if there's any truth to that prediction? Thanks for these Atlas posts...they're very helpful.
# October 17, 2006 2:23 PM

inventive title said:

Microsoft has been hard at work on the next Microsoft ASP.NET AJAX (formerly &quot;Atlas&quot;) CTP,

# October 17, 2006 5:40 PM

Jon Flanders said:

Bertrand - any ideas when a public CTP using prototypes will be available?
# October 17, 2006 6:04 PM

Bertrand Le Roy said:

Michael, Jon: it's imminent.

# October 17, 2006 6:14 PM

inventive title said:

Microsoft has been hard at work on the next Microsoft ASP.NET AJAX (formerly &quot;Atlas&quot;) CTP,

# October 20, 2006 9:52 AM

Christophe Lauer, Blog Edition said:

Scott Guthrie l'annonce sur son blog via un billet fort détaillé . La version Beta 1 de Microsoft ASP.NET

# October 20, 2006 12:25 PM

ASP.NET Français Blogs said:

Scott Guthrie l'annonce sur son blog via un billet fort détaillé. La version Beta 1 de Microsoft ASP.NET

# October 20, 2006 12:30 PM

Pieter Siegers said:

Congrats Bertrand! :-) Cheers, Pieter
# October 20, 2006 1:59 PM

Fox Blogs said:

Pour compléter le billet de Patrice il y a la beta 1 de Microsoft ASP.NET Ajax Extentions de dispo mais

# October 20, 2006 7:26 PM

Fox Blogs said:

Pour compléter le billet de Patrice il y a la beta 1 de Microsoft ASP.NET Ajax Extentions de dispo mais

# October 20, 2006 7:29 PM

Cyril 's Blog said:

Patrice et Fox vous l'a déjà annoncé hier : Une nouvelle version de Microsoft Ajax Extensions (nom de

# October 21, 2006 6:25 PM

I Love C# said:

Good post on this subject by Bertrand Le Roy

# October 21, 2006 8:14 PM

Johnny said:

Hmmm... To Taiwanese and maybe other Asian users Caps Lock is a little bit important because we need it to switch between IME and English input. I don't remember pressing the Caps Lock key when I actually want to press the Tab key, but I do sometimes press the Function key instead of Ctrl on my notebook. Yes, it is sometimes quite bothering.
# October 21, 2006 9:14 PM

Aaron Seet said:

There is another twist to that quote. "If you think education is expensive, try ignorance!"
# October 22, 2006 10:22 PM

Zenute Marins said:

This is very confusing! I have two web applications with Atlas and in the first one I can save and retrieve Session variables after redirecting like in (Response.Redirect("Clientes.aspx")). The second application using the same code as described above fails with a null exception when I try to retrieve any Session variable prevously saved. i'm going nuts here!
# October 23, 2006 10:26 AM

Bertrand Le Roy said:

Zenute: one thing to look for is wether the session already exists before you do the redirect but if in doubt, use the overload as explained in the post.

# October 23, 2006 3:54 PM

Rumen Stankov (telerik) said:

Hello Bertrand, IMHO, internal changes are way to radical. I know that long-term everyone will benefit, but still... for people that want to build on top of your Ajax framework there is a lot of pain while migrating our codebase from Atlas CTP to Ajax Beta 1. Somehow, we needed to know earlier about the need to register scripts in ScriptManager instead of using Page.RegisterClientScriptBlock, the change from Xml to that strange "|" delimited response, what happened to "delta", etc. We will be able to migrate of course, but again, a lot of pain for us and our (and yours) customers. A couple of questions: 1. What is the easiest way for an ASP.NET control to detect if an MS Ajax update is in progress (server-side)? 2. Are there any client-side hooks (events) where we can run custom code (for example to run disposing code that avoids IE memory leaks)? Regards, Rumen Stankov (telerik)
# October 24, 2006 2:37 AM

Bertrand Le Roy said:

Rumen: I've read your recent blog post in addition to your comment and I have to admit I'm a little surprised by one or two things there.

We are and have been willing to share with you (and all component vendors) early builds of ASP.NET AJAX, as well as integrate your feedback on our design choices.

We've always been very clear that the intent of the CTPs was to gather feedback *and* integrate that feedback in the form of design changes. The go-live licenses have never been a "promise" of no breaking changes. On the contrary, we have always said that there *would* be breaking changes.

We have made the information about registering with the script manager available to the community (in particular in dev labs) as early as in July so I'm surprised it comes as news to you. Maybe we need to keep in touch better in the future so that you get all that data ahead of time.

1. ScriptManager.IsInAsyncPostback http://ajax.asp.net/docs/mref/db2bbeac-e762-e1ac-ca74-1a3e6ab76979.aspx

2. There are many client-side events. Do you mean related to UpdatePanel? If so, they are listed here: http://ajax.asp.net/docs/ClientReference/Sys.WebForms/PageRequestManagerClass.aspx

If you make your controls and behaviors implement IDisposable, you don't have anything special to do, as the dispose method will be called before the DOM is disposed of.

Just so you know, other component vendors have been able to migrate their whole codebase in just a few days so I'd be very interested to know exactly what difficulties you hit. Don't hesitate to drop me mail (my alias is bleroy).

# October 24, 2006 3:29 AM

Rumen Stankov (telerik) said:

Thanks for the quick response. Just wanted to let you know that I'm talking about existing ASP.NET 2.0 custom web controls (System.Web.UI.WebControl) - how do you access ScriptManager from there without referencing the MS Ajax Beta 1 assembly? We need a suite that works with or without MS Ajax and for the time being cannot reference the assembly explicitly.
# October 24, 2006 4:06 AM

Gridview requires Viewstate for certain types of paging.. said:

Disable viewstate, and the First/Last paging will incur a hit (at least thats what happened when I tested it).
# October 24, 2006 9:36 PM

Bertrand Le Roy said:

What do you mean?

# October 25, 2006 1:22 AM

Chak said:

Are there any changes with regard to 'UpdatePanel' and the trigger used in it ? Is that part of ATLAS backward compatible ?
# October 25, 2006 2:09 AM

Bertrand Le Roy said:

Chak: this blog post by Scott Guthrie has a detailed description of the changes in the beta from the July CTP:

http://weblogs.asp.net/scottgu/archive/2006/10/20/ASP.NET-AJAX-Beta-1-Released.aspx

# October 25, 2006 1:53 PM

Moderage Waas said:

Have you tried doing asynchornous calls while you are inside a loop ? It does not work. I mean while(i< 5) { send_request_to_server(i) } Only the last request will successfully make it. Question: How do we send a request, then wait till we get an answer and then go for a second round ?
# October 26, 2006 1:14 PM

Bertrand Le Roy said:

Moderage: Well, first I'm not sure it's a good idea to do server requests in a loop. You should probably batch those requests together to minimize network roundtrips. But if you must, using a queue is the right way to do this asynchronously.

# October 26, 2006 3:46 PM

Boldi said:

Using "#" as the src of the iFrame works fine with transparent iFrame too but I'm not sure is it good for the https: case. Would someone try it, please?
# October 29, 2006 4:33 PM

LudovicoVan said:

Hello, I really do not get the point of this article. I would point out that JavaScript is a great dynamic language, and it is not simply a downgraded version of an OO language. Here is how I would write a real life Point constructor: this.Point = function (x, y) { this.x = x; this.y = y; }; When you need a private member, or a closure, it is because you need it. That is, know your language... My two cents. -LV
# October 29, 2006 10:48 PM

Bertrand Le Roy said:

Ludovico: this is *sample code* that has no other goal than to illustrate the discussion.

If I had to write a point in "real life", I would do var point = {x: x, y: y};

Thank you very much for explaining JavaScript to me but you have to think in the context of a larger and more useful class and transpose what I'm saying to that context.

# October 30, 2006 1:44 PM

LudovicoVan said:

Indeed, that is what I meant: there are no "classes" in JavaScript!!! (And, btw, what you show above does not make more sense, unless you need a singleton point.) Please, don't take this personally, it isn't. IMHO *all* the .Net JavaScript built-in code, be it AJAX, validation, or whatever, is simply broken since its very design. You guys are thinking in terms of object orientation, but JavaScript is completely another beast. It is not a question of the single constructs. It is how you architect a program in JavaScript. It is apparent that you guys are not more than very knowledgeable beginners in this, coming from another field, that is OO... Here is a JavaScript guru: http://www.crockford.com/javascript/ Best regards. -LV
# October 30, 2006 9:35 PM

LudovicoVan said:

> Your position is highly dogmatic and difficult to hold.

The ECMA standard has since the very beginning been tagged to be buggy from the JavaScript gurus. And they not only didn't fix the flows, they are since then trying to add more. On the other hand, I would note that C# 3.0 is making the opposite move. So I am confident in regard to the future. An even bigger mess.

> How do you explain "new", "this", "instanceof" or "constructor"?

Here is a quote from Mr. Crockford:

Is JavaScript object-oriented? It has objects which can contain data and methods that act upon that data. Objects can contain other objects. It does not have classes, but it does have constructors which do what classes do, including acting as containers for class variables and methods. It does not have class-oriented inheritance, but it does have prototype-oriented inheritance.

The two main ways of building up object systems are by inheritance (is-a) and by aggregation (has-a). JavaScript does both, but its dynamic nature allows it to excel at aggregation.

> quite a lot of people still to this day consider that OOP is the best way to build reusable code and applications above a certain size

Yes, as well as we know most of the software projects around keep miserably under-perform.

Please, don't laugh at that...

Cheers. -LV

# October 31, 2006 2:57 AM

Bertrand Le Roy said:

Is that so? How do you explain "new", "this", "instanceof" or "constructor"? What about sections 13.2 and 15 of the EcmaScript specs? How come JavaScript 2.0 has "class" and "namespace"? Are these also misguided attempts from beginners in the field to make JavaScript what it's not?

Your position is highly dogmatic and difficult to hold.

Furthermore, quite a lot of people still to this day consider that OOP is the best way to build reusable code and applications above a certain size. There is a demand today for frameworks that enable the application of reliable engineering methods to the browser. Our users, as well as the users of Dojo or other frameworks don't seem to consider modern JavaScript frameworks to be "broken since [their] very design". At least it seems to solve a real-world problem.

# October 31, 2006 3:03 AM

Bertrand Le Roy said:

Except from citing "JavaScript gurus", what good arguments do you have? Saying that EcmaScript is broken is arrogant at best if you don't elaborate. What about JavaScript 2.0? Is it broken too? So are all these people highly incompetent and only you and Mr. Crockford have understood the True Nature of JavaScript?

How does the Atlas type system prevent you from doing aggregation? I've even published a blog post on the subject a while ago with some sample code, and although I quite like the whole idea, most of the feedback I got was that it was only marginally useful.

I'm really sorry that you don't share our views on client-side development but we're going to continue in this direction anyway as most of the feedback we get encourage us to do so.

# October 31, 2006 3:12 AM

Miljan Braticevic said:

We have recently completed converting our suite of user interface controls from the latest Community

# October 31, 2006 4:45 PM

Miljan Braticevic said:

We have recently completed converting our suite of user interface controls from the latest Community

# October 31, 2006 4:52 PM

LudovicoVan said:

</cite></cite>

<p>I won't explain what is in the FAQ and any self-claiming JavaScript programmer should know, like we know what Response.Write does in ASP. For those new to JavaScript, and have never heard about <strong>Mr. Crockford</strong>, here are few hints:</p>

<p>These are the contributors to the comp.lang.javascript FAQ: http://www.jibbering.com/faq/faq_notes/contributors.html, and you will see a certain <strong>Mr. Cornford</strong> there.</p>

<p>Now, here is Cornford's introduction to OO techniques in JS: http://www.litotes.demon.co.uk/js_info/private_static.html, and you will see it makes reference to a certain <strong>Mr. Crockford</strong> since the very first paragraph, and builds on his work.</p>

<p>Any decent JavaScript programmer knows who Crockford is and what he did for this language. The rest, I have already said.</p>

<p>Hope this clarifies and helps.</p>

<p>Sincerely. -LudovicoVan</p>

# October 31, 2006 11:39 PM

Bertrand Le Roy said:

LudovicoVan's latest comment was somehow confused for spam, but I salvaged it from my mail notifications so here it is:

"I won't explain what is in the FAQ and any self-claiming JavaScript programmer should know, like we know what Response.Write does in ASP. For those new to JavaScript, and have never heard about <strong>Mr. Crockford</strong>, here are few hints:

These are the contributors to the comp.lang.javascript FAQ: http://www.jibbering.com/faq/faq_notes/contributors.html, and you will see a certain <strong>Mr. Cornford</strong> there.

Now, here is Cornford's introduction to OO techniques in JS: http://www.litotes.demon.co.uk/js_info/private_static.html, and you will see it makes reference to a certain <strong>Mr. Crockford</strong> since the very first paragraph, and builds on his work.

Any decent JavaScript programmer knows who Crockford is and what he did for this language. The rest, I have already said.

Hope this clarifies and helps.

Sincerely. -LudovicoVan"

Dear Ludovico, I know very very well who Mr. Crockford is, thank you very much. Quotes can be used to cite, not only in a sarcastic way. I was not being sarcastic about him being a JavaScript guru, I was merely citing you: "The ECMA standard has since the very beginning been tagged to be buggy from the JavaScript gurus," and encouraging you to be more specific. How is it buggy? Who are "the JavaScript gurus" you talk about? Do you have anything more than authority arguments to substantiate that claim?

And for the third time, what about JavaScript 2.0? Ever heard of Brendan Eich?

I encourage you to read this, which should clear a lot of confusion:

http://developer.mozilla.org/presentations/xtech2006/javascript/

# November 1, 2006 2:09 AM

LudovicoVan said:

Hey man, with all respect, you keep pushing up the "great" work in progress, and we might discuss that in depth, yet my original observation was of a more basic nature: JavaScript is an object-based dynamic language, while you are approaching it as a standard OO language, and building frameworks over this misconception.

I might be wrong, but I can't be clearer than I am.

Best luck to the team, and also to the unfortunate that happens to build on this stuff.

Bye. -LV

# November 1, 2006 4:10 AM

LudovicoVan said:

Now, you know, that is as well feedback from the community. ;) -LV
# November 1, 2006 9:38 AM

Bertrand Le Roy said:

Yes, that is feedback, but you are so far the *only one* to give us that kind of feedback. You seem to be confusing object oriented and class-based. JavaScript is object-oriented, but not class-based in the current version. We recognize and use the prototype and dynamic nature of JavaScript, but at the same time, we agree with experts such as Brendan Eich that there is also a need for classes and we're answering that need while waiting for JavaScript 2 to be available on all browsers. For example, representing widgets and behaviors with class instances is extremely useful and opens up lots of possibilities.

# November 1, 2006 12:01 PM

xgene said:

Downloaded this and it worked perfectly out the gate. Thanks much!
# November 1, 2006 3:42 PM

NITMAL said:

Please let me know the status of your POC, has it been tested on production by someone now...or some better way to do the ASP and ASP.Net session sharing...bcoz i need to implement it in my new migration project. We were thinking of using the database approach given on msdn...but looks like u have a better idea...Please suggest
# November 2, 2006 12:24 AM

Bertrand Le Roy said:

Nitmal: not that I know of so I'd say it's relatively risky. It totally depends on the type of project. On the bright side, the source is totally free to use and modify. If I can be of assistance, you can e-mail me through the contact form.

# November 2, 2006 3:37 PM

NITMAL said:

Thanks for your inputs...the project is a financial domain project...which is currently in asp3.0 and little bit in asp.net1.1...We are in the process of migrating it to .net 2.0...However we plan to do it in the incremental way rather than the Big bang approach...So we were exploring the best ways to use session in .net in terms of performance,scalability and failover..but also keeping in mind the coexistence of asp and aspx..We have a few options on which we want to expolre before doing POC's on the best two...A few options we have are... a)The msdn suggested way using database as an intermediate session store...We can also use this Db as out-proc session store..for our web farm.. b) Third party products...Like StateStich and AspBridge..for asp/aspx session shsring.. c) Your POC way.. However performance and security are some major things we need to keep in mind before picking our solutions...as the application is a heavy traffic,high security site... Please provide us some inputs which can help us in moving forward... Thanks Again for all ur help Nitmal
# November 2, 2006 11:07 PM

Bertrand Le Roy said:

Looks mission critical from your description...

Another thing to consider is the amount of data you store in session and how often you query it.

Contact me through the contact form of this blog, we can talk about the different options that you have.

# November 3, 2006 3:31 PM

Dave T said:

Awesome. Vbscript is gonna make a comeback in a huge way!
# November 3, 2006 8:22 PM

Atlas and more said:

In previous CTPs, the client-side DOM event model was the IE model. You would use attachEvent and get

# November 6, 2006 7:26 PM

Atlas notes said:

You can download the bits here . The "value-add" package is now called "Futures" and it's available as

# November 7, 2006 8:18 AM

Michael Stuart said:

Thanks for this kind of info (the current Microsoft AJAX Library documentation is really lacking right now).
# November 7, 2006 8:20 AM

ChrisO said:

This is very similar to the dojo approach which truth be told was one of the biggest reasons of my choice to use dojo instead of atlas on my projects. It looks like you guys are on the right track though. Nice work.
# November 7, 2006 10:27 AM

michael said:

I like how you can wire multiple events for the same handler. Is there a similar way to wire multiple elements to the same handler? Ideally it'd be great to do some sort of CSS-Event Selector or Behaviour type of thing.
# November 7, 2006 12:44 PM

Jon said:

I'm confused why you are even bothering putting the $ in the front of your alias'? Oh wait, it is because we are worrying about overwriting other people functions... Which of course is the reason why you use namespaces such as Sys... I guess you guys feel that prefixing your alias names with $ is a safe Microsoft "namespace"... too bad other frameworks like prototype already use the same "namespace"... Hopefully you guys won't get burned like you already did with $()... My suggestion for alias' is to come up with something you can legitimately claim like ms.addHandlers. - Just My .02
# November 7, 2006 5:33 PM

Atteint de Javascriptite aigüe said:

Fox nous a TRES brievement annoncer la mis en ligne de la beta 2 de Microsoft Ajax Extension : ASP.NET

# November 7, 2006 9:02 PM

Bertrand Le Roy said:

Jon: so the other frameworks can use short aliases, but we can't? All $ aliases are shortcuts for a properly namespaced function, as the post explains. That means that if any of those collide, you can still use the fully-qualified name and include the conflicting library after ours (that's why the aliases are not used from within the core library's code). It seems like we're the only ones to actually care about not colliding with existing aliases from competing frameworks, and we don't even get some credit for that?

# November 7, 2006 10:29 PM

scathe said:

#, if clicked - will refresh the root page, not a good idea nowadays with ajax, cms sites and the like. In other words # doesnt work fine with me :)
# November 8, 2006 5:53 AM

Jon said:

There is a big problem if any of those collide and your script is registered last (controlling which script is registered last is not always easy). For it will overwrite the functionality in the original, as you found out with the $() with prototype. There is also a big problem if control developers (who don't know what other frameworks their end developers will be using) use alias'. I suppose you could discourage control devs from using alias'... To me you are using a $ to serve as a namespace, for I see no other reason for using it. If that is the case, why would you not choose a namespace that is unique compared to all other frameworks out there (at least the major ones)? say something like ms. or m$ (<-- joke) A unique namespace seems like the most logical choice to avoid these issues and extra disclaimers to control devs.
# November 8, 2006 1:54 PM

Jon said:

> so the other frameworks can use short aliases, but we can't? No, you can (and should) use alias', you just should not choose the same prefix as other frameworks... > It seems like we're the only ones to actually care about not colliding with existing aliases from competing frameworks, In my opinion, if you cared enough about colliding, you would not have chosen the same prefix. (Also, you are not the only ones caring about colliding.) > and we don't even get some credit for that? Sure you do, but you are Microsoft. I would think that you guys expect the bar to be higher for you than anyone else, being the leading software company in the world...
# November 8, 2006 2:15 PM

Bertrand Le Roy said:

Jon: fair enough, but what other (short) prefix could we have used (MS is not an option for legal reasons)? It's becoming a common convention that such aliases start with $ (which is the only special character allowed with underscore which is more used to denote internal/private) to avoid most collisions with global functions defined by the page developer. Anyway, we checked that we didn't collide with any known alias in the known major frameworks. For the future, nothing can really guarantee that you don't have collisions, even if you use namespaces like we do, save for having a standardization group that coordinates everybody's efforts. That's exactly what OpenAjax is trying to do.

# November 8, 2006 2:38 PM

Bertrand Le Roy said:

scathe: actually, # does *not* navigate away from the page if clicked, but it adds to the browser history. You can use BLOCKED SCRIPTvoid(0) instead anyway.

# November 8, 2006 3:18 PM

Jon said:

>Fair enough, but what other (short) prefix could we have used I suggested some earlier. If you have a problem with ms. then pick any other combination of 2 or 3 characters. I am only suggesting for it to not start with $. This is the same mentality that I don't create make any of my own .NET namespaces starting with System. If I created a new utility class (say AJAX), I would never consider placing it in System.AJAX. If I did, and Microsoft later added that same namespace, I would be the one to blame, not Microsoft for things breaking. The way I see it here, you are using an already established framework's namespace. As a side note, I find it interesting that you are concerned with its length. For the name you are choosing after the namespace/prefix are rather verbose (IMO). If it is an alias, why not make the entire thing as short as possible? Of course you would want to make it understandable, I think prototype goes a little too far with its $A(), $F(), etc.
# November 8, 2006 3:24 PM

Atlas notes said:

Introduction Microsoft Ajax defines a component as a class that inherits from the base Sys.Component

# November 9, 2006 9:03 AM

Leland Scott said:

It's not at all clear to me why Microsoft, which was very late to the Ajax party to start with, felt the need to try to reinvent the wheel and develop their own "brand" of Ajax to begin with. Both Prototype and Dojo are very well established, mature libraries, and by choosing one of those, you wouldn't be stepping on any well established namespaces either. Oh, wait... Microsoft can't use open source software because it's opposed to it, right? Well, you could have licensed Google's or Yahoo's, then. But wait... they're competitors. It wouldn't do to behave in any manner that isn't simply crushing competitors. The same reason Microsoft couldn't use Java, PostScript or PDF either, I guess. I guess the question I'll try to answer when I get around to evaluating the "new" Atlas is, What does it bring to the Ajax party that wasn't there before? How does it improve the development, delivery, and useability of Ajax-enabled web applications? If you've indeed made Atlas more cross-browser friendly, that would certainly be a good thing. But it still seems to me that it was an unnecessary effort to begin with, given the large number of top-notch Ajax frameworks and toolkits that already exist. At least Adobe's Spry framework is taking a startingly different approach to the whole thing, one that also works seamlessly across browsers and platforms and whose benefits to developers and end-users seem very clear.
# November 9, 2006 9:57 AM

Bertrand Le Roy said:

Jon: it's not just Prototype who's using the $ prefix. It's just about everyone.

Leland: Were we really that late? What about Outlook Web Access, arguably the first major Ajax application? What about inventing XmlHttpRequest in the first place? What about callbacks in ASP.NET?

If we were "opposed to" open source like you claim, how do you explain the the AJAX toolkit is fully open-source (and already includes external contributions)? How do you explain CodePlex as a whole?

Anyway, *none* of the frameworks you mention are nicely integrated with ASP.NET. The Microsoft AJAX Library not only is very well integrated with ASP.NET, it can also be used without it, say with PHP or Java.

And by the way, Microsoft *has* used Java in the past, but Sun didn't see it this way. In the same way, Microsoft wanted to include PDF support into Office, but again Adobe didn't see it this way so now it's a separate (free) download from Microsoft.

So what does Atlas bring to the party? UpdatePanel, xml-script, tight integration with ASP.NET to name a few. Our customers seem to like it.

# November 9, 2006 12:59 PM

Jon said:

For the record, I feel it is a good move for both Microsoft and developers that you are integrating AJAX functionality into ASP.NET. The fact that more than one framework uses the same prefix, is all the more reason to choose something else! I don't think you need a standards body to decide who owns what namespace any more than I think the .NET framework needs a standards body to tell developers what namespaces to use. Just so you know where I am coming from, I too jumped on the $ bandwagon and got burnt. http://www.dotnetnuke.com/Community/BlogsDotNetNuke/tabid/825/EntryID/370/Default.aspx The week after that DNN release I got emails stating that my framework broke existing modules. I soon came to the realization that it was me, not them (and their framework) that was at fault. Unlike, Atlas, I could not go back and simply remove the function, for DNN tries really hard to not break backwards compatibility (I know MS cares about backwards compat as well, lucky you were in beta and could back away). I am stuck now... I had to hack my $() function to detect prototype and do the added functionality... it will really suck if/when they change this functiality, for I will need to branch that function even further. Needless to say, any new alias that I come up with will have a sole prefix (dnn.) That way I only have one entry point to worry about. In my view, if Atlas continues to use $ as a prefix and so does everyone else, why use a prefixed $ in the first place?
# November 9, 2006 1:48 PM

James Alexander said:

Oh snap! You just got served a cold plate of humiliation Leland!
# November 10, 2006 6:11 PM

Bertrand Le Roy said:

Jon: I completely see your point and it's something we've always taken seriously, as the $get rename attests. We've had lots of discussions on this very subject, both internally and with early adopters. There are tradeoffs we have to make between keeping the majority of our users happy and reducing the risks of collisions with other frameworks. As a matter of facts, when we asked, the majority of our users told us that they preferred to keep the $ function even if there was a known collision with just about any other existing framework. We actually went against that feedback and did the rename to $get. Similarly, we went against the convenience of extending the Array prototype and moved everything to Array statics. By the way, the built-in type extensions have a much higher risk of collision than the $ functions, but in the same way, we think that if we (and other frameworks) are going to keep an acceptable level of usability, the only way to avoid stepping on each other's toes in the future is just to talk to each other. OpenAjax is proof that other framework authors feel the same way.

Again, we take these considerations very seriously, so thanks for the feedback.

# November 10, 2006 8:14 PM

Nathar Leichoz said:

> All $ aliases are shortcuts for a properly namespaced > function, as the post explains. According to the ECMA spec, "$" is conventionally reserved for machine generated variables.
# November 12, 2006 8:52 AM

Abhi said:

have few queries on it: 1)To use this utility do I have to write any additional code in my ASP or ASP.NET page? 2)Is this utility shipped with framework 1.0 and above version? 3)Where this utility should be deployed to make it useful in web farm scenario? 4)I have an application which has few ASP, few ASP.NET and few JSP pages. So will this utility work for all of them in case to share session variables? Specifically JSP. Apart from this can you suggest me some links/books which can give more details on this and samples where it is implemented?
# November 13, 2006 8:16 AM

Bertrand Le Roy said:

Abhi:

1. No.

2. No, it's entirely unsupported and experimental.

3. On each server, which should be set up to share the ASP.NET session. The ASP part will pick it up, which is a nice bonus.

4. No luck for JSP. I don't know of a session sharing solution between JSP and ASP/ASP.NET.

# November 13, 2006 8:15 PM

Patrick J. Fox said:

Bertand - Thanks for your informative posts. I tired out he example and came up with a combination of the two patterns shownm above:
Foo.Bar = function() {
		this.stuff = {}
	}
Foo.Bar.prototype = {
	number: 0,
	toString: function() {
  	return "Bar #" + this.number + (this.stuff.id || "");
	}
}
Any reason why someone shouldn't code it this way?
# November 15, 2006 2:17 PM

Bertrand Le Roy said:

Patrick: sure, that's what we're doing in ASP.NET AJAX, see my more recent posts on prototype. In this post, I tried to keep it simple and without dependancy on AJAX.

The problem with your code if you add nothing else is that you broke the prototype's constructor by overwriting the whole prototype with a JSON object. We solve this in the AJAX Library by resetting prototype.constructor to Foo.Bar from the class registration method.

# November 15, 2006 5:20 PM

Hill said:

Not to be stupid but, what is the exact combo for getting the print screen (PrtScn) button to work with the microsoft wireless optical desktop 4000? I have been trying every combination for an hour now and I am getting really frustrated?

I used to use that button constantly back when it was truly just "one button"

# November 15, 2006 7:24 PM

Bertrand Le Roy said:

Don't ask me...

# November 16, 2006 1:51 AM

Chad Smith said:

Sort of a simplistic question after the discussion above; but does the MouseButton enumeration actually work? I'm currently developing an app that when run in Firefox works fine, when run in IE6 the buttons are mixed up, this occurs when I do something in a mouseup event, in a click event of course it returns left all the time (presumably because in IE window.event.button is always 0 in the click event.)

Regards,

Chad.

# November 21, 2006 2:21 PM

Bertrand Le Roy said:

Chad: this is a known problem that is fixed in the RTM version. Thanks for reporting it.

# November 21, 2006 2:35 PM

Ronny said:

Hi Bertrand, Thanks for the code. I was just wondering whether I can change the location of the "YesNo" button. Because they're next to the other and I would like to add more space, so user won't mistakenly click on the wrong button.

Other than that.. It works perfectly.

# November 21, 2006 7:21 PM

Bertrand Le Roy said:

Ronny: feel free to modify the code and add more space. Would you need help with that?

# November 21, 2006 7:25 PM

Ronny said:

One more thing, Bertrand.

Is it possible for the button to check the validation first before confirmation pop up.

I am using ConfirmButton and when the button is clicked, it doesn't check validation control that I have on the page, even after I use CauseValidation = true.

Thanks so much

# November 22, 2006 12:10 AM

Bertrand Le Roy said:

Ronny: good point, you'dprobably need to modify the code a little so that it respects the property.

# November 22, 2006 12:16 AM

Ronny said:

Thanks for your quick response, Bertrand. It amazes me..:) I couldn't figure it out how to add space between the button and also for the validation, I am still trying to understand your code..

# November 22, 2006 12:29 AM

Bertrand Le Roy said:

In RenderChildren, just create a bunch of literal controls that contains "&nbsp;" and add them to the list of controls between the buttons.

The validation thing may be a little trickier, you'd need to change the script that's being registered from Show, depending on the value of the property. You can cheat a little by looking at the code that's being generated by another control that gets it right, like a submit button which causes validation.

# November 22, 2006 1:55 AM

Josh said:

Well... after finally making it to the bottom, I wanted to thank Bertrand for trying to stay as rational as possible here.  I think that ASP.NET provides for a more structured development environment to build more complicated and robust applications (of which I have built many), but this is simply my opinion.  PHP I can't really speak on as I am not a PHP programmer.  

I am in the process of helping a client decide on what platform and development language to use moving forward (currently using PHP and linux) and reading both sides (after weeding through some nonsense) has helped me gain a better understanding of both languages (pros and cons).

In the end your client's requirements really are the primary deciding factor. If the client has a small budget, no preference on OS and webserver and PHP trained personnel are more available and afordable, I would say PHP.  If you were building a multi-tier web application with complex processes, and many database driven components.  Leverage the .Net Framework classes and reduce coding time by as much as 65% ($$$ savings for your client = happy client) and time to market is faster.  It is a win-win situation, and you as the developer are the hero and get a ton of referals and work as a result (actually occurred)!

# November 22, 2006 3:46 AM

Ronny said:

Thanks Bertrand, I've managed to add more space between the buttons. I am still working to get the button cause the validation.

Could you tell me how I can see the code that's being generated by submit button?

# November 22, 2006 7:13 PM

Bertrand Le Roy said:

Add a button to the page, make it cause validation, browse to the page, view source.

# November 22, 2006 7:19 PM

foobar said:

Hmm, RTM version eh?  So you guys are pretty close then :)

# November 22, 2006 8:37 PM

kleolb02 said:

Maybe you have the same problem I had. Response.Redirect doesn't work after a Postback before OnInit. Another possible error could be a Session- Timeout, the solution would be to set the timeout in the web.config- file.

hope this helps..

# November 23, 2006 4:08 PM

Johnnie said:

Great conference!  Would have liked to see it go another day since there were so many great sessions.  Not sure how they could have so many sessions and nothing on security.  Yikes!

# November 27, 2006 8:25 AM

Jb Evain said:

Hey, amazing how David Ebbo on this picture reminds me Benigni.

# November 29, 2006 7:25 PM

ASPCoder said:

I have a strange but a problem similar to one reported here. I have an ASP.NET application in which after loggin in, I set a session variable and then do a response.redirect. So far everything has worked well and I am able to access this variable from all other pages. But recently, the users noticed a problem. In a particular page, after showing a message, we do a <meta http-equiv=refresh content=3;url=someurl.aspx>. Which is refresh the page and redirect to another url. In the someurl.aspx, we check for session variable and some inexplicable reason, it is getting lost and the users are redirected to the login page. Appreciate any ideas.

thanks

# December 1, 2006 12:06 PM

Sandeepan Kundu said:

i am using ATLAS with a timer which updates the grid every 2 to 3 seconds.....  i was facing the same problem ...

i am doing response.redirect and based on a session variable i fill data according to user....

if user's credentials are not avaiable from session i used to redirect to login page... as only on session expiry the information became void....

i am making postback using the ATLAS's timer.

now on session timeout the timer tick event(i.e.) post back i am refreshing the session's timeout which is one way solving my problem.....

if ne1 can get with a better solution... please revert back at sandeepan.kundu@tv18online.com

Thanks

Sandeepan

# December 2, 2006 6:05 AM

Edwin said: said:

LOL! I could never have imagined there would be a web site dedicated to it.

# December 3, 2006 7:35 AM

madhu said:

hi,

  probs with alert msgs , when iam using atlas its not working ....i mean popup boxes are not coming ..with out atlas its working if any wrong ...and also ....tel me

# December 5, 2006 12:56 AM

Jackal said:

This helped clear a few things up I am looking forward to the article on AJAX class events since that is where I am stuck.

# December 5, 2006 3:43 PM

Bertrand Le Roy said:

Do you get any script errors?

# December 5, 2006 4:58 PM

JacquesC said:

Hi,

I have a file upload control in an iFrame and I try to add two event handlers in JS code run from teh parent window for the keyup and propertychange events.

I have noticed from Ajax Beta 2 source that $get supports a document parameter:

var g_UploadIFrame = $get("iframeFileUpload");

var g_FileUploadTextBox = $get("FileUpload", g_UploadIFrame.contentWindow.document);

but then the following fails:

$addHandler(g_FileUploadTextBox, "keyup", doSomething);

$addHandler(g_FileUploadTextBox, "propertychange", doSomething);

Any help would be appreciated.

# December 6, 2006 8:46 AM

Bertrand Le Roy said:

Jacques: sorry, $get takes two parameters. One is the id, the second, optional parameter is the parent element. Passing it an element that is in a different window is an abuse of the API and something that's entirely unsupported. The reason is mainly that $addHandler not only abstracts the browser differences but also helps components dispose of these events, which depends on the window where it happens. How exactly is it failing? Does it just not work or do you get any kind of error message?

I'll make sure this is documented. I think you need to hook up your events yourself and handle dispose yourself, not using $addHandler in this case.

# December 6, 2006 2:11 PM

JacquesC said:

Thx for your response.

Internet Explorer reports the following JS error on the page:

Error: object required

Code: 0

I think this is a serious limitation and I am not sure I understand its justification considering:

1) the following works in IE (addEventListener works too)

g_FileUploadTextBox.attachEvent("onkeyup", updateFileName);

g_FileUploadTextBox.attachEvent("onpropertychange", updateFileName);

2) In the Ajax framework, $addHanlder/$removeHandler maintains an array of events which help the dispose process but I am not sure why this depends on the "window where it happens".

3) I think scripting components in an IFrame is a fairly common Ajax scenario, epecially for file uploads, and you this should have been considered.

# December 6, 2006 4:31 PM

Bertrand Le Roy said:

Jacques: the problem is that it would be very complex to subscribe to the unload event of all windows you attached events in and dispose of them properly. We just couldn't ensure the level of functionality that we can ensure in the same window.

If you're using an iframe, what I recommend is that it has its own copy of the AJAX library and pretty much works in isolation, with just the level of communication you need between JavaScript components (which you can achieve by exchanging delegates between components in different windows. Avoid DOM-based communication like you're trying because that will be a nightmare to clean up and avoid memory leaks. If you are using an iframe, that's usually because you want the iframe to be able to post and navigate independantly, which means that the dispose logic will need to be taken care of. That will be a lot easier with the iframe working as a full page, with its own copy of the framework.

# December 6, 2006 4:41 PM

Ronnie said:

Hi, great control

but I would love to set the text in the code behind

is there a way to do it

something like

ServerAlert.Text = "message here"

this way I don't need to hard code the text in the html side

# December 6, 2006 5:28 PM

wanderer said:

Any support for using the ms:confirmbutton w/ a delete imagebutton within a gridview?

# December 13, 2006 5:06 PM

thowe said:

Hello

I think this album handler is ideal for building photo albums in an intranet, where people have file access to the server via a share. So upload is simple...

Unfortunately the album handler is not working on Windows 2003 server. No such problems on Windows 2000 server.

I get the follwoing error:

Parser Error Message: User control source files must have a .ascx file extension.

and the follwing line is highlighted red:

Line 2:  <%@ Register Src="~/album.ashx" TagPrefix="photo" TagName="album" %>

Do you have a hint how to get the album running on Windows 2003? Or do you know of another product offering the same functionality?

Thank you!

# December 14, 2006 8:20 AM

RichB said:

Alternatively, debug it is using Sysinternals DebugView and lots of Debug.WriteLine() statements...

# December 14, 2006 11:26 AM

Bertrand Le Roy said:

Thowe: I'm running it at home on 2003 so that can't be the problem. Are you sure you have ASP.NET 2.0 installed? Apparently you're using the handler as a user control in a page. Does it work when you hit it directly?

# December 14, 2006 2:18 PM

Ben said:

Got here from Sitefinity 3. Great add-on I am going to give this a try shortly.

# December 18, 2006 2:05 PM

craig said:

I have a site I am building and I need to redirect, transfer, or forward to another site.  I don't want to have the query string parameters visible to the user, so I have a link that goes to a page that loads the session with the parameters and redirects to the other site.  See code below:

           Session["Service"] = DataLayer.getProperGroupName((string)dr["TICKET_GROUP"]);

           Session["Requester"] = dr["NAME"];

           Session["Telephone"] = dr["PHONE"];

           Session["CallReason"] = dr["DESCRIPTION"];

           Session["RequestDate"] = dr["TICKET_CREATE_DATE"];

           Session["ID"] = id;

           Response.Redirect(DataLayer.getSurveyURL());

I am new to .Net, so what are my other options.  This site sends emails to customers with a link to a survey and I have a page with links for a person at my company to do phone surveys using the same link.  I would like to hide my data, to keep the user from trying to muck with it.

# December 19, 2006 8:27 PM

Bertrand Le Roy said:

Craig: yes, that sounds ok. An alternative that avoids session altogether is to use cross-page posting. You can set the postback url of your submit button for example, and the target page can then get an instance of the previous page and access all its state (including textbox values, etc.) using the PreviousPage property (it may be necessary to cast it to the right type to avoid having to do too many FindControls).

# December 19, 2006 8:38 PM

craig said:

It seems to have a problem though.  The other site is not getting the parameters.  Does Redirect only work if it is on the same server?  My final deployment may put both sites on the same server, but I can't guarantee that yet.

Any ideas?

Thanks you so much!

# December 19, 2006 8:44 PM

Bertrand Le Roy said:

Ah, no, it's not the redirect that doesn't work here, it's session. If it's a different server, it's a different session (unless it's a web farm).

# December 19, 2006 8:49 PM

kaitlyn said:

the nerd tests are sweet!i was definetly not a nerd!!!

# December 20, 2006 1:56 PM

resh said:

how to display message boxes from server-side code?

# December 22, 2006 12:12 AM

unknow said:

Moderage:I think you can use window.setTimeout and golbal virable for your poupose.

# December 22, 2006 2:43 AM

Bertrand Le Roy said:

resh: I don't quite understand the question, that's exactly what the blog post is about...

# December 22, 2006 1:37 PM

D-dog said:

what is the best xbox 360 game available???

# December 23, 2006 12:14 AM

Bertrand Le Roy said:

Depends what you like. Gears of War and Oblivion are both marvelous time sinks.

# December 23, 2006 1:15 AM

Robert Erickson said:

omgee, I really had so much trouble when I couldn't see the mouse cursor on screen when it was pointed away. But then I found out that pointing the remote back to the object I wanted to focus on the cursor came back immediately.

It was such as daunting task to find that cursor after that event. I hate nintendo, all their products are non-american garbage. Get that stuff away from me, I'm sticking with my made in China Xbox 360. Go america!

# December 28, 2006 9:35 AM

Bertrand Le Roy said:

Robert: yes, I see your point, it should be easy enough to just point to the object but for some reason, it doesn't quite work naturally. It's hard for me to explain exactly why it feels weird, but it does. Must be years of mouse using that got us used to pointer movement being relative whereas the Wii is absolutely positioned. I guess you get used to it.

As far as the non-american-ness, I don't know about you (I assume you're joking. You are? Right?) but I'm French so I don't care that much... I care more about the Xbox being designed by my employer...

# December 29, 2006 12:39 AM

Tom said:

This is a great software.

But I can only run it on Windows 2000 Server. I've tried two different Windows 2003 servers. With no luck.

Does anybody know how to get this running on Windows 2003 Server?

# December 31, 2006 4:52 AM

Bertrand Le Roy said:

Tom, I'm running it at home on Windows 2003 Server without a problem. What exactly is the problem you're seeing? Are you sure you have ASP.NET 2.0 installed? Is ASP.NET activated in IIS?

# December 31, 2006 3:15 PM

Thomas said:

I personally think that its pointless bickering over "what's better" because the answer is simple: It doesn't matter whats better, it matters what YOUR CLIENT WANTS. If they want asp, you use it. If they want PHP, you use it.

Each scripting languages has advantages and disadvantages.  If you don't like a language - good for you, you're putting yourself out of business.

I go for more open-mindedness - I will use what is needed or requested - you have more opportunity that way.

# December 31, 2006 5:51 PM

Bertrand Le Roy said:

Thomas: Sure, except that you can't master all technologies around. And what if *you* are the client?

# January 1, 2007 4:23 PM

Kelly said:

How about we make this easier for the people that have to do a science paper on this crap!!!

# January 1, 2007 6:33 PM

Bertrand Le Roy said:

Great attitude, Kelly. Good luck with that.

# January 1, 2007 7:04 PM

Lloyd said:

I dropped the files in an image directory, and I'm getting the following error: "The type or namespace name 'com' could not be found" on the com.drew.metadata namespaces.

# January 2, 2007 2:03 AM

Bertrand Le Roy said:

For the moment, you also need to copy the dll to the bin folder. I'm working on a new version that removes that requirement.

# January 2, 2007 2:08 AM

Lloyd said:

Thanks for the quick response.  To clarify, I moved MetaDataExtractor.dll to my site's root bin directory, and that solved the problem.  Looks like a great tool.

# January 2, 2007 2:15 AM

niall said:

Why is this blogs showing in MS Ajax when its about a silly computer game. I am not interested in computer gamnes, just MS Ajax.

# January 2, 2007 4:32 AM

Bertrand Le Roy said:

I find it very flattering (and a little scary) that you're "just interested in MS Ajax", but this blog's title is "Atlas and more", which should give you a good hint that it's likely to talk about more than just Atlas/MS Ajax. Furthermore, it's very easy to filter out the contents you're not interested in: in the left margin, you'll find a "tags" section that will give you the contents filtered by topic.

# January 2, 2007 3:51 PM

Dantheman said:

I have draggable div elements on my page which float over select and input elements. In IE this is very broken, as you described, so instead I've forced these draggable div elements to load in a relatively positioned span (using a bit of Collin Yeadon's code to detect the browser).  

I didn't use iframes because i had difficulties making these position properly with the draggable element.

I've opted to leave the IE version of the site partially crippled (but still functional) until people either chuck IE into the toilet or upgrade to IE7.

# January 2, 2007 10:54 PM

ndnsoldat said:

Go AJAX, the old fashioned way!

# January 4, 2007 7:59 PM

Travis Cable said:

I am having this exact problem with Classic ASP. Any ideas to use something other than Response.Redirect?

# January 5, 2007 3:55 AM

Bertrand Le Roy said:

Classic ASP? Wow.

I suppose you could set the redirection headers and status, which would simulate what Redirect is doing, only without the thread abort.

# January 5, 2007 2:07 PM

Robin Debreuil said:

Man one says you are too American, the next says you aren't close enough to MS Ajax... tough crowd : ).

Just getting into XNA now, very cool. Not sure if the developer matters as much for consoles, but if so  the XBox clearly has a leg up. Not only is is easiest, but everything you learn can be applied to Windows programming as well. Oh, and it helps that you are actually allowed to develop for it!

# January 6, 2007 8:46 PM

kurtsune said:

This works:

page1.cs

protected void Page_Load(object sender, EventArgs e)

{

throw new Exception("hhhhhhhhh");

}

void Application_Error(object sender, EventArgs e)

{

Exception ex = Server.GetLastError();

HttpContext.Current.Session["Error"] = ex.Message;

Server.ClearError();  

Response.Redirect("error.aspx");

}

in error.cs

protected void Page_Load(object sender, EventArgs e)

{

if (Session["Error"] != null)

{

Response.Write(Session["Error"].ToString());

Session.Remove("Error");

}

}

This does not work:

page1.cs

protected btResponseRedirectToNonExistantPage(object sender, EventArgs e)

{

Response.Redirect("NonExistantPage.aspx", False);

}

void Application_Error(object sender, EventArgs e)

{

Exception ex = Server.GetLastError();

HttpContext.Current.Session["Error"] = ex.Message;

Server.ClearError();  

Response.Redirect("error.aspx");

}

in error.cs

protected void Page_Load(object sender, EventArgs e)

{

if (Session["Error"] != null)

{

Response.Write(Session["Error"].ToString());

Session.Remove("Error");

}

}

==> Object reference not set to an instance of an object.

# January 8, 2007 3:05 AM

Tony said:

I have the same problem for Redirect methid. For me i have 2 server that have the same code(just set Session and Redirect after that), then one server(Windows XP Professional) is not lost the Session but another server (Window 2000 Server SP4) is lost the Session. I'm so confuse.

# January 9, 2007 4:25 AM

Bertrand Le Roy said:

Tony: it's hard to tell exactly what's happening in your case. You should contact support.

# January 9, 2007 1:45 PM

Hamish said:

Heh, I just spent an hour or so writing a very pretty div-powered fading tool-tips for some forms I was writing when I came accross this problem. Cheers for the solution - hopefully one day we won't have to hack things together like this.

# January 16, 2007 8:01 PM

Orlin Georgiev said:

I think the right way to do callbacks in a loop is to use a client-side pattern like:

function InvokeServer()

{

//invoke server-side functionality here via

//Page.ClientScript.GetCallBackEventReference

}

function ShowResultFromServer(result, context)

{

if(someCondition)

   InvokeServer(); //again

}

InvokeServer is the function containing the Page.ClientScript.GetCallBackEventReference script. ShowResultFromServer is the function that is invoked on the client to render any results (remember that its name is passed to GetCallBackEventReference along with another function in case of a server-side excetion). When the browser renders the results of the first callback you eventually do a SECOND callback (based on someCondition), thus performing a recursive client-server-client while-loop thingie. This way you guarantee that the next callback in the loop starts exactly after the previous one, no need to set timeouts.

# January 17, 2007 2:22 AM

James Gregson said:

The reason for all the "why not play something else" messages has to be to cover their own ass, so people can't sue for repetitive strain injury, or becoming addicted to their games!

# January 17, 2007 5:06 AM

Bertrand Le Roy said:

Orlin: as I said in a previous comment, the right pattern is not to do that at all. If you know that you're going to have to requiery as soon as you're done, why don't you batch the calls? This looks like a typical case of Ajax abuse that's going to result in catastrophic performance. If you really, really have to do something like this, at least the timeout approach gives an opportunity to introduce a pause in the whole process and relax the pressure on the server and network. But really, try to find another way.

# January 17, 2007 3:00 PM

AM said:

To use PrtScn, press 'F Lock' to turn it off, then hit CTRL-PrtScn, and the picture will have been copied to the clipboard.

(This works on my keyboard anyway)

AM

# January 22, 2007 9:02 AM

Bertrand Le Roy said:

AM: err, thanks. I think you're missing my point here but thanks. <g>

# January 22, 2007 1:37 PM

Paul Mendoza said:

I have a question about AJAX. When using UpdatePanel, does all of the HTML of the page get rendered on the postback on the server when the UpdatePanel is triggered or only the portion that needs to be updated?

# January 23, 2007 8:53 PM

Bertrand Le Roy said:

Yes, that's the point of UpdatePanel.

# January 23, 2007 8:59 PM

Emrah GOZCU said:

Congratulations!!!

You've done a nice work...

# January 24, 2007 2:08 AM

Steve Ringo said:

I think what Paul meant was does it ALL get "rendered" on the server, and only the HTML that has changed get sent to the UpdatePanel. In other words does it do a "full postback"? As far as I know, yes.

# January 24, 2007 2:23 AM

Chucky said:

All I can say is.. Wow.

This looks great. A step toward melting the gap between web and desktop. Great work. Keep it up!

# January 24, 2007 7:37 AM

rajbk said:

Congratulations!!

Raj

# January 24, 2007 9:50 AM

Manuel said:

I've been an ASP developer since the times of Windows NT 4.0 and this is the most exciting breakthroug in the product since that time. Congratulations for  job well done !!

# January 24, 2007 10:41 AM

bernard said:

hi,

i would love to see your demo video-streams... but the quality is so bad that someone can actually not watch them...

thanks b.

# January 24, 2007 10:44 AM

Jason Wilson said:

Question about the new controls in the RTM.  I removed the RC1 and installed the RTM but did not get the new controls (new calender, masked input, etc).  I looked around for a DLL to add the controls manually, but didn't find one that added anything.  What am I missing?

jason

# January 24, 2007 12:16 PM

Jason Wilson said:

nevermind...I didn't realize that the toolkit was updated as well.  I dl'd the new one and re-installed the dll.  Got the new controls and after cleaning up my webconfig's everything is working

# January 24, 2007 12:28 PM

Aron said:

What is the difference between the "penultimate" release

announced <a href="http://weblogs.asp.net/scottgu/archive/2006/12/15/asp-net-ajax-1-0-release-candidate-now-available.aspx">here</a>:

and this release?

# January 24, 2007 12:40 PM

Bertrand Le Roy said:

Steve: yes, the page lifecycle is almost the same as during a postback. Render is being called on all controls but only those in the updated panels get their HTML sent to the client.

Aron: Migration guides that explain the differences and how to adapt to them can be found on the ajax.asp.net site:

http://ajax.asp.net/documentation/default.aspx?tabid=47

# January 24, 2007 2:01 PM

Jared said:

Looks good, but the link to download isn't working.  This is a long shot, but would you want to code in a user management system so only certain users could access certain folders?

# January 24, 2007 6:26 PM

Scott Barnes said:

Very sweetly done folks ;)

Its making my job easier each day ;) hehe.

SB.

Dev Evangelist.

# January 24, 2007 10:23 PM

Bertrand Le Roy said:

Jared: I just tried the link and it's working for me. Maybe the site was down when you tried. I don't think there's a need for a specific user management system: the built-in membership system of ASP.NET should work fine with it.

# January 24, 2007 10:31 PM

Eric Nace said:

Congrats Scott!  I've been following ATLAS closely (nice videos BTW) and made the commitment to use it on one of our largest projects here in AK!  Great product!

Continued success to you and the team!

# January 25, 2007 4:19 AM

Rob said:

Are there any good resource sites yet? Ie, with lots of newbie examples?

I wanna populate some drop downs based on selections, whilst I've tried to use the toolkit, it fails to build properly and generates errors in VS2005, and the CascadingDropDown example whilst it does populate, I am unable to tell what it'll do if you move away from the page and back again - I personally need the values still there and the appropriate ones selected when a user clicks back...

Any URL's to sites with examples would be handy, also - how come there's no newsgroup? I can only access MS groups from work, and I haven't yet found a microsoft.public.aspnet.ajax or equivalent etc?

# January 25, 2007 11:32 AM

Jb Evain said:

"programming is fun, but shipping is our job"

Great work from you and your team Bertrand, and congrats for the choice of the license!

Jb

# January 25, 2007 12:09 PM

bays said:

You shouldn't be proud, the release is buggy.

# January 25, 2007 1:44 PM

Bertrand Le Roy said:

Rob: you should try the forums on http://www.asp.net. There are also some tutorials, including video tutorials, on http://ajax.asp.net.

Bays: thanks for the constructive feedback. You can file bugs at this url:

http://connect.microsoft.com/feedback/default.aspx?SiteID=210

Alternatively, you can send me mail using the contact form of this blog and I'll look at any issue you may have or transmit it to the right person. The www.asp.net forums are also quite helpful.

# January 25, 2007 2:51 PM

Stew Meyers said:

Hello,

Is there an example of how to make a single synchronous call as opposed to the example at the top of the page which describes how to make ALL calls synchronous.  In my case, I need to pass one parameter to a server-side function, and return one back to the client (boolean).

Thanks much.

# January 26, 2007 5:02 PM

Bhaskar Jayakrishnan said:

One of the observations when using Response.Redirect(<url>, false) is that the page sent back to the browser contains 2 complete HTML blocks - 1 of the redirect (~150 bytes), and the other of the original page itself.

Adding:        

protected override void Render(HtmlTextWriter writer)

       {

           if (!Response.IsRequestBeingRedirected)

               base.Render(writer);

       }

to the page's or to the master page's code behind, resolves the issue.

Redirection being one of the very common cases, this appears to be a not-so-elegant way of doing things.

Is there a better solution ?

# January 28, 2007 12:11 AM

mike said:

u need a screwdriver to put on a faceplate?? and how come the companies who sell the faceplates dont give instructions??

# January 28, 2007 2:59 PM

Bertrand Le Roy said:

Stew: it should be fairly easy to only do the XMLHttpRequest substitution around your call and reset the default implementation when you're done. But again, is it worth the trouble, and wouldn't it be easier to just redesign for async?

# January 29, 2007 1:18 PM

Bertrand Le Roy said:

Mike: no, you don't, it's just easier with a screwdriver, it allows you to lever it out gently.

# January 29, 2007 1:20 PM

Bertrand Le Roy said:

Bhaskar: good point. You could also set-up a response filter that swallows all new output.

# January 29, 2007 1:24 PM

Jared said:

Looks like the link was down when I last tried, thanks.  I've been playing around with it a bit (mainly to get it to play with a different source directory, a networked drive) and noticed it has trouble with hidden/corrupted .jpg files (these are being created by Mac users somehow).  Also, is there any way to add in non-jpeg files (gif, tif, png, etc.)?  It seems it is limited to what the MetaDataExtractor can read.

# January 29, 2007 2:32 PM

Bertrand Le Roy said:

Jared: I think you'd have to fix those jpgs before you use them with the handler. Both corrupt jpg and non-jpg file handling are features I don't plan on adding for the moment as I have little time and more important features to implement but feel free to modify the code any way you want and implement those.

# January 29, 2007 2:55 PM

Ali Muhammad said:

Dear freinds,

I have a web application developed in vb.net. I use

Atlas Timer control to update my update panel . This application working fine on internet explorer but not envoking timer in fire fox... any buddy hving clue kindly help me

Regards

Ali.

# January 30, 2007 11:01 PM

Bertrand Le Roy said:

Ali: please contact me through the contact form of this blog.

# January 31, 2007 12:14 AM

Johhny D said:

LOL! I quit reading as soon as the Microsoft goon said "code behind" was good "separation" ... that the code should not be mixed in with the markup.

What a dumbass. XAML sucks, code behind sucks, everything MS invents sucks. I would much rather see the code thats generating my HTML right next to the other HTML - not in some other file.

These stupid idiots from Microsoft don't even realize everything they do is generating HTML and Javascript. All of .net are code generators. Put an <ASP:button on your page - and you get <input type="button spit out of the web server. Uh, thats MORE work the web server is doing, Duh. but guess what? When you use ASP:button you are typing more *** to do the same thing. And if you are going to wind up with w3c html and javascript by the time the page gets rendered, wouldn't you rather just type html and javascript in the first place? Dumb. Pure stupid dumb *** Microsoft crap.

Drag yer little gridviews on your stupid ide and see the CRAP html that comes out. 50 times more html than a php or asp page would have made.

# January 31, 2007 5:14 PM

Bertrand Le Roy said:

Right. I stopped reading as soon as the troll said "LOL".

# January 31, 2007 5:18 PM

Johnny D said:

Here, let me use Microsoft tools, and see if my site runs on apache. No? Hmmm. Now, let me use PHP and see if my site runs on Apache AND IIS - Hmmmm,

What is all this "framework" crap. Learn html, css and javascript or go home. And when you need to hit a database for content, use php because then your stuff can move to mysql, apache, mssql, oracle, websphere, IIS , whatever.

Oh, yes Mr. Microsoft. It Is SOOOOOO much better when software WON'T work anywhere.

stupid. pure stupid Microsoft baloney.  

# January 31, 2007 5:20 PM

Johnny D said:

ATLAS is idiotic too. Invented by Microsoft, of course.

XMLHttpRequest(); and "Microsoft.XMLHTTP" take 4 lines of code to use.

Who wants a freaking framework that takes and generates 100 lines of code for that?

Write your ajax with ATLAS and see if it works on apache. Better yet, try to "Use" Atlas web services from your site on Apache. But guess what? You can hit any web page on any server invented by anyone anywhere if you DON'T use ATLAS.

# January 31, 2007 5:30 PM

Bertrand Le Roy said:

Can you please go away? Atlas *does* run on apache and on PHP.

# January 31, 2007 5:32 PM

JOhnny D said:

Address the point about using a framework that requires 100 lines of code to do what you can do in javascript with 4 lines of code. ok.

# January 31, 2007 5:44 PM

Bertrand Le Roy said:

No, you explain how you can do in 4 lines of code everything that Atlas can do.

Anyway, if you don't like it, just don't use it. Lots like it and use it. Simple as that.

# January 31, 2007 5:49 PM

PohEe,com said:

Good article. Hopefully Microsoft will fix this ASAP. Let's wait together

# January 31, 2007 8:45 PM

João Maia said:

I've been using it in my project since BETA2 till RTM and it it's great...

Almost perfect :) if this didn't mess up with my characters when I'm using

<globalization requestEncoding="iso-8859-1" responseEncoding="iso-8859-1" culture="pt-PT" uiCulture="pt-PT"/> on my web config... but well apart from this, it really kicks ass!

# February 2, 2007 10:04 AM

Alex said:

Hm, applying this workaround confuses me a bit, because somehow, if i begin to add global path to script manager, i need to collect all scripts into one folder, which i do not want to do.

Best way is to have just core framework script modified, it looks like .net2 then wants every single script "pathed" as well... why it does not take the rest from default resources as usual?? I'm puzzled

many thanks if you can help,

Alex

# February 5, 2007 4:09 AM

alex.lee said:

(this is Alex again :)

Have managed to make this error gone for a while. A thing why the rest of script did not want to load was because VWD Express test server wants addresses in ~/path/path format, while IIS consumes /path/path . So this is fixed.

However, same "access denied" reappeared when autocomplete textbox (living inside frame) calls webservice to fill a list.

PS. Site has same as yours structure- parent page has frame with my [other domain] ajax site...

# February 5, 2007 4:41 AM

alex.lee said:

Bertrand, you seem to be my only hope :)

2 my previous posts are rather chaotic, so excuse me.

To summarise, not just your pointed framework script fails in iframe on IE, but Common script for toolbox as well:

[...] when autocomplete tries to place results, it uses this part of code of this script:

getLocation : function(element) {

[...]           <b>if (element.ownerDocument.parentWindow.frameElement)</b> {

[...]   }

===

Bold line already fails and i believe, what follows will fail as well.

So, my prob is how to correct script and where to specify path to consume corrected version? (similar to yours task)...

Many thanks!

# February 5, 2007 6:42 AM

Bertrand Le Roy said:

Alex: the code you posted is the *old, unpatched* code. So you either did not correctly set up your script reference or you didn't patch the file. You can drop me e-mail through the contact form if necessary.

# February 5, 2007 2:23 PM

Chris said:

I am having the same issue as Alex. Your patch corrected the issue with the inital page load, but now I get the same Access Denied message when any AjaxToolkit control is used. The AjaxToolkit has it's own getLocation definition, which eventually calls the Framework's getLocation but, is failing before it gets to the call. The AjaxToolkit getLocation is defined in Common.js.

# February 5, 2007 2:50 PM

Delay said:

Sorry for the trouble, Chris! Please see http://blogs.msdn.com/delay/archive/2007/02/05/safely-avoiding-the-access-denied-dialog-how-to-work-around-the-access-denied-cross-domain-iframe-issue-in-the-ajax-control-toolkit.aspx for details on how to make the corresponding changes to the AJAX Control Toolkit.

# February 5, 2007 7:53 PM

shashi kumar beesu said:

Hi that was a good Work arround which helped me to switch to synchronous call. but i tryed changing false to true i.e. while calling return _xmlHttp.open method i changed the third parameted from false to true, (it is this boolean value which makes the difference between synchronous calls and asynchronous calls) but when i changed it to true and executed then it threw an javascript error at this.responseBody = _xmlHttp.responseBody; saying "The data necessary to complete this operation is not yet available."  can any one help me how to get rid of this error.

And one more thing does this code work on all browsers like IE 6/7 Firefox 1.5/2.0 Mac Firefox, Opera etc?

Regards,

shashi

# February 6, 2007 6:35 AM

Bertrand Le Roy said:

Shashi, I don't get it. Why would you want to set that to true if you want synchronous? If you want async, you don't need this hack, but you need to start doing things asynchronously.

I think this code should work on all browsers although I didn't test everywhere.

# February 6, 2007 1:26 PM

Jacco said:

Although undefined is definitely not the same as null, is sometimes acts like it is.

When comparing undefined and null using the == operator the result will be true! (See the ECMA documentation)

So "if (SomeObject != null) {" will test SomeObject for null, but also for undefined. In this case exactly the intended behaviour.

Jacco

# February 7, 2007 6:48 AM

Mike said:

Nice article, but I could never get approval to implement it this way.  I hope MS can fix this soon.  I was trying to use the AjaxControlToolkit to mask some textboxes in an iframe that was embedded on a Micrsoft CRM form.  For now, I commented out the Extenders until this can be fixed.  Still, keep up the good work.

# February 7, 2007 8:00 PM

max said:

did the drive keep sticking and its easier with no faceplace like mine??

he asks wishfully

# February 9, 2007 4:58 AM

Bertrand Le Roy said:

Jacco: sure, and that's why you should always use === instead of == which is so fuzzy it's really a useless bug factory.

For more fun about undefined, read this:

http://weblogs.asp.net/bleroy/archive/2006/08/02/Define-undefined.aspx

# February 9, 2007 2:04 PM

Bertrand Le Roy said:

Mike: the next version of the toolkit will contain the fix, which may be your best best as I see you're using it.

# February 9, 2007 2:12 PM

Bertrand Le Roy said:

Max: no.

# February 9, 2007 2:13 PM

Alpesh said:

Thanks for the article. It fixed most of our x-domain issues with RTM bits.

However, under special circumstances, I still get access denied errors.

What I have is an iFrame that has a link to a Rss feed. When I click on the feed, I get an access denied error in the addHandler method here (in MicrosoftAjax.js):

if (element.addEventListener) {

       browserHandler = function(e) {

           return handler.call(element, new Sys.UI.DomEvent(e));

       }

       element.addEventListener(eventName, browserHandler, false);

This happens only when the link is trying to open a Rss feed. Any ideas why this would happen?

# February 9, 2007 7:12 PM

Bertrand Le Roy said:

Alpesh: If you're trying to set-up an event for an element that is in a different window/frame, there is a known issue with that. Please contact me to check if that's the same problem you're hitting and how to work around it. You can use the contact form to drop me e-mail.

# February 9, 2007 7:18 PM

Yes, You can redirect.................... said:

Dear All,

if you are using ATLAS you can face the problem of session after redirecting the page. session's value gets null. You can solve this problem by using follow instructions.

1- Just maintain another session like a test session on the form load of the page from where you are redirecting the page.

for example:

---------------------------------------

page_load event()

{

if(!Page.IsPostback)

{

Session["TempSession"]="";

}

---------------------------------------

After doing this you can make use of sessions easily.

but remember on form load only because this is not included in atlas controls.

}

if any doubt you can catch me at 'dear.saxena@orkut.com' or 'saxena-saurabh@hotmail.com'

Thanks & Regards

Saurabh Saxena

# February 12, 2007 4:48 AM

Jason said:

If you're getting the "User control source files must have a .ascx file extension." error and you have framework 2.0 installed, then you probably have the virtual directory configured to use framework 1.1.  On my machine 1.1 is default and I have to set it to 2.0 explicitly in IIS.

# February 12, 2007 3:32 PM

Vincent said:

Bertrand: i downloaded the albumhandler.zip (2.0 and 2.1) and extract the files into the image folder... when i run it, i got the following message:  

Parser Error Message: Type 'AlbumHandler' does not inherit from 'System.Web.UI.UserControl'.

Source Error:

Line 2:  <%@ Register Src="~/album.ashx" TagPrefix="photo" TagName="album" %>

Do you have any idea what causes the problem?

# February 13, 2007 11:32 PM

Thomas Coombs said:

The following error occurs when hitting links, selecting tabs on this page.  Which we determined to be a cross domain scripting issue within an iFrame.

Access is Denied

We applied the fix found above and added the “Systems.Web.Extensions” folder to our solution

Amended the appropriate JS files as per the fix

Added a ScriptPath attribute to the ScriptManager Tag to point to the relevant location

<asp:ScriptManager ID="ajaxManager" runat="server" EnablePartialRendering="true" ScriptPath="~/JavaScript/AjaxExtensions" />

Retested the page and checked the appropriate script links were all pointing to the correct and newly added path.

This tested succussfully.

However, as a result of applying this fix we encountered a new problem.  On loading the display.aspx page, the following Javascript error occurs:

Expected ';'

var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,b=Sys.Application,i=b.get_isCreatingComponents();

Followed by a further error Object expected

var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,

This error is occuring in the MicrosoftAjax.js file we added and modified as described above.

As a further result…  Also on this page we use a <asp:UpdatePanel> which is associated to a <asp:timer> control which handles our Polling facility to check responses we receive on a given interval.  This no longer functions, we assume the two events are linked.    

Can anyone help me?

# February 14, 2007 9:08 AM

Benny/Norway said:

I've got the same problem, but the fix didn't help me. Because I was using frameborder="no" in my iframe.

I got the NaN exception.

The only fix ==> frameborder="0"

# February 14, 2007 9:59 AM

Bertrand Le Roy said:

You probably don't have ASP.NET 2.0 installed, or it's not active on that application.

# February 14, 2007 1:29 PM

Bertrand Le Roy said:

Thomas: I think you didn't apply the patch properly. What you replace in the release version includes the switch, but you must not replace the case Safari.

Benny: frameborder="no" is illegal XHTML. Please use "0". This is actually a different problem (which doesn't cause "access denied") so it's not surprising that the patch would not fix it.

# February 14, 2007 1:35 PM

Thomas Coombs said:

Thanks very  much for your prompt response Bertrand.

I've checked the release version of the file, but the "case Sys.Browser.Safari" does still exist.

Sorry.

# February 15, 2007 3:45 AM

Bertrand Le Roy said:

Thomas, please contact me through the contact form of this blog. I'll look at your file.

# February 15, 2007 1:53 PM

Darren said:

Does anyone have the full file working.  I am getting a Sys is undefined when using the Atlas toolkit

# February 15, 2007 5:40 PM

Carl said:

I am getting 'Type' is undefined on the first line of ScriptResource.axd.  Does this mean I misconfigured something and the js files are not being used?

# February 22, 2007 4:46 PM

Bertrand Le Roy said:

Carl: you probably made a mistake when patching the file, which created a syntax error, or you did not put the MicrosoftAjax.js and MicrosoftAjax.debug.js files at the right place.

The fact that you're seeing scriptresource.axd does not mean that the js file is not being used: if you just replaced the MicrosoftAjax.js reference, all other scripts will still use scriptresource.axd. What you want to check is if MicrosoftAjax(.debug).js is being queried and if the script tag in the html source as seen from the browser has its src attribute set to the right url.

# February 22, 2007 5:23 PM

Carl said:

I placed the entire folder System.Web.Extension in my sight then added a ScriptPath Property to the directory all the way down to the js files.  I also tried using the <asp:ScriptReference > from above.  Both result in the same issue.

I also receive the error prior to trying to path the files and after.

I just downloaded fiddler and I will try to see if I can see the debug file being accessed.

I also cleared all browser cache and cleaned my project.

# February 22, 2007 5:38 PM

Carl said:

Actually, I need more sleep and a spell checker built into the IDE.  Everything is now working all is well.  Fiddler is a great tool and showed me the 404 error when tryin to access MicrosoftAjax.debug.js.  there fore I verified the path in the script manager and realized I had added an 's' to a word.  Thanks for everything!

# February 22, 2007 5:46 PM

Steve said:

All those comments in javascript will bloat the size of the js files won't they?

# March 4, 2007 3:18 PM

Bertrand Le Roy said:

Steve: sure, that's why we include them only in the debug version of the scripts. In release mode, there are no comments, no parameter validation, and the script is crunched (as few spaces as possible, no newlines, local variables are renamed to be shorter).

But in debug mode, the focus is on ease of programming and debugging and we don't watch size that much.

# March 5, 2007 12:27 AM

Herr Ziffer said:

This is an absolutely awesome feature.  Javascript is definitely the poor stepchild of the programming world, which is probably why it has taken this long for anyone to devote the resources to doing Javascript intellisense.

It is also my understanding that there was some debate about whether to include this feature or not, and how much demand there actually was for it.  There's alot!

And while it may devalue the hard-earned skills of the expert javascript writers, somewhat, it is a great boon to the rest of us.

# March 5, 2007 9:05 AM

Darren said:

Has this now been fixed with the 3/2 release?

# March 5, 2007 10:55 AM

EB said:

I was having this problem in ASP.NET and I did two things to fix it (just to be safe):

1) used the second "false" parameter in Response.Redirect

2) since as you explained, the problem is only if the session hasn't been started on a page prior to the one that does the redirect, I set a dummy session variable when the user first arrives at the login page, BEFORE they've submitted the form.

Either one or both of these seems to have done the trick.  Thanks Bertrand!

# March 5, 2007 11:00 AM

Bertrand Le Roy said:

Darren: what we released last week was an Orcas CTP that doesn't contain any Ajax bits, so I suppose not. It will be fixed in the first Orcas release that contains Ajax bits, which should be beta 1 as far as I know.

# March 5, 2007 3:05 PM

Stephen Oesterreicher said:

Is what your doing is making AJAX work even if the browser has JavaScript turned off?  It looks like it is not going as well as you had hoped.  Does that mean that your idea is not going to make it out here in the real world?

# March 7, 2007 2:09 PM

Bertrand Le Roy said:

Stephen: yes, potentially, unobtrusively adding events like described here enable you to build a web page that could work without JavaScript. It requires some care but it absolutely can be done and it is the direction more and more people are taking. But to be perfectly clear, it doesn't "make Ajax work" if JavaScript is off, it makes the page work reasonably if it's off. By definition, Ajax only works with JavaScript on.

I don't understand your question though. What idea are you referring to? What is not going as well as I had hoped?

# March 7, 2007 2:22 PM

Amy said:

Love it! "I was a nerd wannabe" I slightly disagree with that remark!

# March 8, 2007 4:27 AM

SurferGirl said:

I have been reading this blog and have a problem that looks at first like a good fit for multiple synchronous calls.

I need  to multiple web services, modal dialogs with in one function call.

When the user selects a button a message is shown that the current action is processing please wait..

The function is very complex and requires that the  information is gatherd and proccessed in a synchronous workflow.

With in the function I need to be able get information form multiple web methods and modal dialogs (user input).

So, how would I achive this type of functionality when using Ajax ansynchronous Call Backs.

Also, the function is started in the following way result = window.setTimeout("StartProcess(processId)",500);

I'm open for suggestions

# March 8, 2007 2:29 PM

boa sovann said:

i am also having such this problem in my web application and trying to find the solutions. but i really get strange! when try to login with the correct username and password, the session variable always null but if i enter the wrong username or password at the first time and try to enter the correct username and password again, it works correctly. so why it is happend?

# March 12, 2007 11:44 PM

Fedor said:

When can we expect ASP.NET Ajax update with this fix?

# March 13, 2007 5:47 AM

Bertrand Le Roy said:

SurferGirl: setTimeout doesn't return the result of calling your function, it returns a cookie that identifies the asynchronous operation. If your timeout handler needs to return information, it should do so into some globally accessible state variable. Furthermore, you should never pass a string into setTimeout. Use a function reference instead (build a callback if necessary to remember the parameter, using Function.createCallback if you're using ASP.NET Ajax).

There is nothing in your scenario that requires synchronous calls. Only your workflow state needs to be updated after each call. That doesn't mean that you need to freeze the whole browser. Just freeze/disable the UI that affects your workflow during the calls.

# March 13, 2007 1:35 PM

Bertrand Le Roy said:

Boa: if login fails, there is no redirection, so the session cookie gets set correctly. This is expected. Follow the indications in this post and you should be fine.

# March 13, 2007 1:55 PM

Bertrand Le Roy said:

Fedor: see above comment. The next release (Orcas beta) will have the fix.

# March 13, 2007 1:56 PM

Ron said:

Stupid question.  I bought the original version months ago.  How do I get the final version for free?  I went to My Account on the O'Reilly site and it still shows the old version under Electronic Media.  I downloaded again just to check, and sure enough, it's the old version.  I added the new version to my cart to see if a re-purchase would be smart enough to price out at $0.00 but no go.  I can't figure out how to do it.

Thanks

# March 14, 2007 4:39 PM

Bertrand Le Roy said:

Ron: I'm asking O'Reilly. I'll post their answer here.

# March 14, 2007 6:46 PM

Dean Harding said:

Wouldn't just giving your account explicit read/write access to the folder do the same thing? Then you wouldn't need to run explorer as an administrator!

# March 14, 2007 8:27 PM

Bertrand Le Roy said:

Dean: that's a good point, but it doesn't do exactly the same thing.

If you just give permissions, it means that any process that runs under your identity can do whatever it wants on the folder. If you just run the explorer as admin, then only that explorer process has the rights.

In other words, giving permissions basically disables UAC on that folder (permanently), whereas running as admin disables UAC for this process (temporarily).

# March 14, 2007 8:40 PM

Dean Harding said:

Yes, but running explorer as an administrator also means all your explorer extensions and so on are running as administrator.

I guess it just depends on where you think the threats are coming from :-)

# March 14, 2007 9:24 PM

Bertrand Le Roy said:

Yes, you're absolutely right, but giving rights on the folder presents the same risks as far as shell extensions are concerned.

If you have shell extensions that you're unsure about, I guess it's just better to leave UAC on, not give additional permissions and not run as admin...

Ultimately, I see people disabling UAC as a whole and while it would be best to leave it on and bear with the alerts, such tricks can help in that it's better to have it partially on (and know the risks) than have it completely off.

As always, the best protection is skeptical computing.

# March 14, 2007 9:34 PM

Ron Ifferte said:

Try downloading it again. I just re-downloaded the PDF and it's stamped March 13, 2007.

# March 14, 2007 9:47 PM

rbuckton said:

There are times where I wish there was a way to "pre-authorize" certain applications for UAC.  I always run Visual Studio elevated and the prompt seems a bit cumbersome in those cases.  I think you should be able to authorize certain applications as approved without the need to accept a UAC prompt.  You could define the trusted startup parameters for the application (e.g. what are the valid commad line options that can be supplied).  Pre-authorized applications would then just need some type of bubble tip after launch that appears above the icon in the taskbar, or differentiate the window with slightly different window chrome (say a red or orangeish cast to the aero glass style) for applications running elevated.

Beyond that I am a big fan of UAC. Vista makes large-scale operations affecting a protected folder efficient by determining up front everything that will need elevation when beginning a copy, move, delete, etc. operation.  It's the one-by-one changes that become cumbersome.  

One of the more difficult to understand features of UAC is attempting to write a file to a protected location by an application that doesnt understand UAC.  Instead of denying the operation, a special folder structure under your profile folders that matches the protected directory structure is created for those files.  Vista needs a way to track and merge these changes easily after the fact, rather than having to do it manually.

# March 14, 2007 10:03 PM

David Taylor said:

Bertrand, like you I have left UAC enabled for the last few months of running Vista.

However I am not that worried if many technical people turn it off as they know how to fix their machine if it gets trashed.  

What I care about is that my mother, father and other non-technical people leave it on.  We should remember that 95% of people are not very technical, and if that 95% have UAC enabled Vista is a huge win.

# March 14, 2007 10:08 PM

Dean Harding said:

> Yes, you're absolutely right, but giving rights on the folder presents the

> same risks as far as shell extensions are concerned.

Except that they WOULDN'T have those rights on every OTHER folder marked Admin-only (System32, Program Files, etc).

I guess it depends on how "valuable" your InetPub folder is compared to those other folders. Either way, I think there are risks doing it both ways... but that's the nature of security; you've got to take risks in the interest of actually being able to DO stuff :)

# March 14, 2007 11:13 PM

Speednet said:

rbuckton, your comments are right on target!

I have been thinking exactly the same thing.  What malware is going to try and run the VS2005 IDE?

UAC desperately needs fine-tuning controls, which an advanced user can manipulate.  It can be changed to work exactly like a learning firewall, giving the user the ability to remember a rule or ask every time.  Wouldn't that be the best approach?

# March 15, 2007 1:49 AM

TomTom said:

Thanks Bertrand just purchased a copy of it.

# March 15, 2007 3:34 AM

Bertrand Le Roy said:

Dean: you're absolutely right, so for a dev machine, the inetpub folder may be dependable and just giving access may be acceptable but on a production server, well, in this case just leave everything on I suppose.

# March 15, 2007 3:38 AM

Remy said:

Got a copy too, looking forward to read it. Hope it gives you some motivation to write some more great posts.

# March 15, 2007 5:33 AM

John Osborn, O'Reilly Media, Inc. said:

We're looking into the problem and hope to have an answer today. It may be a timing issue (the new version was posted yesterday), so it would be worth trying to download it again.

John Osborn

Senior Editor

O'Reilly Media

# March 15, 2007 7:03 AM

Ron said:

Thanks Betrand.  About one hour after my original post I received an email from O'Reilly stating that the updated document was ready for download.  Sure enough the new version is available now.  It looks like O'Reilly was slightly behind your blog entry but all is good now.

# March 15, 2007 8:30 AM

Kevin Dente said:

Are there any improvements in the Javascript debugger in Orcas that make this sort of thing unnecessary? Or is that just the way it is?

# March 15, 2007 5:04 PM

Bertrand Le Roy said:

Kevin: that's just the way it is. JavaScript functions don't know what they've been assigned to. You could even point several different variables to the same function reference (actually, it happens all the time with prototype functions that are referenced by instances). The debugger has no way of knowing what you consider to be the relevant assignment. All it has is the global name that was given to the function when it was declared, and that's exactly what we're leveraging here.

# March 15, 2007 5:10 PM

Scott said:

Does the ASP.NET Ajax team plan to release the "compression" tool they use to create the release script from the debug script?

# March 15, 2007 5:45 PM

Steven Berkovitz said:

Are you saying that Safari will not run scripts with the function body inline or that it simply won't show the stack?

# March 15, 2007 6:10 PM

Bertrand Le Roy said:

Scott: that's good feedback, we're getting that question a lot. We're thinking about it, but it takes some time. Thanks.

# March 15, 2007 6:12 PM

Bertrand Le Roy said:

Steven: Safari refuses to parse "baz: function Foo$Bar$baz()" if it's inside an object literal declaration like the prototype declaration. IIRC, it's considered a syntax error.

# March 15, 2007 6:15 PM

Curious George said:

Kinda off topic...

Is it not the case that functions prefaces with "_" are by convention private methods? I could be completely off here, but if so, how can we use "Function._validateParams(...);" in our own client class libraries code to validate arguments as they come into our methods?

Thx!!

# March 16, 2007 12:09 PM

Bertrand Le Roy said:

George: yes, it is private/internal, but you wouldn't be the only one to use it. You have to know that being private, there is a small chance that it could change in the future. So, at your own risk...

# March 16, 2007 1:52 PM

Mike Mattix said:

Thanks,

It worked like a charm.  Our problem was running AJAX applications in Page Viewer Web Parts under Sharepoint (WSS V3.0).  In case anyone else is having the same issue.  The PopupControl Extender would not fire and display the Calendar.  It would (of course) stand-along but not in the Page Viewer Web Part.

Thanks again,

Mike Mattix

# March 16, 2007 2:12 PM

kevindente said:

Perhaps this bit of guidance could be added to the AJAX documentation at some point.

# March 16, 2007 3:15 PM

Curious George said:

Thx!

Is there a public function that is available for validating parameters? If not, was it left off b/c the method's signature might change in the future and you guys didn't want to risk a breaking change? It seems that it's a very valuable feature that JavaScript lacks (being argument agnostic) and would compliment the framework nicely.

# March 16, 2007 4:33 PM

Shaun Newman said:

Great News.  I for one am happy that you goy's are all maintaining an open and collaberative attitude.  This is a side of Microsoft I like. Keep up the great work and I look forward to some interesting and innovative vibes in the Ajax world going forward.

# March 21, 2007 4:35 AM

Luis Abreu said:

cool! and keep up the good work.

# March 21, 2007 4:07 PM

Peter said:

I bought the booklet today and on page 17 it's still using the atlas tag instead of asp... no biggie...

# March 21, 2007 6:52 PM

Kris said:

Hi - I have a Safari subscription, but this document does not show up there.

# March 22, 2007 11:09 PM

Tyler said:

Off topic, but my 360 tray won't stop opening. Even after I turn it off. The tray will close, then open, then turn off, leaving the tray open. I recently had my 360 repaired for an internal problem, so I don't know if they might've hit something to cause more problems. Let me know if you have any tips.

# March 23, 2007 12:31 AM

Jai said:

I have had a requirement for this when aspnet process permissions need to be tested one at a time with the user informed of progress (as is quite possible one of them will time out and the user needs to know where it got stuck).

Anyway you can't do using Orlin's method as this is the way I was trying at first. You get stuck in a recursive loop as it seems the clientCallback method specified in GetCallbackEventReference() must return before the WebForm_DoCallback() method can be successfully called again (ie you can't call it from within the clientside event handler the receives the result).

# March 23, 2007 6:35 AM

Bertrand Le Roy said:

Kris: I'm asking my editor. What happens when you follow that link: http://safari.oreilly.com/0596527470 (found from the PDF page)?

# March 23, 2007 7:50 AM

Bertrand Le Roy said:

Tyler: sure, I have a tip... Contact support :)

# March 23, 2007 7:53 AM

Bertrand Le Roy said:

Jai: use setTimeout to queue the next request.

# March 23, 2007 7:56 AM

Morten said:

Hey Bertrand

...you wouldn't happen to have an updated version of this that runs on MS Ajax v1.0 ?

I tried updating the code but I keep into issues (mostly JS related).

# March 23, 2007 12:56 PM

Kori Francis said:

Can you do up a small sample of how this $ method should be used for debug scripts and not for production scripts?

# March 23, 2007 8:07 PM

Stefan Dobrev said:

The features definitely rocks.

Can you reveal more secrets about the "elegant solution" that is implemented.

# March 24, 2007 2:39 AM

Rem said:

Hi Betrand,

Searching for an answer this weird is hard, even with google on our side. I'm not sure if my problem is along the same line, however, this is what's happening:

I store some login information in my session as well. Now for some reason -this behaviour started all of a sudden with a minor update not touching any of the login stuff- if I refresh a lot, and print the session variables, it SOMETIMES takes the data from a different session.

Any ideas where this might come from, or better yet, how to prevent it?

Thanks in advance,

Rem.

# March 26, 2007 11:19 AM

Bertrand Le Roy said:

Morten: I'll try to do that in the following days. I'll post when I'm done.

# March 26, 2007 1:16 PM

Bertrand Le Roy said:

Kori: typically, you'd have the following release code for the above example:

Foo.Bar=function(){Foo.Bar.initializeBase(this);}Foo.Bar.prototype={baz:function(){/*Do something*/}}Foo.Bar.registerClass('Foo.Bar');

In other words, the $ names are compeltely absent from the release scripts. Does this help?

# March 26, 2007 1:24 PM

Bertrand Le Roy said:

Stefan: it's a combination of partial script execution, inferring types from the context and taking hints from doc comments. Does this help?

# March 26, 2007 1:30 PM

Bertrand Le Roy said:

Rem: it's hard to say but I'd bet for a caching issue. If the project is under source control and you know when this started to happen, try to determine which changes are likely to have done that and look in particular for changes in the caching policies of those pages.

# March 26, 2007 1:33 PM

Keith Martin said:

With HTTPS, I've found that on IE6 it seems that error pages generated by the browser are treated as insecure, so anything that causes an error in the src of the iframe will cause the secure/insecure mix alert.

The only thing I've found that works for me is to put a src that points to a valid html page on the server. any of the javascript options, or pointing to a page that does not exist, causes the secure/insecure alert.

# March 27, 2007 2:19 AM

Rem said:

Bertrand (correctly this time): The changes were very small and I can't think of anything that has any correlation to caching or sessions.

I haven't been able to find anybody describing this behaviour in my searches. Personally, I'm starting to think it's beyond the application, but that's something wrong with IIS. Sessionstate is set InProc for this.

If you would happen to know a place where I could find people who have or had this problem, that would be appreciated!

Thanks again,

Rem.

# March 27, 2007 5:15 AM

Bertrand Le Roy said:

Keith: even "j avascript:'<html></html>'"? (remove the space, I added it so the blog engine doesn't remove it)

# March 27, 2007 1:54 PM

Bertrand Le Roy said:

Rem: if it was caused at the same time as a code change, I'd try to rule that out first. Can you revert those changes and see if it still reproes?

If all else fails, I'd advise you to contact support.

# March 27, 2007 1:58 PM

dcstarr said:

how do u take off the faceplate

# March 27, 2007 8:58 PM

dcstarr said:

the screwdriver trick didn't work meanies

# March 27, 2007 9:05 PM

Bertrand Le Roy said:

Well, I don't know what to tell you, it was pretty easy for me. Maybe you should contact support.

# March 27, 2007 9:13 PM

Rem said:

We tried that just now and the old code doesn't show the behaviour, so it must be in the code somewhere. 5 of us have been staring ourselves blind on it with no result.

Wish I could find something that may give a suggestion what causes sessions to swap. Only thing I've found is multiple worker processes, but that's not the case here.

Errors are fine, we can fix those. No errors and weird behaviour, that's a whole different story. Perhaps I should have my wife (who doesn't code) look at it...

# March 28, 2007 4:36 AM

Donna Leathers said:

Is there a way to implement background imagery with this method? Tried BackImage with no success. Ideas? Thanks!

# March 30, 2007 3:33 PM

C. Lung said:

The problem I've found with Safari is that I don't get the updates after a given period - they remove your purchase after a certain time.  I bought this PDF when it first came out but since that time Safari has automatically removed it from my account.  So basically unless I purchase it again I can't get the updated version of it.

# March 30, 2007 5:19 PM

C. Lung said:

Turns out I'm wrong.  You cannot get the update from Safari but if you go into the O'Reilly account part you can get the PDF there still.  It seems like it makes more sense to keep it on the Safari part, but...

# March 30, 2007 5:24 PM

Bertrand Le Roy said:

Well, I can talk to my editor if you want but it would probably be more efficient to contact the O'Reilly customer service directly.

# March 30, 2007 5:26 PM

Bertrand Le Roy said:

Donna: what BackImage are you referring to? If you want different background images for each menu item, I think you're out of luck, sorry.

# March 30, 2007 5:39 PM

Ta said:

The message works great except when I put <UpdatePanel> around it, then it does not work.

Do you know why?

# April 2, 2007 1:18 PM

Bertrand Le Roy said:

Ta: yes, this is a known problem. It currently doesn't work inside UpdatePanel.

# April 2, 2007 2:01 PM

Loraine said:

Thanks for this Bertrand, very useful article - problem sorted:-)

# April 5, 2007 3:22 PM

PeterG said:

Are you still planning to do a post about Class events or can you point me at a good resource?

# April 7, 2007 12:03 PM

Bertrand Le Roy said:

Peter: yes, absolutely. I'll try to get that done next week.

# April 7, 2007 1:51 PM

David said:

Hello Bertrand,

I need to build a custom wizard in code at the page load from database records of what fields to include for wizard number 43 etc. I have done it by having a base page that has a default wizard on it, that I pass to serverside classes to build the steps and fields in the page initialise event. This work fine but reverts to the base wizard as soon as the page posts back when I click "next"(duh). How do I maintain the custom wizard and any entered data through postbacks? The answer may be beyond me, but I haven't got a clue how to go about it.  

Thanks

# April 10, 2007 10:07 PM

Bertrand Le Roy said:

David: It's hard to debug your code without seeing it but apparently you're not recreating the controls in their current state on each postback, or maybe you're recreating the controls but with the wrong ids. There are many things that can go wrong, but I'd start by reading this:

http://weblogs.asp.net/infinitiesloop/archive/2006/08/25/TRULY-Understanding-Dynamic-Controls-_2800_Part-1_2900_.aspx

# April 11, 2007 1:31 AM

Aleksey Fomichenko said:

Great article! This really helps.

What I used to do before reading this post is:

var self = this;

CallWebServiceMethod(function(results) { self.OnComplete(results); });

# April 11, 2007 2:51 AM

Muhammad Mosa said:

Well, I built an AJAX Control, it is a simple Custom ComboBox. if acctually uses javascript extensions provided by ASP.NET AJAX Framwork to show and hide and select items from a simle list control "<select>". this control is working fine with UpdatePanel as it rais post back and also . I tried to use it withing Telerik Ajax Panel, and with Telerik Ajax Manager. I'me not sure if you used them before. With Telerik Ajax Manager displays a Javascript error and with Ajax Panel it is not updating panel content as well as stops to response to javascript events e.g, click on text box to show the list box etc...

Do you have any idea about that!?

# April 11, 2007 11:40 AM

Bertrand Le Roy said:

Muhammad: you'll have to ask Telerik...

# April 11, 2007 11:50 AM

Sean Kinsey said:

This is also usefull when calling webservices with a callback handler. By using a delegate the callback will be executed in the same context as the function calling the webservice, something that is extremely usefull when calling webservices from within custom objects.

# April 11, 2007 12:36 PM

Mike said:

Hey it's really great!!

Is it possible to scan only a certain folder? Because right now it scans everything in my website ehhe

# April 12, 2007 3:38 PM

Bertrand Le Roy said:

Mike: just put the handler in the folder you want to scan.

# April 12, 2007 3:51 PM

dcstarr said:

guitar hero 2 for xbox 360 OWNS

# April 13, 2007 5:32 PM

Neeraj said:

I am not able to use this code please help

# April 16, 2007 1:46 AM

Bertrand Le Roy said:

Neeraj: you're going to have to give more details. First check that the web site you're trying to use it on has ASP.NET 2.0.

# April 16, 2007 12:27 PM

Valentin said:

Hey Bertrand,

I was able to generate the XML file comments out of my ASP.NET Ajax classes using the MS Ajax 1.0.

But now I'm not able to find a tool that can generate a help file out of the xml file. All the tools like NDoc, Sandcastle and XDocument requires the DLL to be present with the xml file (which ofcourse is not possible because the XML is generated out of the JS files).

Do you have any idea how to proceed with this problem.

Thanks in advance!

# April 20, 2007 3:41 AM

adam said:

wow this screw driver trick really works

i now have a new (chrome) face plate thx heaps

# April 23, 2007 8:34 PM

Bertrand Le Roy said:

Valentin: I have a tool ready for SandCastle. I'm fixing the last details with the SandCastle team and will be publishing it very shortly.

# April 23, 2007 8:55 PM

Wallym said:

Awesome, thanks Bertrand.

# April 23, 2007 10:25 PM

Anand Raman said:

# April 24, 2007 12:59 AM

Darren Kopp said:

For those of us who can't find it at all... you most likely have to go to control panel > programs and features then on the left side select "Turn Windows Features On or Off".

Then, when the list loads, click the checkbox that has "Tablet PC Optional Components" and that will install the snip tool.

If you still can't get it, then you don't have home, home premium, business, or ultimate version of vista.

# April 24, 2007 2:31 PM

Philip Colmer said:

I can't get the instructions to snip a menu to work. I press CTRL+PrtSc and the snip window opens but it isn't clear what to do next in order to get the menu to be captured - it has disappeared!

# April 25, 2007 8:34 AM

Emad Ibrahim said:

That's a nice feature and free.  If you want a more powerful screen capturing, use OneNote.  Check out http://emad.blogstogo.com/2007/04/25/blogging-and-screen-clippings/

# April 25, 2007 9:21 AM

dmurillo said:

You can also try this for really nice Aero Glass on your screenshots!

http://www.windowclippings.com/

Kenny has done a nice job

dm

# April 25, 2007 11:21 AM

Leo said:

When I use this fix, I get 'Sys' is undefined & also 'Type' is undefined when I run the app with debug="false". Using debug="true" works with no problem.

I am using the latest Ajax release 1.0.

Any suggestions?

# April 25, 2007 11:45 AM

Bertrand Le Roy said:

Leo: you probably introduced a syntax error when you patched the file. Please double check your patched file. You can also look at all error messages, you probably have a syntax error message before the undefined message. That will give you the line number of the syntax error.

# April 25, 2007 1:06 PM

Fabio Serra said:

Why don't use jsdoc?

(http://jsdoc.sourceforge.net/)

It is more compact and it is used by a lot of Javascript library like Yhaoo UI (http://developer.yahoo.com/yui/) or in the Firefox javascript source code.

Today, the most popular Javascript IDE as JSEclipse and Aptana provide intellisense using jsdoc and the inline comments syntax.

# April 25, 2007 1:20 PM

Bertrand Le Roy said:

Fabio: for several reasons. First, JSDoc comments are not accessible at runtime. Second, they're missing many features that we need. And most of all, xml doc comments exist in .NET since its inception. .NET developers are very much used to them and how they work. There are also many, many tools that already work with xml doc comments (more about this in future posts) and that will work unmodified with this convention.

# April 25, 2007 1:31 PM

Josh Stodola said:

Just break the damn keyboard on your desk like I do.

# April 25, 2007 3:43 PM

Rick Strahl said:

That's better than Ctrl-PrtScn but it's no SnagIt <s>... Particularily what's really missing is the ability to select child windows inside of a larger window...

If you use SnagIt and Live Writer together I wrote a SnagIt screen capture plug in that make the process fully automatic (ie. no dumping to file and then manually importing the image into Writer). http://www.west-wind.com/tools/snagitlivewriterplugin.asp

# April 25, 2007 7:18 PM

Bertrand Le Roy said:

Sure, Rick, absolutely. I knew you were going to say that :)

Feel free to post a link to SnagIt and your Live Writer plug-in.

# April 25, 2007 7:23 PM

David Jourand said:

Congratulations ! Even if I can't see the video on my Linux desktop...

See you soon in Paris ?

# April 26, 2007 2:49 AM

pluginbaby said:

This is so funny for the book !!

Also noticed that you are mentionned in that great article from the MSDN magazine may issue : "Create Advanced Web Applications With Object-Oriented Techniques".

http://msdn.microsoft.com/msdnmag/issues/07/05/JavaScript/default.aspx

# April 26, 2007 10:27 AM

Chris said:

Frenchy Power!

I really like ASP.net Ajax. it really rocks, and is very easy to start with.

# April 26, 2007 4:57 PM

Tim said:

I can't get the menu capturing to work either.  I follow the directions but no option to see the captured menu in  the edit view. Any Help?

# April 27, 2007 1:50 PM

Bertrand Le Roy said:

mmh. Actually no, I can't get it to work either.

# April 27, 2007 1:56 PM

Nathan said:

Did the orcas release fix it?  Have the 'ajax bits' been released yet?

http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx

# April 27, 2007 11:53 PM

Bertrand Le Roy said:

Yes.

# April 28, 2007 12:13 AM

Nis Wilson Nissen said:

Come on :)

Don't insult your own and your readers intelligence by posting stuff like this.

I gather that you were asked to do this to help your company in trash talking a competitor. A very questionable PR strategy that your company successfully deploys.

Lots of animals are killed every minute of support human life. These animals are killed in any number of ways. I am not saying it is OK, but most of us (non-vegetarians) supports an industry, who's not exactly famous for protecting animal rights, every time we shop at the supermarket.

And from the "I don't understand"-department, why do Americans keep electing presidents that destabilize poor parts of the world? Perhaps there more valid issues to report on?

Anyway, keep up the otherwise excellent work!

Cheers,

Nis

# April 29, 2007 6:24 AM

Aaron said:

The comments are the kicker, No one seems to care, or think its a big deal.

# April 29, 2007 11:24 AM

f3arthis00 said:

that was freaking morbid. whoever does it i am sending my jedi knights to do what what he did. remember people isaac newton law ' action - reaction '

jedi knight go and take care of all of them. thats your order jedi's  seacrh and destroy mission. sam tactics then areb 51 the bsatards. use my new waeapon if you want. its called photonic thruster. go guys have fun remember we are immortals andn they are not. LOL because we are sons of gods.

# April 29, 2007 6:48 PM

Daily_Mail_Is_For_Your_Boring_Uncle said:

Fact: 99% of people who would play God of War thought that looked like a cool party. Excellent PR.

# April 29, 2007 7:32 PM

Bertrand Le Roy said:

4th commenter: I guess I'm in the 1% who *would* play God of War II and still think this was sick and undecypherable PR.

f3arthis00: I have no idea what you're talking about :)

Aaron: sure, it's probably not a big deal, but I still don't get it.

Nis: where to begin? First, I'll tell you what's insulting: you insinuating that anybody tells me what to write in my blog. I don't even work in the Xbox division. Plus, I'm not "trash talking" anyone. I've heard quite some trash talking in my life. This is not it. By a very, very large margin.

A few things you should know about me before you make baseless assumptions.

* I'm not currently a vegetarian. I've been one between 0 and 25, but not for ideological reasons. I now eat my meat rare and I know very well what's going on in slaughterhouses but I still wouldn't organize a party in one.

* I'm not even american. It so happens that we would possibly share a lot of idea on American foreign policy. Talk about off-topic. But if I follow your reasoning, should we stop talking about anything else because it's a more important topic?

* I choose the subjects of my blog posts (nobody, at Microsoft or elsewhere, tells me what to write or not to write). Did I say that already?

* There are quite a few things I like about Sony's products and I even think some of their business strategy is pretty smart (which is an opinion you won't find in a lot of places lately) and I've talked about it on this blog before. Their PR? Really don't get any of it: the commercials are *sometimes* kinda cool, but most of the times I just don't see how they are PS3 related.

But, hey, thanks for reading me.

# April 30, 2007 1:55 AM

Electronic Screw said:

Bertrand Le Roy: First, I'll tell you what's insulting: you insinuating that anybody tells me what to write in my blog.

I aint bothered on what or what not you write in your blog. Atleast should have not popped up on the MS Communities bar of ASP.NET

Thanks

# April 30, 2007 3:55 AM

Bertrand Le Roy said:

Electronic screw: I'm not responsible for who chooses to include my RSS feeds into theirs. I've already asked several times to Telligent (who manage the ASP.NET site) that they subscribe to the right feed for the posts that are relevant to ASP.NET, i.e. http://weblogs.asp.net/bleroy/rss.aspx?Tags=ASP.NET&AndTags=1 but apparently they still haven't made the change. I apologize for the inconvenience and will ask (again) that this is fixed.

Thanks for reporting this.

# April 30, 2007 4:21 AM

Jeremy said:

Here's what bothers me...Nobody has pointed out the cutie wearing a painted on bikini top that proudly shows off her goodies.  Animal rights or not, you all missed the bigger picture.

# April 30, 2007 9:28 AM

Bill Ramirez said:

They should've used gringo soldiers killing Iraki children to keep up with the depraved barbaric environment.

# April 30, 2007 10:01 AM

lordabdul said:

Oh my God, the french accent, please, no moooore!!!

Bon, la prochaine fois que je te croise, va falloir que je demande encore un autre autographe alors.

# April 30, 2007 11:05 AM

Ollie said:

I have programmed in PHP and currently program in ASP.NET.  The way I see it is that if you are using SQL Server as your database then ASP is the way to go and if you are using MySQL or Oracle then PHP is a better solution.  I have found that using ASP.NET was designed with SQL Server in mind and often I will run into problems using Oracle with ASP.NET.  ASP has lots of pre-made objects that are quick to implement as long as you want exactly what is on the one example on Microsoft's website. With PHP you are writing all the objects yourself from scratch and can take more time to write, but you are in total control of the outcome.  PHP does not change radically every year so your code has a longer lifecycle.  My pereference is PHP, but it is not up to me so I program in ASP.NET.

# April 30, 2007 5:36 PM

Bertrand Le Roy said:

Well, not really, Oracle should work just fine. There are also providers for MySQL. You can also be in totoal control of the rendering in ASP.NET if that's what you want (the PHP model can more or less be compared to the Render phase of ASP.NET).

I also think that your final statement is unfair as ASP.NET has not changed radically since its inception and has always been backwards compatible (it's even compatible with classic ASP). On the other hand, PHP5 has never been widely adopted because it's considered too big of a change from PHP4, leading its creators to continue to evolve both versions, and even worse, component and application vendors to maintain versions for both engines.

# April 30, 2007 6:18 PM

Daniel said:

I can get the album to work great if I put it in the root of my site, but if I put it in one directory then it loads all the links, but no thumbnails....

Any ideas?

Thanks in advance!

# May 2, 2007 5:37 PM

Bertrand Le Roy said:

Daniel, please file a bug on GotDotNet.

# May 3, 2007 1:32 AM

Pynner said:

Interesting ideas here. I always thought the "Machine World" and the "Real World" were two different places. I imagined the Matrix as a section of a huge network that was partitioned off to seperate the humans from the programs. The train station is the only link accross the partition. As for the "real world" I always thought was just that. The fact that Neo could control objects with his mind and see while he was blind I thought was the writers trying to open the audience's minds into metaphysical philosophies. And to alos point out that in a story where computer programs are Gods, even God can't know everything. Or perhaps God himself is watching over the whole war and is helping Neo resolve everything for the fate of Earth.

# May 4, 2007 1:07 PM

Bertrand Le Roy said:

Pynner: I don't know about that, I guess the authors are the only ones who really know what they had in mind, but I don't remember seeing any references to God. But the HD-DVDs are out at the end of the month. Perfect excuse to re-watch the trilogy.

# May 4, 2007 2:01 PM

Rick Strahl said:

Man tough crowd <s>...

# May 4, 2007 6:35 PM

Jeffrey Becker said:

may I suggest a paramSet / overload tag for methods?  I've often written functions (especially constructors) in js which do /very/ different things depending on not only the number but type and order of parameters which are passed into a function.  In these cases it's even MORE important to have good documentation because they're often implemented by looking at the arguments array rather than arguments declared in the function definition.  A Fabio Serra mentioned jsdoc, which I dont feel really gets the job done mostly because I cant readily declare how I've overloaded my functions.

# May 7, 2007 9:06 PM

Bertrand Le Roy said:

Jeffrey: that's an interesting suggestion that I'll relay over to the Visual Studio team for a future version. It's not a pattern we're pushing because just looking at the parameters collection is an expensive operation. We prefer to encourage optional parameters because they perform better and are a lot easier to implement. But I can see why people do overloads in JavaScript and I'll definitely relay the suggestion.

# May 7, 2007 9:17 PM

Henry Cordes said:

This only works for <compilation debug="true" /> in web.config.

If I try debug="false" I get the following error:

'Sys' is undefined, 'Type' is undefined.

Can you give me any help?

# May 9, 2007 2:24 AM

Bertrand Le Roy said:

Henry: that indicates a syntax error probably happened before. You probably made a mistake when you patched the release version of the file.

# May 9, 2007 12:54 PM

Sebastian said:

I can't seem to avoid this behaviour by using:

protected void btn_Submit_Click(object sender, EventArgs e)

   {

       Session["Branchevereniging"]    = ddl_Branche.Text;

       //SNIP

       Response.Redirect("Offerte.aspx", false);

   }

I'm fairly new to (asp).NET so that might have something to do with it, anyway I could solve this?

# May 10, 2007 11:17 AM

dom said:

How do u take current faceplates off....and put new ones on???????

# May 10, 2007 12:31 PM

Bertrand Le Roy said:

Dom: please read through the previous comments, your answer is there.

# May 10, 2007 1:48 PM

Bertrand Le Roy said:

Sebastian: I wasn't able to reproduce a problem with that code. Feel free to send me your repro.

# May 10, 2007 7:06 PM

Speednet said:

In VB.NET and C# I commonly use the <remarks /> comment tag to document some other development notes about the method/property that do not fit into the <summary /> or other tags, and which I would consider to be "sub-comments".

So, I have two requests:

1. Can you please formally add support for the <remarks /> comment tag in JS?

2. I wish there was a small "more" link at the bottom of intellisense prompts, which would give the developer real-time access to the <remarks /> info.

Thanks,

Todd

# May 11, 2007 11:00 AM

Bertrand Le Roy said:

Speednet: not for the moment but I'll keep that in mind. If you include those tags today, the worst that can happen is that they will get ignored by the tools. Thanks for the suggestion.

# May 11, 2007 2:35 PM

Daniel Booth said:

Daniel, I had the same trouble getting the album to work on a directory other than root as well, but I was able to figure out what was causing the problem. Though it has been a few weeks I believe you can solve it by specifying the HandlerUrl on the control. I am pretty sure that is what I found. I don't know that it is really a bug, but it should be noted in the instructions at least. The best structure I've found is to have a Subfolder as the root of your photoalbum. Put the ashx & the display page (aspx) in this folder, and create subfolders under that for each of your "albums".
# May 16, 2007 2:13 PM

Daniel Booth said:

I love this album control. It allows me to just let my wife drop pictures out on our site, without having to change any code (good for me). My goals, as I find time, are 3 fold. 1: figure out how to change the styles to suite my site. 2: Keep the thumbnail creation and thumbnail views, but change the preview behavior to use Lightbox 2 (link below if you are interested). 3: Add comments to the pictures IF they exist. thinking of using the windows comments if I can figure out how, otherwise I may use an XML file with key pairs. Basically, just a simple way for my wife to put up comments for pictures she drops on the server. http://www.huddletogether.com/projects/lightbox2/ Anyone who has already done any of these three things please let me know. danieljb@hotmail.(dontspamme).com
# May 16, 2007 2:23 PM

Atlas and more said:

When building Ajax applications, you basically deal with two kinds of events. First, there are DOM events

# May 16, 2007 8:20 PM

Atlas and more said:

... for anything else than aiming and frantically moving up and down. In other words, slow movements

# May 17, 2007 3:00 AM

megaxl said:

well you know that when you have a problem, have solutions too, is only time to fix accuracy or detections problems, give some time to the wii, only have 6 months, many titles out in the launch, and tiger woods are the first in the wii.
# May 17, 2007 7:31 AM

Ron said:

Bertrand, How is the event subscription model implemented internally? Is it done using closures? Thanks.
# May 17, 2007 9:59 AM

Ryan Williams said:

I didn't realize that you can use a pageLoad() and pageUnload() handler that is automatically called by the framework. Neat.
# May 17, 2007 8:33 PM

Bertrand Le Roy said:

Ron: not sure what you mean. Can you be more specific?

# May 18, 2007 12:45 AM

Pete said:

Where to get this now as i cant find it on the got dot net site ?
# May 18, 2007 11:20 AM

Bertrand Le Roy said:

On GotDotNet, but the project has been obsoleted now that ASP.NET Futures have a similar, but much more complete feature.

# May 18, 2007 2:08 PM

Collin Yeadon said:

Kevin R Hurst:  You've probably solved your problem between June '06 and May '07 but since I stumbled upon this page just now...

The script is very simple, the only way it wouldn't work is if you give it the wrong coordinates.  If you use javascript to grab the values from a menu for instance make sure that you are getting the absolute top and left and not just the coordinates within whatever parent container it's in.  It really does nothing but toggle so you can have it in the hide and show script of the menu and it would work fine..  Again, that is just an ugly solution as a last resort and of course it can be improved upon in many ways but why bother?  IE6 will be gone within the next couple years..

# May 21, 2007 7:33 PM

DEEPAK GUPTA said:

NICE ONE ITS HELPS ME AND MY PROBLEM IS RESOLVED BUT AFTER INCLUDING JS FILE, I START GETTING AN ERROR -- 'SYS IS UNDEFINED'
# May 22, 2007 5:58 AM

Bertrand Le Roy said:

Deepak: no need to shout. That indicates a syntax error. You probably made a mistake when you patched the file.

# May 22, 2007 1:50 PM

ScottGu's Blog said:

One of the things I'm going to try and start doing is to do a weekly post of useful links on .NET related

# May 22, 2007 2:20 PM

BusinessRx Reading List said:

One of the things I'm going to try and start doing is a weekly blog post of useful/interesting links

# May 22, 2007 2:51 PM

ASP.NET said:

One of the things I'm going to try and start doing is a weekly blog post of useful/interesting links

# May 22, 2007 3:04 PM

Jesse said:

This is great stuff! Keep it coming! I was wondering if I could use this with an end handler to change the size of divs on a page after the event fired. I am having some issues in firefox with sizing divs with all this dynamic changing going on. If you have an example of this I would really appreciate it! I have been trying to get it to work but with no success thus far
# May 22, 2007 6:03 PM

Atlas and more said:

In part 1 , I showed how to subscribe to events exposed by JavaScript classes built on Microsoft Ajax

# May 22, 2007 9:11 PM

May 22nd Links: ASP.NET, Visual Studio, Silverlight, WPF and .NET « Gurusoft said:

Pingback from  May 22nd Links: ASP.NET, Visual Studio, Silverlight, WPF and .NET  &laquo; Gurusoft

# May 22, 2007 10:01 PM

Links 22 de Mayo: ASP.NET, Visual Studio, Silverlight, WPF y .NET « Thinking in .NET said:

Pingback from  Links 22 de Mayo: ASP.NET, Visual Studio, Silverlight, WPF y .NET &laquo; Thinking in .NET

# May 23, 2007 5:29 AM

Josh said:

I think the Wii is a piece of garbage.
# May 23, 2007 5:07 PM

dcstarr said:

Where i live its really hot (80-90 degrees) and my xbox has been overheating every time i play it (2 side lights on xbox flash). What shud i do; i already tried moving it and putting a fan next to it. WHAT SHUD I DO? HELP!!!!!!! ps: I live in CALIFORINA where its blazing hot.
# May 23, 2007 11:27 PM

Vincent said:

Hey, this is a great control! I have a question though: I have a subdirectory 'photos', it contains the ashx and aspx files as well as the directories containing the photos I'd like to display on my site. On my localhost everything works perfectly, but after I uploaded everything to my webspace (after compiling of course) I can see only the links, no thumbnails or pictures (only those little red crosses). When I try to visit a permanent link to one of the albums I get a Server Error ("invalid path - not in the handler scope"). Any ideas on how to fix this? Thanks in advance!
# May 24, 2007 10:03 AM

Vincent said:

Found the solution: the disk caching was the problem (I didn't have writing rights).
# May 24, 2007 10:40 AM

Bertrand Le Roy said:

dcstarr: call support (1-800-4MY-XBOX) or go to www.xbox.com/.../support

# May 24, 2007 1:31 PM

GoonDocks said:

I have over 10 years of web programming experience and have built nearly 100 web sites on multiple platforms. I started with shell CGI scripts, then went to Perl, then to ASP, then to PHP, then back to Perl, then to Java, and now to C#/ASP.NET. I learned "the hard way" and I'm glad I did. I handled my own HTML, form validation, user state saving, template systems, code separation, etc, etc. I also had to manage some of these projects as they grew from something small to something really big. I have also inherited many projects. ASP.NET was hard for me to learn because I was used to doing everything manually. Concepts like events, application life cycles, or server-side form objects were foreign to me. However, I now have 3 years of solid ASP.NET experience under my belt and have launched and maintained some huge projects. Once upon a time I loved PHP. I honestly cannot imagine going back though. It looks terribly hacky by comparison. I cannot imagine anyone using PHP for a "new" large scale web application. Period. For small web sites or for learning the ropes PHP has something to offer. PHP is great for writing little "web scripts". When you are ready to develop web applications however, there are better solutions, methods and concepts available. I truly enjoyed the article and also appreciate the debate on the subject.
# May 24, 2007 3:54 PM

Rexiology@MSDN said:

As I mentioned in my post couple days ago that I am doing some web application performance evaluation

# May 25, 2007 7:55 AM

Rexiology::Work said:

crosspost from http://blogs.msdn.com/rextang As I mentioned in my post couple days ago that I am doing

# May 25, 2007 7:57 AM

Dodger_ said:

Actually, the Wiimote's accelerometers are *extremely* sensitive. Just because you have played two third-party, rushed-to-market golf games does not mean it is the controller's or even the console's fault. The publishers wanted to get their games out for the console to sell more copies, the Wiimote is an entirely new device and requires new skill sets to develop for. Wait for the developer's understanding to mature, pick up Tiger Woods 2009 and it will be a completely different experience.
# May 29, 2007 10:41 AM

Martin Smith said:

1 legitimate use I believe would be for custom validator client functions.

I've just written one that checks if an email address for a new user is already in use and disallows form submission if it is.

The problem I had is that args.IsValid needs to be set in the validator js function meaning that it needed to be synchronous.

# May 29, 2007 12:14 PM

Bertrand Le Roy said:

Martin: how does that make it legitimate to block the whole browser UI? Just disable the relevant part of the UI during the callback, make isvalid false, and when the callback returns, re-enable the UI, then set isvalid to true if that's what the callback returned, and call ValidatorUpdateIsValid.

# May 29, 2007 2:39 PM

Martin Smith said:

But that doesn't work as they will never be able to submit the form!

The onsubmit will call the validator function and if args.IsValid is set to false it won't hang around waiting for the asynch function to complete it will cancel form submission.

# May 30, 2007 5:26 AM

Bertrand Le Roy said:

Martin: I'll try to put something together and make a blog post with it. Thanks.

# May 30, 2007 1:00 PM

Marc Mezzacca said:

Thanks for this patch Bertrand. Is Microsoft going to include this in future releases (hopefully???). A couple notes that were confusing to me: 1) Some people getting the 'Sys' error may point pointing the entire script manager to the directory. They shouldn't... The exact code should look similiar to: 2) For ASP.NET AJAS Toolkit users, they must use this patch and the one for the ASP.NET AJAX Toolkit
# May 30, 2007 3:42 PM

Bertrand Le Roy said:

Marc: the fix is already in the Orcas Beta and will ship with all future versions.

# May 30, 2007 3:55 PM

tongdoudpj said:

One of the things I'm going to try and start doing is a weekly blog post of useful/interesting links on .NET related topics that I've found on the web.

# May 30, 2007 9:59 PM

Yendi said:

Bertrand, First of all, thank you for this article. I'm getting also Sys and Type undefined. I've rechecked my patch and it's fine. I've already patched the AJAX Toolkit also. Could you please look at: www.nortia.com.mx and tell me if you see the error. Any help would be appreciated. THANKS!!
# May 31, 2007 12:44 PM

Yendi said:

Oh, something I forgot.. My locale is ES-MX. Perhaps this is where I'm missing something??

# May 31, 2007 12:48 PM

Bertrand Le Roy said:

Yendi: there doesn't seem to be a site there. Can you check the spelling of the url?

# May 31, 2007 12:52 PM

Jeremy said:

I am so with you on this. My iPaq 1930h is not supported even within Windows XP with Media Player 11. We need to find a registry entry for this. Sheesh.
# May 31, 2007 1:07 PM

Yendi said:

# May 31, 2007 1:08 PM

Neil said:

thanks for the post - menu's now look great
# May 31, 2007 6:26 PM

Gann said:

Can you please tell me, i have put this changes in two files in my solution explorer at script manager i have to point this reference to the new file path, how can i give that, it is in my local, but iam deploying at the remote system.
# May 31, 2007 8:33 PM

Atanu said:

Bertrand, thanks for this patch. However you are not clear at one point in the posting above - which is why you are seeing folks leaving comments about getting these errors with debug="false": 'Sys' is undefined, 'Type' is undefined Bertrand writes: Look for "switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:" and replace everything between that and "case Sys.Browser.Safari:" with the following: ... followed by code Unfortunately in that code he repeats this: switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer: whereas what he probably meant to say was: Look for "switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer:" and replace THAT AND EVERYTHING UPTO "case Sys.Browser.Safari:" In case it isn't obvious, you need to ensure that switch(Sys.Browser.agent){case Sys.Browser.InternetExplorer: is not repeated again - which is what will happen if you follow his directions to the letter. In that case, you will get these errors with debug="false": 'Sys' is undefined, 'Type' is undefined
# May 31, 2007 10:30 PM

Kevin Daly said:

I have the same problem with my Harrier - as far as I'm concerned this is frankly incompetent software design, since WMP11 should either fail silently and pretend the device isn't there, or the prompt should be something that can be disabled as a configuration option. It is *common* not to be able to upgrade the version of Media Player on devices, so having this permanent nag is just stupid and pointlessly annoying.
# June 1, 2007 5:03 AM

hnr said:

I left a comment here a few weeks ago, but it hasn't been activated yet, so I'll submit it again: I've a div with a semitransparent background, which has the width and the height of the browser window, so it's shown all over the website. Well, there are also a few select boxes. Without the iframe they show through the div, of course. Now I've put a transparent iframe with the properties you recommended in your posting (alpha filter etc.) over the whole site. However, the select boxes don't show through the div any more - that's pretty good. But they aren't visible any more, more precisely: I can't see them among the semitransparent div. Hope you've got any advice, thanks
# June 1, 2007 12:10 PM

Bertrand Le Roy said:

hnr: I'm afraid this is the best you'll get. On the bright side, IE7 is here now and it's just a matter of time that this bug becomes just one of the great memories we'll keep from IE6...

# June 1, 2007 12:33 PM

Bertrand Le Roy said:

Yendi: thanks for the feedback, there's indeed a problem if you enable localization. See the updated known issues at the end of the post for a workaround.

Gann: I'm sorry, but could you please rephrase your question? I'm not sure I'm following you. Did you deploy the script files on the remote system?

Atanu: thanks for the detective work, I should have seen that one. I updated the post.

# June 1, 2007 12:53 PM

Faisal said:

Hi Bertrand, I have observed a piculiar thing. I did everything you said like copying the System.Web.Extensions folder found into my js folder and then pointing ScriptPath to that folder as inside the .aspx page EXCEPT doing the patch. And I found the error "access is denied" is gone without using the patch! However, there appeared two new erros as Line: 116, Error: 'Sys' is undefined and Line: 211, Error: 'Sys' is undefined Fact is if I implement the patch as you said, the situation remains same. Please help.
# June 4, 2007 3:36 AM

David Miranda said:

Hello, I have sometrouble patching the files. i added the external script files downloaded here in the same foldder of my project, i point ScriptPath of the ScriptManager to "~/scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js", i patched the files as you explained and i get 2 errors of sys is undefined. I restore the original files downloaded and i get the same error. In my config the debug is set to false. Any ideas?
# June 4, 2007 11:23 AM

David Miranda said:

never mind i've found my error, thanks it works great.
# June 4, 2007 12:23 PM

Bertrand Le Roy said:

Faisal, you're not getting the access denied error because it fails before it even reaches it. The error you're getting is probably caused by a syntax error introduced by your incorrectly patching the file. Please double-check.

# June 4, 2007 1:30 PM

Joel Rumerman said:

Hey Bertrand, Hope all is well. I've used this technique before for web services as Sean mentioned above and for attaching events to external objects (i.e. the page request manager). Thx for confirming that this was the correct way to maintain context with the current object. What else can this technique do for us (the advanced topics you hinted at)? I'd love a follow up post on this topic. Thx, Joel
# June 4, 2007 5:22 PM

Josh Stodola said:

I freaking hate Vista. What a disaster. Do you know how hard it is to buy a new PC without Vista (aside from building the entire machine yourslef)?!
# June 5, 2007 12:52 PM

Bertrand Le Roy said:

Josh: well, I absolutely love Vista and would never go back to XP, which is why this is so annoying to me. And I don't see it as that different from XP (if you ask me it's a little too evolutionary to my taste and not revolutionary enough), so I have difficulty seeing what would justify "hate" that wouldn't equally apply to XP.

# June 5, 2007 1:48 PM

SK said:

Hi David, " Hello, I have sometrouble patching the files. i added the external script files downloaded here in the same foldder of my project, i point ScriptPath of the ScriptManager to "~/scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js", i patched the files as you explained and i get 2 errors of sys is undefined. I restore the original files downloaded and i get the same error. In my config the debug is set to false. Any ideas? " i am alos getting same errors. Could you let me know where to fix? Thanks.
# June 5, 2007 2:23 PM

Bertrand Le Roy said:

SK: double-check that you properly patched the files, look at the source code of the page from the browser, check the url of the script tag points to the place where the script files are located.

# June 5, 2007 2:46 PM

SK said:

I made it work by copying all ajaxtoolkit control js files to the same path of script files and renaming them "AjaxControlToolkit.Common.xxxx". This is not elegant but it worked.
# June 5, 2007 3:24 PM

InfinitiesLoop said:

"Google broke teh Interwebs!!!" Best quote evar
# June 6, 2007 5:19 AM

Nic said:

I'm not awesome enough to convert this to VB. Is there potential for that?
# June 6, 2007 4:39 PM

timmEH said:

Does anyone know how to achieve a similar result, without absolute positioning? I've got exactly the same problem, but using flow-layout. Suggestions? Cheers, tIMaJEHRHghml
# June 7, 2007 2:17 AM

sudhir said:

hello Mr. Bertrand Le Roy I had faced the problem, in which the menu-bar-list(writen in java script) items, were displayed behind the dropdownlist(asp.net). I had used iframe as an list element which solved my UI problem. thaks, your idea is realy amazing
# June 7, 2007 3:58 AM

Amit Solanki said:

I tried with iframe and div. But both dynamjcally by putting innerHtml. But in my case div object is hidden by iframe even if I set z-index of div more than iframe. I use IE 6. Is there any other solution?
# June 7, 2007 10:48 AM

Mike said:

I get on the web to search out ASP versus PHP. I am a small business owner and need to ensure a new contracted developer is not going to sail me down a golden fleece job highway to hell. I developed my own site using FrontPage as a handy tool. I knew nothing about development save my experiences as a browser. I don't like flash, I hate being told to upload crap to view a website, and I know many of my clients can't do so, because some guy in IT limits their ability to download any programs. - Sorry, I ranted a bit... I started with a 20 page site - no school, no training, just a XP with FrontPage and a desire to update a dinosaur launch years ago by a sloppy but expensive and slow developer. I then spun out a new division website with 40 pages, better graphics, more java script and more savvy. Now I'm redeveloping the original site and expanding to over 250 pages of content, I work almost exclusively in HTML Code and use free Java Scripts to emulate Flash crap, and have learned optimal optimization tricks by paying my dues, paying attention to those more learned, and in my free time I run a 8M Industrial Manufacturing Corporation. Now, I'm sick of the bugs in FrontPage forms. I can't keep them on-line (they just go south now and then for no reason) (save MS profit margins and apathy?) and as a business owner I need results, not problems. So a seemingly qualified developer I've screened says "lets move your forms over to ASP (yes, I'm hoping from what I've read so far, he means ASP.NET). But then, my ISP guy says "oh no, you'd be better off to use PHP". So here I am, trying to find out the key differences between the two. The advantages and disadvantages, nothing more or less. "Just the facts madam" as the guy on Dragnet used to say. But what can I say, all I get is a bunch of politically motivated, selfish and trivial crap, very little serious knowledge, and while it's 10:53 PM, I've got to be up at 5:00 AM to run my business. No wonder I don't usually take bogs seriously. They are full of comments from lonely desperate people with no real life, sense of duty or purpose, who just like to rant on and on and on and on, like the bunny on TV. Frustrated…
# June 8, 2007 12:16 AM

Bertrand Le Roy said:

TimmEH: it's the iFrame that must be absolutely positioned to be at the same place as the div, but there's no constraint on the positioning of the div itself.

Amit: creating the elements dynamically doesn't make a difference. That's what we're doing in several of our controls. There must be something else that's different from the code presented here.

# June 8, 2007 12:29 AM

Bertrand Le Roy said:

Mike: I understand your frustration. Here's what I would advise. If you're not the one who's going to develop and maintain the scripts, try to choose people over technology. Find people you trust and let them use whatever they prefer. On the other hand if you're the one doing the work, you should make your own opinion by installing the technologies you're considering and try them out on simple things. The quality of the documentation and support should be one of your top criteria.

# June 8, 2007 12:37 AM

Calios said:

Nice work :) One quick suggestion: You didnt make use of the -Orientation- EXIF info in order to rotate images automatically if needed. Most of the newer cameras have a sensor to check if the cam is held horizontally or not.
# June 8, 2007 8:26 PM

Bertrand Le Roy said:

Calios: thanks for the suggestion, that's a really good point.

# June 8, 2007 9:31 PM

Calios said:

Found a little bug/annoyance - im posting it here since gotdotnet will phase out in a few days(19th of June 2k7). in CreateFolderImage you didnt fill in the BackGround - thus using any other background than black will look wierd :-O I added this to fix it: g.FillRectangle(new SolidBrush(BackGround), 0, 0, size, size); Right after the stacked Graphcis has been declared (was line 477 of the .ashx file for me - v 2.1 of the handler) :-)
# June 8, 2007 9:33 PM

Bertrand Le Roy said:

Calios: thanks for the fix.

# June 8, 2007 9:41 PM

Judge said:

How about using this in Windows Home Server? Possible? How To? etc. Pretty Please? LOL Thanks.
# June 9, 2007 4:14 PM

Bertrand Le Roy said:

Judge: I've thought the exact same thing ever since I learned about Home Server. Unfortunately, I don't own one so I can't try it. However, from what I know I don't see what could prevent it from working. If anyone wants to try, I'd love to know how it goes...

# June 10, 2007 2:48 AM

TheOfficeMaven said:

Thanks to Andrew Grant (and of course Bertrand Le Roy and Dimitry Robsman as well) this actually works great with the Windows Home Server (WHS). Andrew has written a stellar add-in for WHS that allows you to easily make this album handler work with WHS. Here's a how-to write-up that Andrew did for us all: http://www.andrewgrant.org/2007/06/09/how-to-create-a-windows-home-server-photo-album-in-minutes.html And here's the link to his WHS add-in that makes it all possible: http://www.andrewgrant.org/whiist/ -- MIKE
# June 10, 2007 1:00 PM

Cyril DURAND said:

Hi João, the bug you speak about is also reported here : http://forums.asp.net/p/1020399/1747778.aspx#1747778 And I done a dirty fix here : http://blogs.codes-sources.com/cyril/archive/2007/06/10/bug-updatepanel-et-encoding-iso-non-utf-8.aspx
# June 10, 2007 4:45 PM

Atlas and more said:

I was super-excited to learn that Andrew Grant was able to run the Photo Handler unmodified on Windows

# June 11, 2007 2:08 AM

Bertrand Le Roy said:

Thanks Mike! This rocks!

# June 11, 2007 2:19 AM

drashty said:

i do have problem of loosing session but its not after or before redirecting.What i am doing is set sessions when any user logs in and after that in change password page i ask for username password,new password and confirm password and i have put client side validation of required field all fields and compare validator for new and confirm password after submitting form for the first time if a user with given username and password doesnt exist then if gives username or password is invalid but when u retype everything and submit i found that all sessions are cleared.What could be the possible reason.Help me.Can revert back on drashty2004@yahoo.com
# June 11, 2007 3:49 AM

Granville Barnett June 2007 said:

Pingback from  Granville Barnett June 2007

# June 11, 2007 6:01 AM

Henk said:

This album works really nice. I got it up and running (on WHS CTP) using Andrew Grants WHS AddIn in a matter of minutes. The only thing I would like to see added is a button to exit the album and return to the previous page. The "back" button from the browser works fine, however this will not be obvious for all users. THANKS!!
# June 11, 2007 7:37 PM

foobar said:

Safari 2 was a piece of junk.  I don't expect much better from Safari 3.

It took a herculean effort from the Mozilla group to release Firefox, and contrary to the anti-IE crowd it's still buggy as hell.

It will take an equally mighty effort from the WebKit to just stamp out the horrible bugs from their product.  I wonder if that OSS movement has it in them, or if they'll just get bored and do something else with their time.

# June 12, 2007 12:31 AM

Sebastian said:

One thing which was not mentioned exactly but what is quite logical from now on is that Safari 3 will be also available for Tiger. Even if not with all the eye candy included in the final Leopard.
# June 12, 2007 1:05 AM

Matt said:

> This way, you'll catch most Safari regressions

> earlier, and that's only goodness.

Totally agree with you there, it will be worth it in the long run.

# June 12, 2007 1:50 AM

Maciej Stachowiak said:

If you're seeing regressions in the beta, please report them, with test cases, to . Better now than when the final ships. We've done our best to fix the AJAX history bugs we knew about, if there are more we'd love to know.
# June 12, 2007 5:17 AM

Philip the Duck said:

You say "why can't they respect the conventions of the host OS?"... Have you tried asking MS's own Office 2007 team this?! I realise many new Windows GUI features debut in Office (from the original combobox in Word 2.0, which appeared *later* in Win3.0 to the cool new ribbon UI, which I'm sure will find its way into Windows soon), but simple things like colour scheme / theme should really take the OS conventions & user preferences into consideration, shouldn't they? If I came out with an application that didn't work or look like any other Windows app I'd be crucified for not following the Windows Style Guide, yet the Office 2007 team seems to have thrown the WSG out the window! Anyway, I agree that Safari for Windows has got to be a good thing. Good on them!
# June 12, 2007 6:09 AM

Guy Sherman said:

I'm quite glad its out on windows, now all the developers whose excuse for not testing their sites in safari was that they didn't have access to a mac can make their sites work (Which, by the way, is not hard)!
# June 12, 2007 6:34 AM

Scott Williams said:

I tried it on a .net app here and about half of the functionality was there. I the tried it on a classic app that one of my clients is still using and I couldn't even get passed the login screen. With a large base of people used to using IE, I don't see it getting widespread acceptance without some major changes.
# June 12, 2007 7:05 AM

Shaun Newman said:

quote: "oh man, yet another browser to test in", erm... any developer worth his salt and ready to build cross browser would have already included testing for all the major browsers including Safari surely? As it is a standards compliant browser (like Firefox for the main part) anyone developing to the standards would have won half the battle. It's IE that is the weak point in all this as it follows it's own damn standards :0)
# June 12, 2007 8:31 AM

Tim said:

This is a good thing ONLY if Safari for Mac vs Windows work the same way. What a nightmare if we have to test for Safari on Windows & Mac. From looking under the hood, Safari on Windows does identify itself differently then on a Mac which scares me to start.
# June 12, 2007 9:36 AM

Links: ASP.NET, Visual Studio, Silverlight, WPF y .NET « Alexander Jim??nez said:

Pingback from  Links: ASP.NET, Visual Studio, Silverlight, WPF y .NET &laquo; Alexander Jim??nez

# June 12, 2007 11:31 AM

Brennan Stehling said:

I tried out Safari on WinXP yesterday and while some of it may be faster I did not like that it did not mix in well with the native Windows applications. It seems contrary to the Apple mindset. They should produce an interface which is consistent with the platform. Every application that goes to MacOS X is encouraged to follow their UI guidelines. They should at least do the same with Safari on Windows. I realize Quicktime and iTunes also have the unusual brushed metal look along with other inconsistent look and feel differences but I think people treat media players as the kinds of applications that can break out of the normal constraints. Beyond that I find the brushed metal interfaces to be sluggish. I also do not like having to resize the window with only the do-hicky lower right side. Regular windows apps let me adjust the window from any side but that is not true with Safari. I hope they make it conform more to the WinXP and Vista experience. Things feel better when they are consistent.
# June 12, 2007 1:03 PM

IceMan said:

It's a "could-not-care-less"-thing. Safari will not have a marketshare over 2% on Windows.
# June 12, 2007 1:22 PM

Bertrand Le Roy said:

Maciej: thanks for the response. As I've said in the post, I did already report any bug I found. I know what it's like to ship software and hope I'm not being too harsh. I'd love to hear how you see history management in the new version. It certainly wasn't obvious from my initial experimentation yesterday and I'm glad to read you have a story, I would just love to know it. Feel free to drop me e-mail through the contact form of this blog.

Philip the duck: No I haven't. I thought that the Mac Office integration was pretty good but apparently I'm wrong. If it's that bad, I won't defend it but that doesn't make the Safari integration good.

Shaun: first, Safari 3 on Windows is a different browser, and one more that you'll have to test on. It's a different platform and it's a different version number. It's also very, very different from Safari 2. Mostly for good, but definitely different. You *will* have to test on both, so that's one more.

Second, the view that writing to the standards gets you halfway there is in my opinion very naive because this "second half" is by far the most complex and difficult. And it's the one that will break with a new browser and that will require additional testing. So short term, new browser => more work. But it's ok, that's part of the job and as I thought was clear from the post, I really think long term it's a good thing.

Third, I'm not defending IE. I do report bugs to them too.

Tim: so far so good in our own short experience. They seem to be very consistent. Safari 3 for Windows actually identified in our browser API as Safari with version 522 (IIRC) with no modification. It's actually a good thing that they would show the platform in the browser string if you *need* to differentiate them. You will have to do some testing on the Mac still, but as a less frequent routine which will probably very rarely report problems.

# June 12, 2007 2:29 PM

Steve said:

It's a great thing.

I think MS should get out of the browser business, they murk it up too much

# June 12, 2007 8:08 PM

Haywire said:

This thing is outstanding. I love it. Now, having said that, I am having one small issue. I have a folder called Pictures where the web files reside. I have dirs 2002, 2003, 2004, and in those dirs 01, 02, 03. I can get into the year folder to see my months folder, but when I click on the link for the month folder nothing happens. What is the level of folders this can handle. Root + 1? Root + inf?
# June 12, 2007 8:40 PM

Bertrand Le Roy said:

There shouldn't be a limit on the folder depth. Can you package a repro into a small zip file and send it to me at bleroy at microsoft dot com?

# June 12, 2007 9:09 PM

Kearns said:

Somehow it just won't install on my XP upgraded to Vista Professional machine. Complains something related to VBScripting based on the error it gets
# June 12, 2007 10:24 PM

Bertrand Le Roy said:

Kearns: you should report it to Apple. Bugs can be filed at http://www.webkit.org.

# June 13, 2007 12:08 AM

Lionel Richie said:

It does annoy me a little that Apple decided to use Aqua-style UI widgets, but I suppose the benefit is consistency between OSes -not just in the appearance of the application, but also in the appearance of sites the application displays. A large percentage of the site rendering errors I see when using my Mac are due to a windows-based developer having no idea how buttons, drop down lists etc work on other OSes.
# June 13, 2007 2:22 AM

Mark Perrin said:

I thing this is terrible news, I use OSX Tiger and to be honest i went with OSX because it just works better for me. I do not understand why apple is even bothering porting safari to windows, they should leave it with OSX. If a windows user wants safari, buy a mac you cheapo. I believe that the windows version should be a lower spec than the OSX version and the same with Itunes otherwise whats the point. Apple should make their own versions for their platform and customers the better version. Windows is crap. full stop! Id rather the Apple developers dedicate their time to Apple, why bother with Microsh1t.
# June 13, 2007 4:38 AM

Mac User said:

Bad Bad Bad !! Aple should stop wasting their time with windows. They should use their installed base with the ipod to force people onto osx. Leave itunes where it is on windows and only move it forward on the mac. It will still work just not as well as on the mac, thats the way it should be, isnt this obvious (its an Aplle product, it should work best on Apple hardware). Safari is just another case of Apple giving up one of its assets, however small. Whats next? iLife?
# June 13, 2007 4:41 AM

Infinities Loop said:

I've seen this problem a few times now, from a few different developers... including myself. I figure
# June 13, 2007 5:26 AM

Paul said:

Also it is not just Vista. It is specifically Media Player 11 and above. I have this loaded in XP Pro SP2 and get the exact same thing with my iPAQ H5450. The only hope would be to upgrade to the latest version of mobile windows but that is not supported on this version of the ipaq
# June 13, 2007 10:12 AM

Bertrand Le Roy said:

Mark and Mac User: way to go, guys, let's "force people onto osx", even if they don't want to. You're showing a superb example of "thinking different". Congratulations.

# June 13, 2007 11:17 AM

InfinitiesLoop said:

Mac: Hi I'm a Mac.
PC: And I'm a PC.
Safari: *standing in the middle* And I'm Safari.
PC: Thanks Mac for letting me borrow Safari.
Mac: Oh no problem PC, I hope you like him!
Mac: *whispers to Safari* Remember, wait until he's asleep...
PC: I think we'll get along famously!

# June 13, 2007 2:31 PM

RichB said:

>total lack of error feedback Have you got the Safari Debug menu turned on? You can enable it on both the Mac and Windows versions (balk at the XML schema on Windows while you do it...). Alternatively, use Adobe AIR's webbrowser sample for some Firebug-esque debugging tools.
# June 13, 2007 3:17 PM

Bertrand Le Roy said:

Rich: I'd love to. I know how to enable it on the Mac but not on the PC. I was unable to find that info on Apple's web site. Can you explain, please?

# June 13, 2007 3:29 PM

M. Keith Warren said:

I totally agree, if you read the analysis from Paul Thurott on this you will see he thinks of things the same way, it is all about tapping into the market of developers who use windows.
# June 13, 2007 5:26 PM

Luis Abreu said:

Even though many are saying that it's fast, I'm saying that it sucks...i'm still waiting to see links rendered correctly (90% of the sites i tried opening on it just don't render correctly and i'm not talking about css positions and stuff like that; i'm talking about not seeing on the pages...)
# June 13, 2007 5:41 PM

Shawn Burke said:

Betrand, re the debug issue, see my blog, there's instructions there. http://blogs.msdn.com/sburke/archive/2007/06/11/apple-releases-safari-for-windows.aspx I'm fascinated by how much discussion this is generating. It's a browser, people. At the end of the day having it on Windows will only have the effect of helping web developers make sure their sites work on Safari so that Mac users have a browser out of the box that works more reliably either via fixing the sites or pushing fixes into the browser. That's fine with me.
# June 13, 2007 7:53 PM

Aaron said:

I agree.  Its all about the iPhone and the windows developers.

# June 13, 2007 8:05 PM

stefano said:

hi, thank you for your fix. I still have this problem. I have a datagrid with a template column with a small image within. When the user hover it a balloon appears (similar to that of google maps) displaying some data. Before your fix there was no way to show it within a iframe. Thanks to your fix now the balloon displays, but it seem that it ignores offset values, do you have any idea? Stefano
# June 14, 2007 8:55 AM

n4cer said:

I agree as well, but all Apple needed to keep the same for emulation is the rendering engine. They didn't need to bring the window chrome with it, or if they did, it should be embedded in a standard window. As it is currently, it destroys consistency with the basic windowing conventions and creates more interaction issues (e.g., multi-monitor/maximize bugs) for them as they try and make it mimic the behavior of standard Windows applications.
# June 14, 2007 10:03 AM

Luis Abreu said:

yeah, i too believe that is the case.
# June 14, 2007 1:29 PM

Bertrand Le Roy said:

No, offset values on what?

# June 14, 2007 1:38 PM

Patrick Long's Blog said:

First things first I am using a technique that I learnt from Bertrand Le Roy's blog. I take no credit
# June 14, 2007 3:34 PM

margiex said:

拷贝C:\ProgramFiles\MicrosoftASP.NET\ASP.NET2.0AJAXExtensions\v1.0.61025\目录下的MicrosoftAjaxLibrary...

# June 15, 2007 4:06 AM

Chase Saunders said:

This is exactly how we're using it. Since Safari has in the past required a subscription to Mac OS updates we literally had to borrow an up-to-date Mac at the end of projects for testing to avoid constantly buying OS upgrades. With Safari having been released for the PC we can now do proper browser testing, and I can't think of any other reason to use it.
# June 15, 2007 1:32 PM

Mac Rumors Kicks Around the Yellow Box « Quod Ero Spero said:

Pingback from  Mac Rumors Kicks Around the Yellow Box &laquo; Quod Ero Spero

# June 15, 2007 3:25 PM

herval said:

It HAS to be because of that. Safari is HORRIBLE even on the mac, I don't think windows users buy it's design...
# June 15, 2007 4:16 PM

Danno Ferrin said:

No conspiracy theory necessary. Safari is a derivitive of Konquerer, the KDE browser, which was coded in C, so it makes sense that the core areas are coded in C as well, only the widget linkages may require Obj-C, and since it is a windows binding only the widget portions would require heavy re-work.
# June 15, 2007 10:50 PM

Craig Francis said:

Sorry, but why can't they build a new UI? The one they have at the moment works fine, why start again, and make it look like a boring Windows app? Its not as if IE7, Office or Media Player etc are keeping a consistent look - they are all going for the custom UI. And for end users, this gives them another browser to choose from... which can only be a good thing... especially since FireFox market share has stopped growing so rapidly (which is a shame)... but Safari has another source of converts, the users of iTunes. If the market share for IE can drop below the 50% mark, then Microsoft might start doing some real work on that browser... which is basically still using the same engine as the 5 year old IE6!
# June 16, 2007 7:29 AM

stefano said:

Sorry, I missed to say the most important thing!! The balloon is actually a HoverMenuExtender, I was talkin about OffsetX and OffsetY properties of this extender. After your fix now the extender display, but it's centered above the control it extends and the offset values are ignored.
# June 16, 2007 6:38 PM

Russ said:

Bertrand, Kudos to you and all who contributed to this fine tool! Very easy to use and gives a great aesthetic look for a simple Photo Album. I do have a one question. I cant seem to get the stacked photos folder icon to work. I was hoping you could clarify "Stacked photos folder icons (uses default.jpg if it exists)".
# June 16, 2007 11:43 PM

DIego said:

Maybe it's the beginning of more Apple apps being ported to Windows. iLife? There may be a core in Safari which could be used by other applications.
# June 17, 2007 7:13 AM

bjm said:

I disagree. Safari, for one thing, renders text in a way that makes it much easier to read (for me). So I think I'm gonna start using it as soon as its final version is released. And, of course, from now on, my apps will support the Safari browser! MS guys better off think of supporting the "canvas" element in IE. (And, yeah, I do know that'll never happen :)
# June 17, 2007 7:26 AM

Bertrand Le Roy said:

Stefano: you should probably ask this question to the toolkit team.

# June 18, 2007 12:20 AM

Bertrand Le Roy said:

Russ: how exactly does it not work? What I meant was that if you have a photo named default.jpg, the handler will use it as the top of the stack. Other photos will be randomly selected. If you don't have a default.jpg, it takes a random photo for the top of the stack. Does that help?

# June 18, 2007 12:24 AM

stefano said:

I will, but I think this problem is releted with this article, since if I see the page outside the iframe the behavior of the extender is perfect. Sorry if I bother you once again!

# June 18, 2007 3:58 AM

Russ said:

Thanks for explaining it.  At least now i know that is not causing the issue. See the following link for my use of the Photo Album:

www.stjohnfire.com/.../Album.aspx

The album works great, but it does not show the stacked effect of the images in the album.  Not sure why this is happening.

# June 18, 2007 9:04 AM

Shane Shepherd said:

<blockquote>Since Safari has in the past required a subscription to Mac OS updates...</blockquote>

How long ago was this?  I've been using Apple Computers for 6 years now and this has never been the case.

# June 18, 2007 9:43 AM

Bertrand Le Roy said:

Stefano: it is related to the iframe, but the patch here only deals with the security issue. It may end up being a problem somewhere in Microsoft Ajax, but you should start by asking the toolkit team as this happens with one of their extenders.

# June 18, 2007 4:06 PM

Bertrand Le Roy said:

Russ: can you look for the UpFolderStackHeight setting in the handler and check that it's not set to 1?

# June 18, 2007 4:21 PM

Bertrand Le Roy said:

Shane: as far as I know, this is the first time a major version of Safari is available separately from an OS upgrade. We had to upgrade our Macs to OSX 10.4 in order to get 2.0.4.

# June 18, 2007 4:23 PM

Russ said:

UpFolderStackHeight  = 3

# June 18, 2007 8:42 PM

Bertrand Le Roy said:

Russ: then I have no idea, sorry. Never seen that happen.

# June 19, 2007 12:37 AM

Greg said:

This has to be the reason ... I have several PC's in the house ... no Macs. I can't say I care enough about Safari support enough to go out of my way to make sure it's ok. I'm not what you'd call a web dev who walks the edge of browser support. I learned my lesson years ago regarding that.

Maybe if I'm in CompUSA I'll pull up some of my sites for the hell of it. But if I had a Mac I would check it.

I have enough on my hands making sure things work in IE6 , 7 and Firefox.

So why did I download Safari and try to install it twice seeing the first time botched because Apple rushed this beta?

Easy ... I now have an easy way to make sure my sites look and work OK in Safari. So why not?

It's not uncommon to hear (though less and less) ... "works in IE and Firefox" ... but Safari is left out. So I too think this is a move by Apple to elevate the user experience for the MAC crowd by increasing the # of sites that are designed on a PC and look and work just as good on a Mac as they do on a PC.

Your theory makes total sense.

# June 19, 2007 12:56 PM

Greg said:

BTW - I'm using JQuery and Thickbox and my iFrame's called into the DOM work without a hitch. jquery.com/.../thickbox

# June 19, 2007 1:03 PM

Russ said:

I found the problem and fixed it. Since the color of my background is not black, i had made the modification suggested by Calios:

"Calios said:  

Found a little bug/annoyance - im posting it here since gotdotnet will phase out in a few days(19th of June 2k7). in CreateFolderImage you didnt fill in the BackGround - thus using any other background than black will look wierd :-O I added this to fix it: g.FillRectangle(new SolidBrush(BackGround), 0, 0, size, size); Right after the stacked Graphcis has been declared (was line 477 of the .ashx file for me - v 2.1 of the handler) :-)

# June 8, 2007 9:33 PM"

In troubleshooting deeper, i realized that i had placed this line of code in the wrong place.  it all works fantastic now.

Thanks again,

Russ

# June 20, 2007 10:06 AM

Warren said:

i was trying to download the code to intrigate into my home server and i keep getting the following message

The GotDotNet site is being phased out

  Microsoft will be phasing out most features of the GotDotNet site by Summer 2007.

  GotDotNet Workspaces and Private Workspaces have been phased out        More about the GotDotNet phase-out

Contact the GotDotNet Support Team

is the code still available for download and if so where can i get it?

# June 21, 2007 12:31 AM

Bertrand Le Roy said:

Yes, hold on, I'm migrating to Codeplex. The new address will be: www.codeplex.com/PhotoHandler

# June 21, 2007 1:26 AM

Atlas and more said:

Last night, I uploaded the source code and release package for version 2.0 of the photo handler . I'll

# June 21, 2007 1:29 AM

Atlas and more said:

I just finished migrating my PhotoHandler workspace from GotDotNet to CodePlex. I have got to say that

# June 21, 2007 3:31 AM

Shane said:

Thanks for this great info. I wanted to pass along a tip I learned while applying this patch. After applying the patch and trying to run the app I was also getting the 'Sys' and 'Type' undefined errors that I saw other people getting. It took a long time to track down, but what I found was that our Sys Admins had deployed a tool called URLScan onto every desktop to prevent users from going to potentially malicious websites. Well, that tool also has a setting that prevents URLs with periods in their address. We figured this out based on using Fiddler and identifying that we were getting a 404 error when trying to load the patched Ajax files. The URLScan tool was preventing us from loading that file. Anyways, I hope that helps someone out there.

# June 21, 2007 10:53 AM

jbush7777 said:

Couple of comments:

I have a different problem with numlock.  Some of the older VMS editors used that key (called the GOLD key) extensively in editing.  I plan to rework my editing options (I don't use that editor much any more, but occasionally it is useful) to make the keyboard / into the gold key instead, since the numlock key always toggles numlock, in addition to passing the escape sequence into the Alpha.

There is a nice freeware  utility I use (printkey) which  I have configured so that when I hit printscreen (alone) it is possible to drag-select a rectangular portion of the screen to import into printkey.  It can then be copied to clipboard, printed , saved as a gif, and modified (e.g. interchange black and white).  Very useful.

# June 21, 2007 11:04 AM

Bertrand Le Roy said:

Shane: urls with periods in the address? That's radical. Most of the web must be filtered out by this?

# June 21, 2007 9:05 PM

ScottGu's Blog said:

One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript

# June 22, 2007 1:57 AM

BusinessRx Reading List said:

One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript

# June 22, 2007 2:08 AM

ASP.NET said:

One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript

# June 22, 2007 2:24 AM

Michael Douglas said:

It's all about Apple/Mac's...

You know they, oops It's simple to turn off UAC, tend to, oops It's simple to turn off UAC, beat their chest about trivial issues with MS.

Funny though that they have now exceeded MS for the number of issues with their OS in 1 month timeframe.

# June 22, 2007 11:10 AM

Intellisense en JavaScript con VS 2008 « Thinking in .NET said:

Pingback from  Intellisense en JavaScript con VS 2008 &laquo; Thinking in .NET

# June 22, 2007 1:16 PM

Soven Shrivastav said:

VS 2008 JavaScript Intellisense

# June 23, 2007 12:16 AM

Anke said:

Hello,

I like your Photo Album handler 2.0 very much, but I've a problem.

Ich can't publish the website.

Here is the errormessage (sorry - it's in german):

"Für die Erweiterung .ashx ist kein Buildanbieter registriert. Sie können einen im <compilation><buildProviders>-Abschnitt in machine.config oder web.config registrieren. Stellen Sie sicher, dass das BuildProviderAppliesToAttribute-Attribut den Wert Web oder All enthält.

I:\xxx\AlbumHandler2_1_\Default.aspx"

Could you help me please?

bye Anke

# June 23, 2007 12:38 PM

Bertrand Le Roy said:

Anke: you should talk to your hoster. Apparently they disabled the build provider for ashx.

# June 24, 2007 2:06 AM

Anke said:

But I can't publish the website on my own Desktop PC. It runs only with the cassini, ans if I like to publish the Website, I get an Buil-Error.

I've try to add the Build-Handler to the project (in the web.config) but it dosn't works.

I have an other Project width a Http-Handler an this project I can publish. I works width Asp.Net since some years, but I havn't wrote a Http-Handler sometimes. I don't know, that I can makew :(

I have try to publish the Project at an other PC, but I have the same Error-Message :(

ciao Anke

# June 24, 2007 3:02 PM

Bertrand Le Roy said:

Anke: please check that the directory where you dropped the handler and bin folder is a web application configured for ASP.NET 2.0. It should work just fine out of the box.

# June 24, 2007 4:13 PM

一个小泡 said:

VS 2008 JavaScript Intellisense

# June 24, 2007 8:05 PM

mark perrin said:

safari 3 after a few weeks sucks on both platforms, ive gone back to safari 2.0 on OSX and windows is welcome to this buggy load of crap.  Lets hope apple have laced the windows version with bugs on purpose to show those windows users just how buggy they can make vista.  LOL its like the secret poisoned pill disguised as a browser but laced with cyanide.

# June 25, 2007 4:12 AM

Anke said:

Sorry, but I think you don't understand me. I can copy the files at my Server (It's my own Server an I can take the settings self) - this go. But i can't publish the Website (Project --> Publish Website). Then I get the error.

I like to publish my website, because I don't like to have the CS-Files at the Server. I could publish my total Website-Project ans then I could copy the Photo-Handler later to the published Sites. But this is not that I want.

I use the MyWebPagesStarterKit - it's also from codeplex.com (www.codeplex.com/.../ProjectReleases.aspx). Where are Http-Handler inserted too. But this Project I can publish without problems.

Doo you understand the problem?

ciao Anke

# June 25, 2007 11:39 AM

Bertrand Le Roy said:

Anke: I'm sorry, but no, I don't.

# June 25, 2007 1:08 PM

Anke said:

So, I hav made a screenshot. I have Open your Project width Visual Studio 2005. When I try to publish the project. But I get only the error which you can see in the picture in the bottom.

picasaweb.google.com/.../photo

I hav found an other german person, which has the same problem. See: www.mycsharp.de/.../thread.php (sorry, it's in german)

ciao Anke

# June 25, 2007 1:36 PM

Bertrand Le Roy said:

Anke: the problem is that I'm unable to reproduce your problem. I could do something if you gave me the exact, very precise steps of everything you did from downloading the handler to setting up the web site and running it. Please also include what OS you're using.

We can continue this discussion through e-mail (bleroy at microsoft dot com) or even better, you can file a bug on CodePlex.

# June 25, 2007 1:45 PM

Ted said:

I tried the app and I got an error. Is there a limit to the numbers of pictures that you can have in an album?

Thanks,

Ted

Here is what the error said:

Request timed out.

Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Web.HttpException: Request timed out.

Source Error:

An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.  

Stack Trace:

[HttpException (0x80004005): Request timed out.]

# June 26, 2007 5:35 PM

Bertrand Le Roy said:

Ted: not in principle. How many pictures are we talking about? Did you try with the same settings but just a few images?

# June 26, 2007 5:41 PM

Ted said:

I was trying it with our holiday pictures , so there was about 1650 pictures. I dropped about half of them out of the folder and it is working now, but I don't know if it was the excessive number of pictures or that fact that there was a few MOV files in that folder that I forgot were there.

BTW, you mentioned about the settings, where do I go to find out how to change the settings and what the options are?

Thanks,

Ted

# June 27, 2007 10:40 AM

Bertrand Le Roy said:

Ted: the mov will not be a problem, they will just get ignored. 1650 is certainly a lot of pictures, and your users would probably thank you for splitting those into several folders ;)

I've never stress-tested it with that many pictures but in theory the album should only be slow on the first hit as it's generating thumbnails for all your pictures. You can try making the timeout longer in web.config and see if that's the case. Otherwise, just split, and maybe file a bug on the Codeplex site.

# June 27, 2007 1:59 PM

Ajaa said:

Hi

I was wondering about one thing.

I added the scriptpath and this is ok.

but why do I need to modify the

MicrosoftAjax.debug.js and MicrosoftAjax.js files?

Why havent this been fixed in the files from the download location?

When I did the abouve I still get an error when trying to use ajaxToolkit. Do you have any idea as to why?

When making these changes do I need to modify any references to the ajaxtoolkit?

Help is appreciated

# June 27, 2007 2:09 PM

Bertrand Le Roy said:

Ajaa: the files in the download location are the exact same files that are embedded in the dll. We're not servicing one and not the other. That's why we're presenting this as a patch for the people who need it until it is integrated into the main build (which it is in the Orcas betas). See this as a way to get the fix earlier.

About the toolkit issues, please read UPDATE 2 in the post. You can also contact the toolkit folks through the CodePlex site or the forums.

# June 27, 2007 2:30 PM

Atlas and more said:

ScriptDoc is a tool that extracts documentation from JavaScript files and packages it into XML files

# June 27, 2007 7:30 PM

The format for JavaScript doc comments - Atlas and more said:

Pingback from  The format for JavaScript doc comments - Atlas and more

# June 27, 2007 7:40 PM

Atlas and more said:

When I was talking at the Journées Académiques last week, someone in the audience asked me about documentation

# June 27, 2007 7:48 PM

Robin Debreuil said:

Great job, I was involved in a similar thing recently at Aptana, so I am painfully aware of how hard that is. So much screwed up JS in the world : ).

It seems you guys really nailed it though, kudo's!

# June 27, 2007 9:43 PM

Sandcastle said:

In April I blogged about Bertrand Leroy 's, cool document extraction tool (ScriprDoc 1.0) that will generate

# June 28, 2007 3:06 AM

ahnan said:

Great works! Thank you Roy!

# June 28, 2007 3:25 AM

Peter Goddard said:

For background image try setting a custom attribute to reflect the css class for the menu item and set the background in a stylesheet.

# June 28, 2007 3:36 AM

Arnt Henning said:

Hi

Thanks!!! The patch worked great!!

I just wanted to give some tips of problems I had.

When I first tried to

- setting a general ScriptPath on the ScriptManager

this produced the Sys error that people talk about here...

But when I changed this to

<atlas:ScriptManager ID="ScriptManager1" runat="server"  >

<Scripts>

<atlas:ScriptReference

   Name="MicrosoftAjax.js" ScriptMode="Auto"

Path="~/AJAXWA/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js"/>

</Scripts>

</atlas:ScriptManager>

Everything worked great.

It runs with no errors :)

Thanks alot

# June 28, 2007 3:50 AM

University Update-AJAX-ScriptDoc 1.0 available said:

Pingback from  University Update-AJAX-ScriptDoc 1.0 available

# June 28, 2007 3:51 AM

Arnt Henning said:

I just wanted to mention another problem I had. Although applying the patch worked I got problems when using the ajaxToolkit (latest release).

I got an error that ajaxToolkit could not be found.

To solve this I added the ajaxToolkit dll's in same folder as

MicrosoftAjax.js and MicrosoftAjax.debug.js

and renamed them to

AjaxControlToolkit.Common.Common.js

AjaxControlToolkit.Common.DateTime.js

AjaxControlToolkit.Common.Input.js

AjaxControlToolkit.Common.Threading.js

(as you can see I added the prefix 'AjaxControlToolkit.Common.')

This is mentioned earlier here but I just thought I can repeat it just in case!

Now everything works for me :) Ive got a updatepanel and the AjaxToolkit Rating control and theire 100% up and running!

Thanks alot for this patch!

# June 28, 2007 4:08 AM

Morten said:

I think there might be something wrong with the version numbers in your web.config. They are referring to v2.0 of System.Web.Extensions, which as far as I know isn't public available?

# June 28, 2007 12:40 PM

Bertrand Le Roy said:

Morten: you're right, thanks for pointing that out, I'll fix that later today but you should be able to change that reference to 1.0 without any trouble.

# June 28, 2007 2:10 PM

Bertrand Le Roy said:

Peter: the problem is that there isn't an individual css class for each menu item, so this will work for a category of items, but not for different backgrounds for each item.

# June 28, 2007 2:22 PM

Caterwomtious said:

Hi Bertrand

Like some others, my first thought was "this sounds great, but why not jsDoc?" You make a good argument for using XML instead, but it would still be useful to add jsDoc support even if it is for a subset of the functionality.

Why? Because there's a huge body of JsDoc-documented code out there that VS.net could interpret straight away, without needing to run any conversion tools. That's a big win.

# June 29, 2007 4:28 PM

Bertrand Le Roy said:

Caterwomtious: I agree, and I've passed this suggestion along to the right team for a future version (a while ago :) ).

# June 29, 2007 4:50 PM

Madia Thomas said:

Why don't you guys just provide us with the modified file?

# July 3, 2007 9:57 AM

Bertrand Le Roy said:

Madia: because this bug doesn't meet the servicing bar. This is fixed in the Orcas beta release, which has been available for a few months now.

# July 3, 2007 4:47 PM

Atlas and more said:

I just migrated my ObjectHierarchicalDataSource and CompositeHierarchicalDataSource projects from GotDotNet

# July 3, 2007 9:13 PM

Huobazi said:

Great works! It is very useful!

# July 4, 2007 3:24 AM

DEEPAK GUPTA said:

Hello Friends

i have added  

   <Scripts>

       <ajax:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js" />

   </Scripts>

inside my ScriptManager and even update the patch for MicrosoftAjax.js and MicrosoftAJAX.debug.js files. But even then am getting JavaScript Error - Sys is undefined..

Please help me.. I am not getting where i am doing wrong.

Any help is greatly appreciated..

Bye

Deepak Gupta

(www.broadwayinfotech.com.au)

# July 4, 2007 10:07 AM

boob said:

GAY

# July 4, 2007 11:33 AM

ScottGu's Blog said:

I've fallen behind on my weekly link-listing series - apologies for the delay. ASP.NET ASP.NET RSSToolkit

# July 4, 2007 3:47 PM

Bertrand Le Roy said:

Deepak: if you look at the generated source from the browser, you can see what address was generated (look for the <script> tag). Adjust your path so that the generated url coincides with where the script really is.

# July 4, 2007 5:12 PM

Richard said:

Hi, when you mention downloading code from

renaud91.free.fr/MetaDataExtractor  

it might be worth mentioning to download the

MetaDataExtractorAssembly222d.zip file

MetaDataExtractorAssembly230g.zip doesn't work.

# July 5, 2007 7:20 AM

Public Sector Developer Weblog said:

I found out about these ASP.NET controls by way of Bertrand LeRoy . "These data sources enable Menu and

# July 5, 2007 3:37 PM

Noticias externas said:

I found out about these ASP.NET controls by way of Bertrand LeRoy . &quot;These data sources enable Menu

# July 5, 2007 3:47 PM

Dinesh Gupta said:

How to remove this created IFRAME

if (document.all)

{

divNode.insertAdjacentHTML("afterEnd", '<IFRAME style="position: absolute;z-index:4;" src="javascript:false;" frameBorder="0" scrolling="no" id="' + sTableID + '_hvrShm" />');

var iframeShim = document.getElementById(sTableID + "_hvrShm");

iframeShim.style.top = hoverDiv.style.top;

iframeShim.style.left = iframeShim.style.left

iframeShim.style.width = hoverDiv.offsetWidth;

iframeShim.style.height = hoverDiv.offsetHeight;

}

# July 5, 2007 7:08 PM

Bertrand Le Roy said:

Dinesh: doesn't removeChild work?

# July 5, 2007 7:12 PM

Ludovic said:

I agree on almost all points, especially 5 and, OMG, 6 (aaargh!). However, I disagree about mini-games. I think mini-games are a very good concept that can lead players to specialization in a layered gameplay structure, for example. Sure, it can be done badly, but that doesn't mean it's inherently wrong.

I'd like to add:

8. Dead ends with deep backtracking: you're missing the Amulet Of Khrak to continue the story, but you need to reload a game from last month to be able to go get it. And since complex stories with branching and all are delicate to write without falling into this, game designer tend to write mostly linear storylines (well, it's called a storyLINE, isn't it?), where failure is not an option, and you have to retry until you succeed (remember Wing Commander, compared to X-Wing/Tie-Fighter?)

9. Poor immersion: this might be a bit of a personal taste here, but when I'm playing a 20 or more hours game, I'm expecting to feel immersed in its world and athmosphere and all. If I just want to have fun, I play Guitar Hero or Zuma for 5 minutes (or 5 hours). "Actual" games (as in: games with "long" gameplay) should be more immersive.

# July 5, 2007 8:03 PM

InfinitiesLoop said:

Crackdown = sinner with load times if you ask me.

Gears of War with its contextual 'points of interest' feature I thought was a nice touch which takes it out of the sinner category for camera angle in my opinion. FPS with bad camera control = uhh, a recent metal gear comes to mind.

And in defense of Crackdown it seems like it only 'check points' when something worth saving happens. It's automatic and it doesn't disrupt gameplay at all, which is great considering long load times.

One thing that I hate about crackdown... the damn advisor. Advisors are so common they need their own category in your list. Crackdown's advisor is an idiot -- most of the time what he says has nothing to do with anything, and he repeats himself all the time. I'll be trotting down the street for a few minutes and he'll bust out with "I can see my house from here!". huh? And yeah, after beating all the missions I pretty got it that agility orbs increase agility.

# July 5, 2007 9:54 PM

BulletBait's Blog said:

This article about bad points in game design is kind of interesting... Source: weblogs.asp.net/.../seven-deadly-sins-of-game-design.aspx

# July 6, 2007 2:29 AM

Kevin said:

Good post. I especially agree with point 5. PGR3 was another sinner on that point, if memory serves.

One thing that drives me mad is when two games where you're doing exactly the same things (e.g. GRAW2 and Rainbox Six Vegas) which are written by the same people have different controls. Reload in GRAW2 is "A", reload in Rainbox Six is "X", and in a firefight you can guarantee I'll hit the wrong one... As far as I'm concerned, "A" should always be used for the thing you're doing most often - at least in my case that's where my thumb naturally goes.

# July 6, 2007 6:21 AM

Bas Bakker said:

Your photohandler works great in Internet Explorer.

In Firefox, however, it shows the pictures (and directories) all in one column.

Any idea how to fix this?

Thanks!

Bas

# July 7, 2007 11:10 PM

dotnetuncle said:

Check out this link for more...

www.dotnetuncle.com/.../71_page_life_cycle.aspx

# July 8, 2007 6:10 AM

Atanas Korchev said:

In his recent post Bertrand Le Roy announced that he migrated his ObjectHierarchicalDataSource and CompositeHierarchicalDataSource...

# July 9, 2007 11:29 AM

Bertrand Le Roy said:

Bas: did you make any changes to the style sheet? I just checked and it displays fine in Firefox, Opera, Safari and IE.

# July 9, 2007 1:03 PM

Fabien said:

@ Ludovic:

Regarding mini-games: I tend to agree that if they're done right, mini-games should "blend" into the rest of the gameplay and "layer" it. One could argue that if a mini-game achieves this level of integration with the rest of the gameplay, it ceases to be a mini-game entirely :)

The point here is that most developers create mini-games that resemble gamaplay "warts" instead of taking the time and effort to interweave them seamlessly into the rest of the actions defining the gameplay.

# July 9, 2007 3:43 PM

AdmiralGanja said:

No sample up and running?

# July 10, 2007 8:21 AM

Copter said:

I would like friends and family to add comments to my pictures that will become part of properties.  How is the best way to make this happen?  THANKS

# July 10, 2007 10:33 AM

DEEPAK GUPTA said:

Hi Bertrand

Yes you are right..

The path that ScriptManager is taking is

<script src="/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.debug.js/System.Web.Extensions/1.0.61025.0/MicrosoftAjaxWebForms.debug.js" type="text/javascript">

</script>

where Scripts is my Virtual Directory But i am really geeting confused why it is again searching "System.Web.Extensions/1.0.61025.0/MicrosoftAjaxWebForms.debug.js" inside MicrosoftAjax.debug.js..

One more thing

I have added Scriptpath in ScriptManager instead adding ScriptReference..Is the Problem...

Thanx for the time...

# July 10, 2007 12:15 PM

Bill Wolfe said:

I did the same thing that EB did from March 5, 2007 and it worked great.

# July 10, 2007 12:22 PM

Bertrand Le Roy said:

AdmiralGanja: sorry, no.

# July 10, 2007 1:42 PM

Bertrand Le Roy said:

Copter: the handler does not support comments currently. One thing you could do is use it as a control and embed it into a web site that has comments.

It's one of the features I'd like to have, but it won't be added anytime soon. Sorry.

# July 10, 2007 1:44 PM

网际飞狐 said:

# July 11, 2007 2:51 AM

DEEPAK GUPTA said:

Hi Bertran

Thanx for the time..

I have checked the path in the Source code..The path is correct..But still am getting an error "sys is undefined.." Can u tell me some other reason for that..

# July 11, 2007 9:32 AM

Bertrand Le Roy said:

Deepak: well, if the path is correct and you've checked that the file actually gets downloaded (for example using Firebug or Fiddler), you probably introduced a syntax error while patching the file. Does it reproduce in debug and release modes?

# July 11, 2007 1:09 PM

Paul Realist said:

Here I had thought Einstein's discovery of the theory of relativity, or Jonas Salk's development of a polio vaccine were absolutely brilliant.  I was wrong.  Creating this presentation by spending a gazillion hours making seperate slides out of every word, capturing frame after frame on internet web sites, making the audience dizzy and bored after a couple minutes, that is truly brilliant.  I had to stop watching after less than half of it was over, it was just too good to handle.  Thank you, marketing geniuses, for pointing this mind blowing presentation.  God Bless PowerPoint!

# July 11, 2007 4:17 PM

Bertrand Le Roy said:

Hey Paul, thanks for calling me a marketing genius, but now I'm all depressed. If everything has to be judged against the theory of Relativity or the polio vaccine, pretty much everything becomes meaningless and futile.

# July 11, 2007 4:31 PM

Nathan Rose said:

Any plans for a SqlHierarchicalDataSource?

I've been toying around with a treeview custom control that would use a SqlDataSource, provided you give it a Parent/Child relationship (otherwise it would just be a list).  I also toyed around with making a hierarchical data source that inherited from SqlDataSource, but gave up after a few days.

# July 11, 2007 4:33 PM

Bertrand Le Roy said:

Nathan: why not use regular SqlDataSources with the CompositeHierarchicalDataSource?

# July 11, 2007 4:37 PM

Robin Debreuil said:

my 2:

1) Games that have no 'game' elements, like strategy, teaming up and backstabbing, knowing when you've been had, rewarding alternate approaches, thinking etc. Think of all the things that are fun in a card game, where a lot of games today are like the card game 'war', with better graphics. Clicking over and over until you win or lose.

2) Games where the controls and 'special moves' are so numerous and rewarding that the person who has spent the most time in the manual wins. C&C type games have almost all went this way, they used to be fun, but now it isn't very different than work (learn some arcane thing, repeat over and over until 5pm - then again I'm a programmer, so maybe I'm the only one that sees it that way).

# July 11, 2007 5:32 PM

Pretz said:

hmmm maybe but if the nex safari for windows results like this one.....  the most probably is that anyone use it because the program have a lot of problems.

# July 12, 2007 12:08 AM

Kalpesh said:

Hi,

I shoed alert msg but after pressing button my aspx page get expired.how to solve this pblm

# July 13, 2007 1:01 AM

Bertrand Le Roy said:

Kalpesh, what do you mean "expired"?

# July 13, 2007 11:16 AM

DEEPAK GUPTA said:

Hi Loy

I have checked the path of the Script..

That is correct i think so..I have installed firebug and the path that it shows is...

<script src="/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.debug.js" type="text/javascript">

</script>

where Scripts is the Virtual Path Folder of the project...

Now what else should i check...

# July 15, 2007 3:30 AM

DEEPAK GUPTA said:

Hi Loy

I am heartly Sorry to you and Heartly Thanx for the time..

Atlast i got my stupid mistake..Error is resolved..

Actually i have patched the release version file but not debug one..

Thats why i always get an error

Thanx a lot

Thanx once again

Bye

# July 16, 2007 1:37 AM

Neil Kilbride said:

Love the photohandler control, thansk Bertrand :)

I added some functionality to omit unwanted directories being displayed, as I couldn't see any where in the existing code on where you did this. You can see how I did it here : neilkilbride.blogspot.com/.../net-photo-gallery-control-photohandler.html

# July 16, 2007 4:17 AM

Neil Kilbride said:

The photohandler control is great - thanks Bertrand :)

One key point to note is to make sure you get version V2.2.2d (not the latest version) of the MetaDataExtractor - otherwise you'll get a 'The type or namespace name 'Directory' does not exist in the namespace 'com.drew.metadata' (are you missing an assembly reference?)' error.

I needed to specify some directories I wanted to omit from the control (and couldn't see anywhere I could do this with the current control) so I added a few lines of code, which I blogged about here: neilkilbride.blogspot.com/.../net-photo-gallery-control-photohandler.html

# July 16, 2007 4:28 AM

DEEPAK GUPTA said:

Hi Bertrand Le Roy

I have check in both modes - Release and Debug Mode..The Error "Sys is undefined" comes in both the mode..

Even i have patched my js files 2-3 times but nothing work for me..If you say, Could i send u the patch files by mail...

One more thing i am using FreeTextBox Control(version 3.16) on the same aspx page..Would it be creaitng any problem..

Pls help me..Its really look bad when a popup displays on the Client Screen with the message "Sys is undefined".

Thanx for the help and time in advance..

Bye

# July 16, 2007 6:52 AM

Naveen said:

Hi,

I'm Using the following code..

Session("Test") = Value

Response.redirect("PageName.aspx",false)

The redirection and loading of the second pae fgoes on fine but the Session Vatiable value is lost before the timeout.

I'm using global.asax file to set the Session .Timeout to 240 and alternatively specifying the same in web.config.

Would like to know what's wrong....

Thanks and Regards,

Naveen

P.S : I'm using Master Page in the application and checking the Session values in page load.

# July 16, 2007 7:43 AM

Bertrand Le Roy said:

Naveen: you must be doing something else than that, because just that code you're showing works fine. You can send me your repro at bleroy at microsoft dot com.

# July 16, 2007 1:55 PM

Bertrand Le Roy said:

Deepak: did you check in Firebug that the script do actually get loaded?

# July 16, 2007 1:57 PM

DEEPAK GUPTA said:

Hi Loy

Yes, i check in firebug and the path is correct.

The path that shows is

<script src="/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.debug.js" type="text/javascript"></script>

Where Scripts is the folder where all Scripts resides..

Thanx for your time Loy..

I know am annoying you but am not getting at all whats going wrong..

Bye

# July 17, 2007 12:26 AM

Max C said:

I had exactly the same symptoms as Deepak and just fixed it.  If like me you're testing within an iframe then the request to get the script file can be unauthenticated even though you're logged in (because the hosting page's cookies are not accessible to the iframe'ed page).  So if the script files are in a location that requires a logged-in user then you'll be able to download them by manually pasting the URL into the address bar but the iframe'ed page still won't be able to load them.  Just need to change web.config appropriately to fix it.

Having wasted an afternoon on this I just need to let off some steam by saying Microsoft is bonkers beyond belief to leave poor Bertrand helping thousands of developers patching a bug that affects everybody (because every site gets put in an iframe by someone).

Thank you, I feel better now.

# July 17, 2007 2:52 AM

t3knomanser said:

Is there any reason to not just use closures? This seems like a pretty uninteresting method. Closures do this, and a bunch more. Is there something I'm not seeing?

# July 17, 2007 9:17 AM

Bertrand Le Roy said:

t3knomanser: yes, what you're not seeing is that this is implemented using closures. If you're confortable with using closures directly, that's fine but you need to be careful as you may inadvertently attach more context than you need and even create hard to find memory leaks in IE. The methods presented here are more convenient, they hide a concept that is difficult or unknown to many developers who are new to JavaScript, and they only capture in the closure what little context *you* decide is useful.

# July 17, 2007 2:00 PM

Bertrand Le Roy said:

Deepak: I'm not asking if the path is ok, but if it effectively loads. You can check that in Firebug by expanding the entry in the net tab.

Max: the issue doesn't affect many users as you need to use iframes *and* have your iframe be in a different domain. That is not that common and it is a lot less trouble to offer out of band advice than to release a full service patch. The problem is also fixed in all recent releases of Ajax.

# July 17, 2007 2:10 PM

Dave said:

I too am having the problem with subdirectories.  I have everything in year folders and then month then activity.  I can click all the way thru but the last folder I cannot view anything inside it.  I get thumbnails but cannot get into the folders.  any ideas?

Dave P

# July 17, 2007 6:09 PM

Mark said:

Great, works well!

Is it possible to put spaces between the icon and the text?

# July 18, 2007 5:39 AM

Bertrand Le Roy said:

Dave: if you can zip a sample site (not too heavy please) and send it to bleroy at microsoft dot com, I can have a look.

# July 18, 2007 2:29 PM

Bertrand Le Roy said:

Mark: you should be able to do that with CSS. For example if the CSS class for your menu item is "foo", styling "foo img" with some right padding should do the trick.

# July 18, 2007 2:31 PM

Mark said:

How can I set a cssclass for an image?

The only classes I can set at the moment are:

<StaticMenuStyle />

<StaticMenuItemStyle CssClass="menuRootPanelItem" />

<statichoverstyle CssClass="menuRootPanelItem_Hover" />

<StaticSelectedStyle />                           <DynamicMenuStyle CssClass="menuRootPanelItem_Expanded" />

<DynamicMenuItemStyle CssClass="menuPanelItem" />

<DynamicHoverStyle CssClass="menuPanelItem_Hover" />

<DynamicSelectedStyle />

# July 19, 2007 3:35 AM

Mark said:

The following code worked but it's not the most practical.

<siteMapNode url="site.aspx" title="&amp;nbsp;&amp;nbsp;&amp;nbsp;Site" ... />

# July 19, 2007 6:56 AM

Jon said:

Ok, riddle me this if you please.  I am building an ASP.NET (VB) site using Master Pages.  The Masterpage is simply to have a common header.  In the content for the page in question, I have a two column table.  The left column has a treeview with a list of objects.  Each object has properties...each with potentially a different value.  The right column is a dynamically created table that in each row has either a label, dropdownlist, or a checkbox.  My postback code rebuilds this table and populates the values appropriate to the object selected in the treeview.

My problem is that if I click from one object to another on the treeview, data is not updated on the table...even though I show in a logger (listbox) that I'm attempting to set the values.

I toyed with the loadcomplete routine and changes made to the objects in the right column stick.  But the function that "rebuilds" the table during postback does not.

Your help would be greatly appreciated.

Jon

# July 19, 2007 10:06 AM

Bertrand Le Roy said:

Mark: you do it in the style sheet. Your MenuItemStyle points to menuRootPanelItem, but you can define a ".menuRootPanelItem img" style in your stylesheet which will only affect images that are inside an element with class menuRootPanelItem. Does that make sense?

# July 19, 2007 12:15 PM

Bertrand Le Roy said:

Jon: it's hard to say from just this description and without seeing the code. Are you handling the selected node changed event from the treeview to change what's in the table?

# July 19, 2007 12:21 PM

coolestCompany said:

the solution was very helpful n awesome .

It saved me .

thnx a lot

# July 20, 2007 6:33 AM

Mark said:

Thanks, I understand how css works but it doesn't seem to recognise "img" for any cssClass even if I put ".img" or "imgUrl" or ".imgUrl".

Do I need to define "img" somewhere?

# July 20, 2007 11:12 AM

Bertrand Le Roy said:

Mark: I just checked, and it works great. In the stylesheet, I have:

.item img {padding-right: 50px;}

and the item style is <StaticMenuItemStyle CssClass="Item"/>

# July 20, 2007 2:10 PM

lance said:

How would I access a Treeview node so that I could set individual css classes based on .sitemap attributes? For example:

<siteMapNode title="Our Services" url="~/Services/Default.aspx" description="Our Services" cssclass="gnav"></siteMapNode>

public void OnTreeViewDataBound(object sender, MenuEventArgs args) {

   ??????????????

}

# July 20, 2007 4:02 PM

Bertrand Le Roy said:

Lance: you can't, sorry.

# July 20, 2007 4:43 PM

callback asp.net 2.0 « Private: .NET + OO concept said:

Pingback from  callback asp.net 2.0 &laquo; Private: .NET + OO concept

# July 23, 2007 12:44 AM

Matt G said:

If your getting the Sys and Type error. try this:

Set ScriptMode="auto" and in the compliation tag of web.config remove the debug attribute

or change  ScriptMode attribute to ScriptMode="Release".

In debug mode your script tag will alter the path to find a debug js file.

# July 23, 2007 4:02 PM

Bertrand Le Roy said:

Matt: if you followed the post's indication, you should have installed all files from the library, which include both the debug and release versions.

# July 24, 2007 1:40 AM

Sona said:

Hi

Thanks for making this tool available.

I have a small problem though. I am able to see the different folders display as groups of thumbnails. But when I click on it. It doesnt take to the album.

I really liked this implementation.

www.stjohnfire.com/.../Album.aspx

BTW: I am using Win XP Professional

Thanks,

Sona

# July 24, 2007 10:49 AM

Steve said:

Exactly the same problem here chaps.....

using an XDA2....

Agree with the "not a vista" prob... also running XP pro with sp2.. definitly a Media 11 prob...

Slap Happy programming.... should be allowed to disable it..!!!   BAH..!!!!!

# July 24, 2007 2:21 PM

Bertrand Le Roy said:

Sona: not sure I'm following you, it seems to work fine on your site.

# July 25, 2007 12:43 AM

Ziro said:

Hi. I need help. Please. I have a web app using frames. in the top frame I have a link to a ajax page which opens in a bottom frame. This ajax page loads data to a gridview.

I downloaded,copied and patched the files of ajax inside a folder called scripts. Example: c:\MiAppPath\scripts\System.Web.Extensions\1.0.61025.0\MicrosoftAjax.js

I'm sure I patched the scripts correctly. But I got an error Sys is undefined.

Bertrand, Please could you helpme?

I checked the source code in Internet Explorer, search for script tag and I found this:

<script src="scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js" type="text/javascript">

</script>

In the lines below i have seen that the path appears twice. Is this normal?

Thanks.

# July 25, 2007 10:44 AM

Bertrand Le Roy said:

Ziro: you probably included too much in the script path. Apparently in your case it should just be "scripts".

# July 25, 2007 12:20 PM

Shawnee said:

this so stupid because it did NOT HELP ME AT ALL! [deleted about a thousand exclamation marks]

LEARN HOW TO WRITE! [and here too]

# July 26, 2007 1:53 AM

Suraj said:

How can I generate msgbox with three buttons Yes/No/Cancle when a user is updating his record.

# July 26, 2007 2:21 AM

Mark said:

No worries, I've got it working now.

I wasn't setting an img class for both StaticMenuItemStyle AND DynamicMenuItemStyle as they use different cssClasses.

Thanks for your help.

# July 26, 2007 8:35 AM

Bertrand Le Roy said:

Suraj: the gridview example in the post is almost what you're looking for, except for the cammand name and the buttons, right?

# July 26, 2007 5:24 PM

Vladimiro said:

This solution is mutch more simple!

forums.asp.net/.../1546323.aspx

:p

# July 27, 2007 10:46 AM

Nicholas said:

I suspect the reason this works goes back to windows forms. When a transparent control overlaps another control, the bottom control never gets the instruction to draw the portion underneith the transparent control so all you end up seeing is the background. The HTML is rendered to the background layer as far as winforms is concerned, so by putting a transparent IFrame control over the select or Flash control the draw instruction is prevented from being issued causing the div element underneith to appear.

# July 27, 2007 5:57 PM

ajoka@nextra.sk said:

Ok, i've got 2 problems: 1 is the MSDN documentation, 2 is the result from some test.

1) FROM MSDN:

A hash function must have the following properties:

a)If two objects of the same type represent the same value, the hash function must return the same constant value for either object.

b)For the best performance, a hash function must generate a random distribution for all input.

c)The hash function must return exactly the same value regardless of any changes that are made to the object.

Please check this, i've got a big mess in it:

a) means that if all of my member variables (even mutable ones) are the same, hash-codes must equal

b) says that hash code should remain the same for all the object lifetime.

SO HOW IT IS?

2) Ive did some tests, created an own simple class with 1 value type member. implemented gethashcode and equals by using the member. created 2 instances of the same class (with id 1, 2) - added this class to an ArrayList, then changed the id value of the instance of the first class. the result: both object remained in the list, even so that hashcode has changed for the 1st object.

SO AGAIN, there must be something that's missing.

Another stuff: in a java article i've read that hashcode should remain the same for the object lifetime (similarity to point 1.c). But when i created a byte[] array set vlues for them, then each value modification resulted in a new hashcode...

Can anyone descibe it in short and clear way what to do with equals and gethashcode - and also describe some risk factor for each special case?

thanx.

# July 28, 2007 3:17 PM

John G. said:

Ok I dumped this into a folder with three pictures and recived the following.  Do you wise ones have any suggestions for me?

Thank you in advance

John G.

Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately.

Compiler Error Message: CS0246: The type or namespace name 'com' could not be found (are you missing a using directive or an assembly reference?)

Source Error:

Line 52: using System.Web.UI.WebControls;

Line 53:

Line 54: using com.drew.metadata.exif;

Line 55: using com.drew.metadata.jpeg;

Line 56: using com.drew.metadata.iptc;

Source File: d:\hosting\jgarlie\Custom\2\album.ashx    Line: 54

# July 28, 2007 8:38 PM

Luke said:

I'm having what is probably a minor issue with the handler. I have it running on Windows Server 2003, and the index page of folder thumbnails comes up fine, but it won't do anything else. When I click on any of the folders, nothing happens. This seems like a Javascript issue as no ASP errors come up. Have tried it in several different browsers just to be sure. Anyone know of a simple fix before I start digging into the code?

# July 29, 2007 11:25 AM

Bertrand Le Roy said:

Nicholas: no, IE doesn't use any of .NET or Windows Forms.

# July 29, 2007 7:22 PM

Bertrand Le Roy said:

Luke: do you have a url where I could have a look at that?

# July 29, 2007 7:23 PM

Bertrand Le Roy said:

John: you forgot to drop the meta data extractor dll into the applicaiton's bin folder.

# July 29, 2007 7:25 PM

Bertrand Le Roy said:

Vladimiro: err, it is a simpler solution, but to a completely different problem so I'm not sure what you mean here...

# July 29, 2007 7:33 PM

Bertrand Le Roy said:

Ajoka: those rules really apply to value types and similar entities. All your examples are pure reference types for which equality and hash codes are associated to the reference, not to the state, and should not be overridden under normal circumstances.

# July 29, 2007 7:44 PM

Alberto said:

In order to apply the patch, I am attempting to download the Microsoft Ajax Library (ajax.asp.net/.../default.aspx), and I get a 197 KB file, "MicrosoftAjaxLibrary.zip". When attempting to open it either under Vista or XP, I get "The compressed (zipped) folder ... is invalid". WinZip gives a similar error indicating that "it does not appear to be a valid archive".

It looks like the zip file at ajax.asp.net somehow got corrupted. Is there any other location where I can find the needed files?

# July 30, 2007 5:03 AM

Numabilis,Numabilis said:

Beaucoup de blogueurs influents m'insupportent de plus en plus. Entre les sujets repris de blog en blog sans apporter la moindre information, les interviews croisées entre blogueurs influents, les billets type &laquo; 10 astuces pour faire parler de,Beaucoup

# July 30, 2007 2:01 PM

Bertrand Le Roy said:

Alberto, you're right. I've sent mail so that this gets fixed.

# July 31, 2007 2:23 AM

Axeman said:

Ok first and foremost thank you for this awesome app!

Now I've been trying to get this to work but to no avail. The issue I'm having is that it is scanning all my folders. I only need it to scan one specific folder and all subfolders under it. When I move the .ashx file and page to the folder that I want to show (meaning the main folder or first folder that should display) all I get are X's for all the images. Any ideas?

Also, for those interested in changing the background color and aren't necessarily using a "named" color they can substitute the

Color BackGround = Color.Black

for

Color BackGround = ColorTranslator.FromHtml("#XXXXXX")

Where the X's stand for the Hex code of the color.

Any help for my issue described above would be great!!!

# July 31, 2007 8:55 PM

Bertrand Le Roy said:

Axeman: you can try to see what the response was using Firebug or Fiddler for those images. I'd guess a trust level mismatch with your configuration. We can also continue this conversation offline (bleroy at microsoft dot com)

# August 1, 2007 2:12 AM

Rafal said:

how can the google Sitemap be done with Futures? It seems it only suppoorts Windows Live. It also talks only about searching your site, not sitemap...

Does anybody has source code of this?

# August 1, 2007 3:14 AM

Bertrand Le Roy said:

Rafal: I confirm that the site map stuff is now in Futures.

quickstarts.asp.net/.../searchsitemaps.aspx

# August 2, 2007 3:19 AM

Abhishek said:

Hello everybody,

  I have used iframe shim to show div on top of select box. but I have found a strange problem, if you scroll in IE6, select box comes on top of iframe/div and as soon as you stop scrolling, again select box hides behind iframe.

I have checked lots of examples over net but didn't find anyone discussing this issue and it is reproducible for every iframe shim example.

I have a report page with lots of select boxes in one column and other column has a floating div. floating div when expanded should come on top of select box. everything looks okay until you scroll, but during the time you scroll, select box flickers and comes over iframe.

please suggest me.

thanks.

# August 2, 2007 10:39 AM

Steve Bird said:

I have a custom validator and I want to do an ajax call to the server and perform some validation using server side scripting. In my case the script is not known at build time.

I need to set args.IsValid before the client side validation returns. I was doing this via a synchronous ajax call.

How could I achieve this with a async ajax call?

# August 3, 2007 9:29 AM

Steve Bird said:

Just noticed that Martin Smith has asked the same question :)

# August 3, 2007 9:51 AM

Brandon said:

My wiimote isn`t working and I put more than 1 pair of new batteries in. What`s wrong?

# August 3, 2007 12:23 PM

Gerald said:

Has the link been fixed yet?

# August 3, 2007 4:33 PM

Bertrand Le Roy said:

Gerald: I've reported the problem. It should have been fixed by now but hasn't for some reason. I've reported it again a few minutes ago and it's being investigated (it doesn't reproduce consistently). Sorry about that and thanks for your patience.

# August 5, 2007 2:20 AM

Bertrand Le Roy said:

Brandon: I have a feeling Nintendo's support would be much better qualified than I to answer this...

# August 5, 2007 2:22 AM

Kalyan said:

<td width="34%" height="24" >

<select id="Supra" name="Supra" class="bx2" onchange="commonupdate(this)">

 <option> </option>

 <option value="Vesicular">Vesi</option>

     <option value="Amphoric">Amp</option>

     <option value="Bronchial">Bron</option>

     <option value="Cavernous">Cav</option>

     <option value="Tubular">Tub</option>

  <option value ="Bronc"> Bronchovascular</option>    

   </select>

    </td>

I have like this in my xsl sheet,when i select a div onmouseover is overlapping with these select boxes,can any one suggest how to avoid overlapping a div from select boxes for internet explorer any version if possible,required for IE6..amarindia108@yahoo.co.in

Thanks...

# August 5, 2007 6:04 AM

Bertrand Le Roy said:

Kalyan: Err, not to be rude, but the only thing I can suggest is that you read the post...

# August 5, 2007 9:29 AM

Prasad said:

hi  bleroy,

       thats a wonderful article... its still not working...the code is given below

Session.Add("registrationinformation", userinfo)          Response.Redirect("0.0.0.0/abac.aspx", False)

the above code runs in a iframe tag and its not working ...as you have said the session data is being lost even though i said in the same way.Can u suggest me how can i resolve it?

it worked fine in local address but on production server it fails when i give ipaddress for redirecting to the next page in registration?

thanks for your support

# August 6, 2007 10:49 AM

Bertrand Le Roy said:

Prasad: what's this 0.0.0.0 in your code? Redirecting with a fully-qualified address is probably the problem here. If it's identified by the browser as the same domain, you only needed a relative address and if it's not, it's rightfully not serving the same cookies. In other words I would expect this to fail.

# August 7, 2007 2:36 AM

Prasad said:

hi bertrand

     thanks for the reply,

-----> for security reasons i have changed the ip address and the page name else they are fine.All pages are in the same domain and in the same folder .

-------> Here i am loading full application in an iframe .do you think that can cause issues because without iframe everything works just fine?  

---->In FIREFOX it works even inside iframe & not in IE .

But when i enable cookies from all sites in my IE then my application works again.(my application is currently not certified so is IE may be prohibiting something ????)Can u make me clear about this strange behavior?

----->Can u please suggest me the solution to redirect page in a iframe when i use cookies like in login or registration .

---> i am using asp.net1.1

thanks in advance..

# August 7, 2007 9:43 AM

Bertrand Le Roy said:

Prasad: again, I think it's because you're fully-qualifying the domain. Can you try with relative addresses instead of always specifying the domain as part of the url?

# August 7, 2007 5:55 PM

cnblogs.com said:

作者: Truly 日期:2007.8.5 首先我们要遵循JavaScript注释规范,详见 ScriptDoc 和 weblogs.asp.net/.../2007

# August 8, 2007 4:56 AM

Kevin said:

Thanks Bertrand, seems to work ok.

So if we update to Orcas or update to the newest version of Ajax when it comes out, should this issue be fixed? Thanks.

# August 8, 2007 9:01 AM

Prasad said:

i tried intially using relative addresess it failed so tried the below it works fine

Server.Transfer("~/default.aspx");

but once i am logged on when i try again to click on a link made from anchor tag with link like "userdata.aspx" then i lose session data and get redirected to the login  page due to loss of session data due to a bug in IE

"Session variables are lost if you use FRAMESET in Internet Explorer 6" and link is shown below

support.microsoft.com/.../en-us

so i am planning to create privacy policy for my website hoping  then my application works fine .

thanks for help once again..

# August 8, 2007 9:04 AM

Steve Bird said:

I think i have managed to get my custom validation to work asynchronously, using the logic i found in ajaxaspects.blogspot.com/.../customvalidation-ajax-control-sample.html (CustomValidation AJAX Control Sample).

This sets the isvalid to true (not false as described above) if the user tabs away from the question. If the ajaxed question is the only question to fail validation and a next page button is clicked the page will post back to server, but since i re-apply the custom validation server side this is not a problem as a validation error message is still displayed.

So the Client-Side ASP.NET AJAX Validator triggers in most situations but a post back is performed (even thou valdiation fails) if the form is submitted. In this case an error is still displayed due to server side validation.

# August 8, 2007 9:37 AM

Bertrand Le Roy said:

Yes.

# August 8, 2007 3:11 PM

Bertrand Le Roy said:

Prasad: that's what I meant. Your code above seemed to imply that you had used the whole absolute thing with protocol, domain name, etc. This KB article seems to explain it, yes.

# August 8, 2007 3:13 PM

Beau said:

Great app!!!

Is there a way to pass a different stylesheet to the handler, or have it use a different background.  I have the app within a container on my home page and I would like to have it use a differnet background.  It keeps using the background image of the main page and I can't figure out how to change it.

thanks

# August 8, 2007 5:06 PM

Manoj said:

Great work!!! I want to definitely give it a try to integrate in my new Dating website! But before i start using the source code; is it permissible to use this code without any infringement of policies?

# August 8, 2007 10:15 PM

Truly said:

I modified sandcastle, then I generate a CHM for MicrosoftAjax.js, and I still working on it.

you can see the shots of the CHM from here:

www.cnblogs.com/.../849856.html

# August 9, 2007 11:15 AM

throwspoop said:

Great blog entry - good job of relating this to a well known and recognized eventing pattern. It helps my understanding of how the AJAX developers intended the framework to be used (and some ideas of how to extend some of the core components.)

One question regarding >> I also omitted the code that rewires the timeout for the next tick.

What did you mean by this? In my testing the event fires  at every interval and the folowing code seems to "rewire it":

>>this._pollCookie = window.setTimeout(this._pollDelegate, this._interval);

Thanks,

Jeff

# August 9, 2007 12:53 PM

Maria Kneipple said:

Thank you for this information. I've been going crazy trying to figure it out. I was wondering if you could guide me a bit on it, though.

I copied the external script files from the Ajax Library under MPSL to a folder in my website called Scripts. I tried to add the path to the ScriptReference (first to ~/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js and then to MicrosoftAjax.debug.js when the first didn't work), but I kept getting the sys undefined error. I then added it to the ScriptPath property of the ScriptManager as "~/Scripts" and it works, including fixing the access denied error. But when I try to load a page with toolkit controls, I get the message "AjaxControlToolkit is undefined".

How can I get them both to work? Thank you!

# August 9, 2007 2:09 PM

jim said:

did you try to recalibrate?     press the little button in that controller port area on the wii  then the little button in the wiimotes battery thingamigig  and presto you have a working mote   hopefuly

# August 9, 2007 2:33 PM

Maria Kneipple said:

I figured it out. The ScriptReference path is relative, so once I removed the tilde, it worked. Thank you!

# August 9, 2007 2:50 PM

John G. said:

Ok I got everything to run fine on my local machine.  When I publish to my site hosted by Godaddy.com I get a problem with the following code.  Apparantly they are not giving me rights to the temporary asp.net folder this is using.  Thanks in advance for your assistance.

Static IMagehelper()

{

..

..

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "Album");

                   Directory.CreateDirectory(_imageCacheDir);

This  is the error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

# August 9, 2007 10:48 PM

Bertrand Le Roy said:

Beau: the stylesheet is inside the handler. It's very easy to change.

Manoj: the license is MS-PL. See www.codeplex.com/.../License.aspx

John: there's a setting in the handler for the cache location. Disk only works if you have a high enough trust level. Memory and none works everywhere.

# August 10, 2007 1:44 AM

Bertrand Le Roy said:

Jeff: I omitted it from the code in the blog post, not in the full source code.

# August 10, 2007 1:49 AM

vent said:

I know this is not a new issue, but is there anyway to get into the contents of the frame whose contents seems to be from a different domain?  When i did ie.show_frames, the frame i want to access said permission denied.  I already tried to set Browser to the lowest security ( allowing cross domain access, put domain in whitelist, etc) no luck here.

This is not a problem when I tried in Firefox using FireWatir though. I have made some <a href="www.aftermarketperformanceparts.com/.../a> this on internet - I was able to change the domain for the page hosting the frame - however when I try to access the page within the frame I get "Access Denied " error.

# August 10, 2007 5:06 AM

MrVent said:

Man, your comments are really fast... It changes everytime I'm gonna refresh it..

# August 10, 2007 5:13 AM

IgorV said:

"Feel free to modify what you want. I'll also add the possibility to add the Google-specific information directly in the site map file."

--

Where is the source? Links are broken on all sites that reference "Bertrand Le Roy's" handler. Futures have very poor documentation on this subject, I wasnt ablet o make it work.

# August 10, 2007 10:24 AM

John said:

Where can I get the ASP.NET Alerts control since the gotdotnet site has been phased out?

# August 10, 2007 4:57 PM

John G. said:

ok I found it and changed it to memory and all is well.

Thank you

# August 10, 2007 8:48 PM

Shawn Burke said:

Awesome post Bertrand.

Bad friendly AI.  I love games that make me feel like it's not the whole world against me - Call of Duty 2 had some fantastic sequences that acheived this.

It's always incredibly frustrating when the bad guys are smart and are great shots, but your AI 'team mates' are stuck in the corner or running in circles, or worse, blocking you from getting to cover or in a door or whatever.

I'll pile on; Guitar Hero suffers none of these problems either. :)

# August 10, 2007 9:18 PM

Bertrand Le Roy said:

MrVent: browsers preventing script from accessing other frames that are in different domains is a very fundamental security feature, one of the things web security is built on. You may find some vendor-specific workarounds but there are also better solutions that rely on message-based communication between frames using url fragments. Microsoft Research has produced a technique called subspaces, and there's also some work being done around that in OpenAjax.

# August 11, 2007 3:10 AM

Bertrand Le Roy said:

John: I'm in the process of moving it to http://www.codeplex.com/alerts.

# August 11, 2007 3:12 AM

Bertrand Le Roy said:

Igor: the documentation is way better than what was available for this version (i.e. this blog post), see previous comment for a link.

I can make the source code for this old project available here but I really encourage everyone to use the Futures version.

# August 11, 2007 3:19 AM

Atteint de Javascriptite aiguë [Cyril DURAND] said:

Voici la réponse au Quizz JavaScript - gestionnaire d'evenements et boucles . Pour rappel la question

# August 12, 2007 10:55 AM

Atanas Korchev said:

Hi Bertrand!

Do you have any plans for the CompositeHierarchicalDataSource to support the LinqDataSource control from ASP.NET 3.5? Right now the CompositeHierarchicalDataSource control seems the only chance to get hierarchical support for the LinqDataSource control.

# August 13, 2007 4:13 AM

Bertrand Le Roy said:

Atanas: not for the moment but that's a good suggestion.

# August 13, 2007 5:07 AM

Snt said:

I have a question in the article its said that when we have a client call back the click event of a normal button with postback wont work... how can i fixed that problem i want to have some objects with client call back and some others with postbacks

# August 13, 2007 2:47 PM

Atteint de Javascriptite aiguë [Cyril DURAND] said:

Voici les réponses au Quizz JavaScript : objet et abonnement d'événement Le problème était encore à cause

# August 13, 2007 7:46 PM

Bertrand Le Roy said:

Snt: I don't know where you got this idea. There is no reason why postbacks wouldn't work normally even "when we have a client callback", although I'm not sure what you mean by that.

# August 14, 2007 1:22 AM

rabidrobot said:

The snipping tool is not installed by default with some Ultimate installations (maybe others?).  To enable it, go to Control Panel, select Uninstall Program then 'Turn Windows Features on or off'.  Once there enable the Tablet-PC Optional Components and click OK.

I actually had to do this twice, with a reboot in between, but it is working now.

# August 14, 2007 3:24 PM

Dee said:

Awesome....exactly what I was looking for.

# August 14, 2007 4:03 PM

Gregor Suttie said:

Oh i cant have anyone dissing gears of war - it just doesnt come out of my xbox disc tray end of - online its the best game out there by a long long way.

# August 15, 2007 9:54 AM

kaynin said:

dude its being painted

# August 16, 2007 3:41 PM

Bertrand Le Roy said:

Gregor: Gears is without a doubt a fantastic game. We both finished it at least once. It may be that it's so great that makes its few flaws so infuriating. It got so near to being perfect... You'll notice that most of the games we cite are actually very good games.

# August 16, 2007 4:40 PM

I’m CaLendarW Blog » Blog Archive » ASP.NET Event Validation said:

Pingback from  I&#8217;m CaLendarW Blog  &raquo; Blog Archive   &raquo; ASP.NET Event Validation

# August 20, 2007 11:37 AM

preishuber said:

why photoshop and not expression design?

you know ? "eat your own dog foot".

# August 21, 2007 1:55 AM

Bertrand Le Roy said:

Oh, good question. "Microsoft Expression Design is a professional illustration and graphic design tool". Expression Design is actually closer to Illustrator than to Photoshop if I'm not mistaken. Plus, I've owned a Photoshop license for years, way before Expression Design existed. I typically use LightRoom for my photo workflow and Photoshop for more complex editing.

# August 21, 2007 2:08 AM

Fabien said:

Joli modele :)

# August 21, 2007 2:49 AM

David Cumps said:

I think the image fits the title very well :)

I don't know if your previous skin was fixed width or not, but going to fixed width for a technical blog isn't something I'm a big fan off, have a look at some of your posts, with content being cut off due to this:

weblogs.asp.net/.../semicolon-expected.aspx

(link cut off)

weblogs.asp.net/.../how-to-work-around-the-quot-access-denied-quot-cross-domain-frame-issue-in-asp-net-ajax-1-0.aspx

(image cut off)

Go fluid width! ;) Also much nicer for the eyes in my opinion (take a look at mine for a full width example), I find it calming when there's more space

But, your opinion might differ of course :)

# August 21, 2007 3:11 AM

Donny said:

A really cool photo plus your wife has done a great job carving that pumpkin! Great work!

# August 21, 2007 3:21 AM

Bertrand Le Roy said:

David: it's a good point for the image. On the other hand, I think a small width helps keeping the site easily readable and comfortable. I like the layout of your blog too but what I'm not a big fan of is horizontal (and even vertical) scrollbars on code samples...

# August 21, 2007 3:28 AM

Florian said:

C'est fun et ça change !! C'est vrai que ça fait du bien ! Joli travail M'sieur. En revanche j'en aurai peut-être profité pour modifier le fond et les couleurs de textes.

J'aime bien le titre aussi :-)

# August 21, 2007 3:37 AM

David Jourand said:

Nice design, very nice title ;-)

# August 21, 2007 4:31 AM

Cyrille said:

Great work but i think you have to add a link to the homepage behind the title of your blog.

# August 21, 2007 7:32 AM

Garbin said:

Very nice :)

# August 21, 2007 7:51 AM

John Lam said:

Love the title. I still don't have the guts to change the title of my blog to: 00000000-0000-0000-C000-000000000046 :)

The only downside of the title is:

a) I (and a lot of other people) tend to name feeds in their blog reader based on the name of the author

b) Various search engines really prioritize keywords that shows up in <title> tags ...

# August 21, 2007 12:36 PM

A reader said:

How about posting some content?  Those of us that just subscribe to your RSS feed could care less what you did in Photoshop.

# August 21, 2007 12:58 PM

InfinitiesLoop said:

Haha I love it... I was thinking a while ago, Bertrand needs to change the name of his Blog. It's not called Atlas anymore, afterall :)

Now I'm jealous of your non-standard header...

# August 21, 2007 1:24 PM

IntelliDesign said:

Oh man... it's so cool that I forgot what the old title was already ;) And yes... the banner goes pretty well with the title.

# August 21, 2007 1:33 PM

Bertrand Le Roy said:

Cyrille: done, thanks for the feedback.

John: good points about the title, but the previous one had the same problems and I'm still fairly easy to find in search engines. For your a) point, I would tend to agree, and I usually rename such blogs in my RSS reader, but the temptation of this title was just too great to resist, so I'll do with the drawbacks. So that's what happened to "less is better" then, eh?

A reader: you're absolutely right, and I apologize. I've been on a parental leave for a month, which explains the lack of content these last few weeks. Contents will be back soon.

# August 21, 2007 1:49 PM

Kirti Deshpande said:

We are not evil Bertrand =). It is all fair in love, war and business. The carved pumpkin is awesome.

# August 21, 2007 2:17 PM

George said:

Any reason why this would work on one IIS server, but not work when moved to a different IIS server?

I'm using iframes and after a login I set a session variable and then refresh the page using Response.Redirect("~/Default.aspx", False)

This works ok on the first server, but when I tried to move the web site to another server, the login is unsuccessful (it seems that it's not setting the session variable or the session variable is being lost after redirect).  Is there an IIS setting somewhere that might control this?

Thanks

# August 21, 2007 3:50 PM

Bertrand Le Roy said:

George: there's probably a difference in config between the two. Are these the same versions of IIS, both fully updated?

# August 21, 2007 4:20 PM

Count Gamula said:

Gears of War is a pile of Llama crap sauteed in camel urine...PS - Halo called and would like it's match making system back...

# August 21, 2007 4:34 PM

George said:

Same versions of IIS (5.1) and I've looked at the settings in IIS Admin and they're the same. Is there any other way to refresh the page without creating a new session?

Using Server.Transfer("~/Default.aspx") refreshes the Default.aspx page and recognizes that the session variable has been set, however the iframe contained in Default.aspx (which may or may not have refreshed as well, I can't tell) doesn't recognize that the session variable has been set.

Thanks again.

# August 21, 2007 5:12 PM

A reader said:

Didn't realize you were on leave, my mistake.  Looking forward to new content!

# August 21, 2007 6:01 PM

Bertrand Le Roy said:

What about web.config? Can you try to reproduce the problem without the iframe?

# August 21, 2007 6:30 PM

Tomas said:

Very intriguing. I like it. Congrats on a new family addition.

# August 21, 2007 10:14 PM

Kelly White said:

If you currently don&#39;t read Betrand Le Roy&#39;s blog then you need to start. I started reading it

# August 22, 2007 12:09 AM

allan said:

Hi, where can I get the source code so I can modify it on .Net 1.1? I works fine on .Net 2.0, but I want to add this feature to my old project. Thanks a lot!

# August 22, 2007 10:20 AM

George said:

web.config is equivalent across the two machines. and yes, without the iframe, the problem still exists on the one machine.

something i forgot to mention is that when viewed in firefox, the site works from both machines. it's only when viewed using IE that the site doesn't work when served from one of the machines.

this article (support.microsoft.com/.../en-us) lead me to believe it was some sort of IE security setting, but I tried the resolutions listed in the article and was unsuccessful.

# August 22, 2007 10:49 AM

George said:

Hate to bug you again but I just realized something about the two servers that might be important. The one that works is on a different domain than the one that doesn't work. Could there be some sort of group policy being applied on one of the domains that is setting security on IE that interferes with sessions/cookies?

# August 22, 2007 11:57 AM

Luis Abreu said:

cool...i like it :)

# August 22, 2007 11:58 AM

Robert Macnair said:

I get this error...

Error 1 The type or namespace name 'Directory' does not exist in the namespace 'com.drew.metadata' (are you missing an assembly reference?) C:\Users\Rob\Documents\Visual Studio 2005\WebSites\PhotoAlbum\album.ashx 58 45 C:\...\PhotoAlbum\

sorry im new to all of this and am probably being really stupid. Ive put the DLL into the Bin folder and the other errors went ragarding this reference, but this one has stayed

Thanks!

# August 22, 2007 1:14 PM

Bertrand Le Roy said:

Allan: I haven't had time to migrate the source code yet, but I will in the following days. Sorry about the delay.

# August 22, 2007 2:49 PM

Bertrand Le Roy said:

George: At this point I would contact support. I'm sorry I don't have any better insight for the moment.

# August 22, 2007 2:50 PM

Bertrand Le Roy said:

Robert: that's weird. Are you sure you included the same version of the dll that came with the release file? Just unzipping the release in a web app should works out of the box. Does it or did you do something different from that?

# August 22, 2007 2:53 PM

Robert Macnair said:

D'Oh i was being an idiot...

I went to the link, clicked on the 'Source' tab and downloaded that. it only came with a samples folder etc and was wondering was was going on.

I must be needing sleep!

Thanks for the help Betrand

# August 22, 2007 6:58 PM

Terri Morton said:

Regardless of the new name, my feed reader will forever know you as "More Atlas stuff". :-)

I like it.  Much better than mine.

# August 22, 2007 11:54 PM

Ludovic said:

"Tales from the Evil Empire".... What, you're working for Apple now? :)

# August 23, 2007 2:20 AM

Robin Debreuil said:

Totally love it. Awesome job on the pumpkin too.. It is perfect Evil Empire - smiling like all customer focused companies - because it enjoys squeezing blood through your eyes ; ).

# August 23, 2007 6:56 PM

BIG DOE said:

I have an intranet site, and all i did was dumped the files that I downloaded into a folder in the intranet site.  Is that sufficient?

I get this error:

Parser Error Message: The file '/Intranet/album.ashx' does not exist.

Although the file is obviously there.  Is there something i have to do with the dll?

thank you.

# August 24, 2007 4:45 PM

Bertrand Le Roy said:

Big Doe: the dll just needs to be in the bin folder. If you downloaded the release file and uncompressed it into a folder that's configured as a web application, it should work directly.

# August 24, 2007 4:56 PM

John Williams said:

Used this to get a an Ajax enabled page working through a PageViewer web part. It worked like a charm and really saved my hide.

Thanks.

# August 24, 2007 7:06 PM

vidya said:

Found the Alert source code still not migrated to codeplex,when can i expect it?

# August 24, 2007 11:56 PM

Bertrand Le Roy said:

Vidya: it's in now. Thanks for your patience.

# August 25, 2007 1:30 AM

» ASP.NET Alerts available with source code on CodePlex said:

Pingback from  &raquo; ASP.NET Alerts available with source code on CodePlex

# August 25, 2007 2:52 AM

Steve Worthington said:

Hi there,

Informative blog and good examples thanks.

I hear what you are saying about using the Futures release and I have implemented using the Dynamic provider.

However I can find little documentation apart from the Quick starts. All of which seem to depend on a web.sitemap file being in existence, when really I want to create that on demand too.

So I have gone back to a custom handler for the google sitemap. Keen to hear if you know of any links to other implementations of the Dynamic provider.

Cheers,

Steve

# August 26, 2007 2:16 AM

Aaron said:

First off, thanks for sharing your time and effort -- a much needed control.

I've downloaded and run the sample Alert.aspx page and am noticing that it displays all button configurations in IE fine, but in firefox the only thing I can get rendering is "OK / Cancel" or just "OK" regardless if buttons="AbortRetryIgnore", it renders as ok / cancel. Is this just a browser limitation and so to be totally browser compatible I'll have to assume that users are only seeing 2 buttons which might only say "OK / Cancel"?

Not a terrible thing, but a developers is always concerned with the lowest common denominator. Thanks!

# August 26, 2007 11:28 AM

Christopher Steen said:

Link Listing - August 26, 2007

# August 26, 2007 12:08 PM

BIG DOE said:

Hi, sorry for my ignorance on this subject, but do I need to configure it as a web application on the web.config file?  I have created a application pool called "photoalbum" in IIS 6, although Im not sure its necessary.

If this is to be done on the web.config file, where on the file do I configure it?  thank you so much for everything!

# August 27, 2007 10:49 AM

BIG DOE said:

Thanks for everything, i figured it out.  It was not hard at all actually.  I placed the dll in the bin folder and make sure of the path of the ashx file on the default.aspx file, and viola!  thanks for everythign all, this is awesome!

# August 27, 2007 11:12 AM

BIG DOE said:

Sorry for being such a nusance, but how do I control it so that when you go to for example: album/default.aspx, the folder view only shows folders inside of the album folder, and not the folders of the entire web directory?

Right now, the bin folder is in the intranet/bin folder so everything under intranet is being shown in the folder view. Thank you so much.

# August 27, 2007 11:34 AM

hyphapy said:

最近在使用Asp.NetAjax1.0的框架,遇到了在不同域名下抛出

# August 27, 2007 11:56 AM

Bosker seth said:

select box is display over the div. How to overcom that

# August 27, 2007 12:27 PM

Bertrand Le Roy said:

Steve: the Futures implementation can use any site map provider. Read this to learn how to implement your own:

msdn2.microsoft.com/.../system.web.sitemapprovider.aspx

# August 27, 2007 1:57 PM

Bertrand Le Roy said:

Aaron: The control currently uses IE's modal dialog feature, which is not in Firefox. That's why the control downgrades to regular text alerts in this case. Ideally, the control would use a simulation of modal dialog such as the one in the ASP.NET Ajax Control Toolkit but I didn't have time to go that far.

# August 27, 2007 2:00 PM

Bertrand Le Roy said:

Big Doe: just put the handler in the folder where you have the photos (don't move anything else, just the ashx. If you're using the handler as a control (and apparently you are), there is a bunch of properties on it, in particular HandlerUrl and Path, which should enable you to do that.

# August 27, 2007 2:10 PM

Bertrand Le Roy said:

Bosker: please read the post before posting a comment. Not to be rude but that's exactly what it is about.

# August 27, 2007 2:11 PM

Rama Krishna Vavilala said:

Thanks Bertrand!

We are truly honored that you and Scott wrote the foreword for us.

# August 27, 2007 4:36 PM

» ASP.NET Ajax in action available said:

Pingback from  &raquo; ASP.NET Ajax in action available

# August 27, 2007 5:13 PM

Madtown said:

I am very excited to find this program and it does exactly what I need to show photos of our work to customers (and especially potential customers!). My only problem is that it is displaying all of our directories (ie Admin, Secured, etc) on the main page. How can I restrict it to only look for pics in specific folders such as "WorkPics"? I wish I knew as much as you guys!

# August 27, 2007 11:00 PM

Marc said:

Very good patching!

App now works smoothly

# August 28, 2007 3:46 AM

George said:

Finally got it to work.

First I had to add this line to the web.config file right under the <system.web> tag:

<sessionState cookieless="true" timeout="20"></sessionState>

Then I changed my Response.Redirect calls to this:

Page.Response.Redirect(Page.Request.Url.AbsolutePath(), True)

Maybe someone out there has the same problem and can try this workaround to solve it.

# August 28, 2007 11:22 AM

Bertrand Le Roy said:

Madtown: see above comments. Big doe had almost the  same question.

# August 28, 2007 1:13 PM

BIG DOE said:

A quick question:

I want to have some one click on a link that will take them to one of the folders in the album, is there a way to reference it?  Through a href like ...default.aspx?folder="vacationfolders"

Thank you, and sorry if these questions are juvenile, I am very new to this.

thx again.

# August 28, 2007 1:54 PM

Bertrand Le Roy said:

Big Doe: take a look at the Permalink property on the control. If you're using it as a handler and not as a control, just copy the url.

# August 28, 2007 2:00 PM

BIG DOE said:

Thanks for the reply, but where can i get the url of the specific folder?

right now I have the link set to:

intranet/album/default.aspx?"albummode=preview&albumpath=vacation"

This is the right syntax?

vacation is the name of the folder.

I cannot get this to work, please help!  =(

# August 28, 2007 2:26 PM

Bertrand Le Roy said:

Why the quotes? I suppose it should work without them. The PermaLink property should just give you the right url iirc.

# August 28, 2007 2:29 PM

BIG DOE said:

thanks again, I hate to be pestering you with stupid questions, but how do you use the permalink property to give me the right url?  =(

I guess this will help many other novices as well.

# August 28, 2007 2:38 PM

Bertrand Le Roy said:

You set the NavigateUrl of a hyperlink control to its value for example.

# August 28, 2007 2:53 PM

BIG DOE said:

IM sorry, i am about to give up.  Where in this area do I set it?

<body>

   <form id="form1" runat="server">

       <photo:album runat="server" ID="Album1" />

   </form>

</body>

# August 28, 2007 3:07 PM

Bertrand Le Roy said:

From memory and in C#:

<photo:album runat="server" id="Album1"/>

<asp:hyperlink runat="server" id="Permalink" Text="Permalink"/>

<script runat="server">

protected override void OnInit(EventArgs e) {

 base.OnInit(e);

 Permalink.NavigateUrl = Album1.PermaLink;

}

</script>

# August 28, 2007 3:12 PM

Chocolim said:

Anything is better than IE

# August 28, 2007 3:27 PM

Sashidhar said:

I am completely new to DotNet..can anyone give me exact flow of asp.net page?

# August 29, 2007 6:49 AM

sunil Kumar said:

Creating Confirm box in ASP.Net Page

Step 1:  

Create an input hidden htmlcontrol:

<input type=”hidden” name=”hdnValue”>

hdnValue control will store the Boolean value from confirm box and we ca easily get this value in Page load method.

Step 2.    

Create a script in aspx.cs file like:

String myscript=@”< script language=”javacsript”>

Function myconfirmation ()

{if (confirm(“Do you want to delete ?”))

{

document.forms[0].elements[“”hdnValue””].value=””true””;

 Document.forms [0].submit ();

}

}

myconfirmation ();

</script>”;

Step 3:

Call this script  where you want to get confirmation box

RegisterStartupScript ("myscript", myscript);

Step 4:

Page_load method get the boolen value

if (Request ["hdnValue"]! =null && Request ["hdnValue"].Length>0)

{ //do something if confirmation is yes

}

# August 29, 2007 1:30 PM

Shauheen said:

Thanks, It fixed the problem! Hope that MS would release some official patch as well, I assume there are plenty more to be fixed!

# August 29, 2007 2:49 PM

Bertrand Le Roy said:

Shauheen: it's already patched in all recent versions of ASP.NET Atlas.

# August 29, 2007 5:15 PM

Bertrand Le Roy said:

Sashidhar: that's exactly what the diagram is. For more details, please consult MSDN:

msdn2.microsoft.com/.../ms178472.aspx

# August 29, 2007 5:17 PM

Madtown said:

I am able to run the .ashx fine, but when I try to run the template page it gives me the Image-not-found signs where the photos should be. Once you navigate to the actual photos to enlarge them they appear ok. suggestions? I moved the .ashx to the /images directory but left all the other files in the main directory.

# August 29, 2007 10:18 PM

Arnout Symoens said:

Bertrand,

this is great ! Saved my project !

Regarding your last comment, that it's already patched, I'm not sure.

It still didn't work today :)

But your patch solved it ! Thanks !!!!

Arnout Symoens

# August 30, 2007 10:15 AM

Bertrand Le Roy said:

What I mean by "all recent version", I mean everything that shipped from Orcas Beta 1, but that doesn't include 1.0 even though it can still be downloaded. Version 1.0 remains unpatched and will remain that way.

# August 30, 2007 11:07 AM

Bertrand Le Roy said:

Madtown: This happens when you don't have sufficient priviledges to write thumbnails to the temporary directory. You can check that by trying to browse directly to the url of one of the thumbnails and check the error message.

The workaround is usually to set the application to high trust, or if you can't, switch the caching mode in the handler's configuration from disk to memory or none.

# August 30, 2007 11:17 AM

Ikeer Savage said:

Bertrand,

 Thank you very much. The patch worked like a charm.

# August 30, 2007 12:52 PM

Tales from the Evil Empire said:

Yes. This being out of the way, let me explain why (just in case you haven't read one of the million

# August 30, 2007 6:06 PM

Seven deadly sins of game design - Tales from the Evil Empire said:

Pingback from  Seven deadly sins of game design - Tales from the Evil Empire

# August 30, 2007 6:57 PM

Collin said:

Talked me into checking it out.

# August 30, 2007 8:17 PM

Gregor Suttie said:

I concur captain in everything you say - its a joyous thing to play Bioshock.

( if you take back your criticisms of Gears Of War we may be back on an even keel <g>)

G

# August 31, 2007 8:11 AM

Some Guy said:

You forgot #8: SecureROM.  This allows me to warez the game.  Developers, include that garbage in your game, just gives us "users" a green light to warez it!

# August 31, 2007 10:29 AM

Bertrand Le Roy said:

Gregor: I loved Gears, but it does have a few flaws, like its checkpoints and unskippable cut-scenes right after the checkpoints (it's so simple to put them *before the checkpoint* (or allow us to save anywhere)).

Some guy: while I agree that some protection systems on PC range from annoying (activations for example) to unacceptable (when they are rootki-like), they are just one more reason for me to play on 360 and never on the PC. Furthermore, there is no rootkit in Bioshock PC. The security system may be annoying and may restrict reselling options but it doesn't justify piracy. I think you're just making excuses for being a thief.

# August 31, 2007 1:30 PM

InfinitiesLoop said:

A worthwhile ENDING should be on the list if you ask me. All that work, I expect a fanfare of a cut scene at the end with some huge cliffhanger for the next game. The ending of Gears was... not that. Final Fantasy games are the goto games for great endings if you ask me.

Don't tell me you already finished Bioshock?

I haven't even purcahsed it yet... definitely next on my list though.

# August 31, 2007 1:36 PM

Bertrand Le Roy said:

Dave: no, I'm not quite done yet but I've seen enough of the game to make an opinion, and my friend Fabien finished it last night. The end of Gears was ok. Just ok.

Go buy Bioshock now, you've got three days to play it full-time. Seriously, you'll thank me.

# August 31, 2007 1:47 PM

RichardC said:

Hi Bertrand,

Bioshock is now available in France. But do you run it under XBox 360 or PC?

Under PC, rumors says that you must have a really, really fast computer.

# September 1, 2007 3:18 AM

ddbEntertainment said:

Insanely irritating. I have an iPaq 2215 and like you I don't want it to sync with the damn PPC. I just want that damn message to go away!

# September 1, 2007 7:19 PM

OpenSource Connections » Blog Archive » Javascript Intellisense, Documentation, & Visual Studio 2008 (Orcas) said:

Pingback from  OpenSource Connections  &raquo; Blog Archive   &raquo; Javascript Intellisense, Documentation, &#038; Visual Studio 2008 (Orcas)

# September 2, 2007 2:38 PM

Hiran Karunananda said:

i used "BLOCKED SCRIPT'&lt;html&gt;&lt;/html&gt" to fix my div overlapping with iframe in https. when i checked with my local machine iis it works perfectly wihout giving any 'non secure items' alert. but when i save file into my test server alert will popup. so i like to know if any configuration change needs to fix this issue or any other thing??

please some body have an idea would be really appreciated.

# September 3, 2007 9:07 AM

anothr user said:

One new subscriber from Anothr Alerts

# September 3, 2007 10:58 PM

Dave Parslow said:

Very memorable title!  Your title is much better than the other blogs mentioned.  By the way, interesting is that 1 Infinite Loop is Apple Computer's corporate address.  I would agree that your blog could be a bit wider, although 100% width might not be the best.  Do you have your blog on an analytics engine to examine your audiences' browser settings for width?

# September 3, 2007 11:11 PM

Collin said:

OK, I checked it out.  I have plenty of opinions.  So far the game play is great.  It's lacking the frustration factor for sure.

Gears of War was just too darn easy and seemed way to short.. But then maybe I was just too into it to let up till I was done with it.  Either way the cut scenes were no where near as bad or frustrating as they are in COD3.

Bioshock does have plenty of redeeming factors and is certainly on my top list of single player games.  Gears is also up there.  COD3 is the better multi-player game with Gears sucking ass and losing big points for 3rd person view which is NOT EVER good for multi-player.  Bioshock has no multi-player (that I am aware of) which is a shame but they beat out the competition for playability while stoned and or drunk.

Perfect game design is a long way off and while I agree Bioshock is terrific game design I worry that it's because we have been so used to poor game design .  It's to the point where so much attention is given to the look that they forget the feel.

I will give Bioshock big time props for how much they packed into the game without overloading us too much.  Nothing is worse than taking a winning game like Ghost Recon and turning it into a pile of crap with GRAW.  

I love Bioshock's story line also.. that is just a great idea of a submerged city.  I can't wait to see where the story is going to lead me.

Is it just me or did they steal a bit of the beel of this game from Fallout 2?  That is an old game that has a post-apocalyptic feel and very similar 50's style advertisements and such..  very different games but similar feel.

# September 4, 2007 12:02 AM

Gregor Suttie said:

Bioshock is just such a great game - Arcadia with the Lost style violin music is quite scary and when the kid on dead guys jumped up I literally jumped off my seat - that'll teach me not to play it up at a high volume.

The visuals in the games are getter better and better. Setting your foe on fire then shot gunning them, setting a swarm of bees on them and then clubbing them with a spanner is just great fun.

# September 4, 2007 10:05 AM

Bertrand Le Roy said:

Richard: I run it on Xbox.

Collin: the ads do look very much like the Fallout ones, yes.

# September 4, 2007 3:50 PM

Bertrand Le Roy said:

Hiran: your message doesn't make it clear if you included both quotes around the html tags (I don't see the second one). The idea here is to use the javascript protocol and return a literal string that contains emtpy html.

# September 4, 2007 3:53 PM

Bertrand Le Roy said:

Dave: thanks for the kind comments. Good point about analytics, I should definitely do that. When I find time. :/

# September 4, 2007 6:07 PM

Marcelo - UruIT .NET Outsourcing said:

Hi, I would like to know if this control works with AJAX.NET inside an AJAX Update Panel.

Do you know of any workaround to my problem? I was injecting literals to the page with the JS code, but it doesn't work with Updates Panels :(

Thanks in advance,

Marcelo

# September 5, 2007 8:51 AM

Bertrand Le Roy said:

Marcelo: no, this control was developed way before UpdatePanel and doesn't currently work with it (though I would gladly accept a contribution to the project that makes it work).

You can read this to learn more about how to make controls work well with UpdatePanel:

weblogs.asp.net/.../What_2700_s-up-with-UpdatePanels-and-how-come-nothing-works_3F00_-Or_3A00_-A-brief-explanation-of-how-UpdatePanel-works-by-the-guy-who-wrote-the-feature.-_2800_Long_21002900_.aspx

and

weblogs.asp.net/.../HOWTO_3A00_-Write-controls-compatible-with-UpdatePanel-without-linking-to-the-ASP.NET-AJAX-DLL.aspx

# September 5, 2007 12:17 PM

Morten said:

Is there a way to document the parameters a handler function should take for events? I want to specify that for instance the first argument will be the sender object of some type, and the second will be the event argument that is an object with a couple of named fields.

Let's say this is how I fire my event:

 var handler = this.get_events().getHandler('valueChanged');

 if(handler) handler(this,{"oldValue":3,"newValue":7});

...it would be great if I could document what types the two arguments are, and what fields the second argument contains.

# September 5, 2007 1:14 PM

Bertrand Le Roy said:

Morten: Yes, I agree. Thanks for the suggestion.

# September 5, 2007 1:28 PM

DROCK said:

I just resolved the 'sys' undefined error by removing ALL line breaks from microsoftajax.js.  The file as downloaded from Microsoft has 2 line breaks in it.  I'll never get those days back..

# September 5, 2007 7:30 PM

Bertrand Le Roy said:

What???

# September 5, 2007 7:42 PM

IanC said:

I tried the onenote suggestion but I get a completely white screen. If I capture the area (in white) where I want, I get a nice bacl capture. (Using Vista Ultimate on a 3 screen system with dual NVIDIA cards). Wouldn't mind so much if the snipping tool doesn't tell me that it's "not working just now".

# September 6, 2007 9:01 AM

Gregor Suttie said:

The one ommission from perfect game design in my opinion is online multiplayer - my xbox live friends have been asking me lately what is bioshock like, I tell them its fabulous and the first and only question that they really wanna know is - "can you play it against others?" - for me this is what makes a game more complete - playing Gears for example online throws up a different type of animal every single time you play it - even playing against the the same friends every night Gears is still fantastic.

Imagine playing Bioshock online with the ability to take each other on with plasmids and download new maps and potentially different tasks to take on.

Gears as a 1 player game does have a few minor annoyances but online its da bomb and will continue to be number 1 game on xbox live for a while (until halo 3 of course).

# September 7, 2007 3:45 AM

Bertrand Le Roy said:

Gregor, I disagree. I think it's doing what it does perfectly. That doesn't mean that you couldn't add to it and make it even better but the online component for example is something that would be great for some people (me I couldn't care less, I don't have fun with competitive multiplayer) but not having it doesn't make the solo campaign (what it is) worse. What I'm trying to say is that the point of the article was to determine if and how Bioshock does what it does badly, well or perfectly. Perfect doesn't mean it can't be improved or added to :) It means that nothing gets in the way of the fun.

If you asked me, what I would add to Bioshock first would be cooperative multiplayer.

# September 7, 2007 1:11 PM

Bertrand Le Roy said:

Oh, and Gregor, my friend Fabien who is very much into competitive multiplayer games doesn't quite agree with you on multiplayer Gears, which he rarely plays. He seems to prefer Rainbow Six Vegas. Did you check this one out?

# September 7, 2007 1:13 PM

Peja K said:

How do I know if I'm running AJAX Beta 1?

# September 7, 2007 6:01 PM

Bertrand Le Roy said:

Peja: look in add/remove programs

# September 7, 2007 6:14 PM

Sean said:

Please consider implementing the following:

Most ajax History solutions run into problems if the user hits refresh (all history entries are lost).  

Another major headache is that the programmer has to write a lot of code to reproduce the page state of each page.

A way to fix all these problems (including ones mentioned in your article) is to have your Ajax History Control create a virtual cache of each Ajax page on the server during postback.  

This accomplish many things.  First - the programmer would not have to write code to reproduce page state when the Back Button is hit.  Second - if the user hits Refresh - and you cached history entries - you simply have the client browser rebuild the history entries.

Just a thought.

# September 7, 2007 6:38 PM

buzz said:

Αν θεωρείς κακό μπελά την ιστορία της έκτης, oh boy/girl, you 're so naive. Σε web developers απευθύνεται αλλά αφορά όποιον αναρωτιέται "Μα πόσο άχρηστοι είναι που δεν δουλεύει με όλους τους browser".

# September 8, 2007 5:43 AM

Jason Haley said:

# September 8, 2007 10:05 AM

4 Links Today (2007-09-08) said:

Pingback from  4 Links Today (2007-09-08)

# September 8, 2007 11:20 AM

Dave said:

I have an iPaq rz1715 and get the same message.

# September 8, 2007 7:14 PM

Tales from the Evil Empire said:

The guitar Harmonix chose for the Xbox 360 version of Guitar Hero II is not exactly my favorite guitar

# September 10, 2007 1:31 AM

Flash said:

There's already been several history tools developed for Adobe Flash which has historically had exactly the same problems as AJAX.

# September 10, 2007 5:36 AM

evalotta said:

Thanks very much for your article. It was really helpful to fix the problem. Keep up the good work :)

# September 10, 2007 10:19 AM

Firefox said:

Great post on managing across several browsers....

# September 11, 2007 12:39 AM

Steve said:

Wow, looks like quite a hack.

The trouble with these approaches are that when browser updates come out it could break an entire application built with this history.

Seems there could be a better solution.  I'd look at it from an IIS perspective not a client browser perspective.

Utilize what is least likely to change.

# September 11, 2007 9:01 AM

Bertrand Le Roy said:

Steve: you're absolutely right those techniques are hacky and are commonly broken by new browsers (Opera 9.23 and Safari for Windows proved it recently as the article points out. On the other hand, vendors are now aware of how Ajax applications rely on url hashes to manage history and are less likely to break them in the future. Also, Ajax in general relies on a lot of browser hacks and it's perfectly ok as a developer or an organization to say that it's not suitable or too risky for a particular project.

But if you can afford to take that risk, here's how it's done.

I'm not sure what you mean by "look at it from an IIS perspective".

# September 11, 2007 1:33 PM

Rick Strahl said:

Dude - you have WAY too much time on your hands.

Then again I remember doing something like this to a real flying V at some point, he he...

# September 11, 2007 4:10 PM

Bertrand Le Roy said:

Rick, I totally disagree with you. I need *a lot* more time...

# September 11, 2007 4:14 PM

Steve said:

I didn't mean to be condescending - thanks for the follow up response.  It is an interesting topic.

# September 11, 2007 7:29 PM

Bertrand Le Roy said:

Steve: I didn't think you were, don't worry.

# September 11, 2007 7:34 PM

Eric Lippert said:

Do you always give out awards without telling the recipients?

:-)

Glad you like it.

# September 13, 2007 3:58 PM

Michel Baladi said:

Works like a charm - thanks!!

# September 13, 2007 4:29 PM

Ajax Girl » Blog Archive » How to build a cross-browser history management system said:

Pingback from  Ajax Girl  &raquo; Blog Archive   &raquo; How to build a cross-browser history management system

# September 14, 2007 8:41 AM

Dylan Schiemann » Blog Archive » browser history: a pot meets kettle story said:

Pingback from  Dylan Schiemann  &raquo; Blog Archive   &raquo; browser history: a pot meets kettle story

# September 14, 2007 12:40 PM

Javascript News » Blog Archive » How to build a cross-browser history management system said:

Pingback from  Javascript News  &raquo; Blog Archive   &raquo; How to build a cross-browser history management system

# September 14, 2007 3:03 PM

napyfab:blog» Blog Archive » links for 2007-09-14 said:

Pingback from  napyfab:blog&raquo; Blog Archive &raquo; links for 2007-09-14

# September 14, 2007 7:40 PM

Deficiencias en algunos exploradores - Incubaweb 2.0 Bit??cora del Software, Web 2.0, Beta, Windows, Linux, Mac OS X, Open Source, .... said:

Pingback from  Deficiencias en algunos exploradores - Incubaweb 2.0 Bit??cora del Software, Web 2.0, Beta, Windows, Linux, Mac OS X, Open Source, ....

# September 15, 2007 12:49 PM

Weekend Links - Windows & PHP, Vista-Style CSS Toolbar, Facebook Applications, CSS/DOM File Inputs, Browser History | BluDice Blog :: PHP, MySQL, CSS, Javascript, MooTools, and Everything Else said:

Pingback from  Weekend Links - Windows &#038; PHP, Vista-Style CSS Toolbar, Facebook Applications, CSS/DOM File Inputs, Browser History  | BluDice Blog :: PHP, MySQL, CSS, Javascript, MooTools, and Everything Else

# September 15, 2007 2:10 PM

Neil Jenkins said:

A couple of weeks ago I needed a history manager for a photo gallery I was working on and finding no satisfactory solutions I did a bit of research myself. I came to more or less the same conclusions as you did but I did find a solution for Opera. Simply define a global callback function (I called mine $justForOpera) and inject the following image into the document (hidden with appropriate CSS) with the following magic src: "javascript:location.href='javascript:$justForOpera();';". This will fire every time the back/forward button is pressed: works like a charm.

I have a working History Manager with full compatibility with IE6+, Firefox 1.5+, Opera 9+ and Safari 2. It's based on the mootools library but it should still be fairly easy to understand. photogallery.neilj.fastmail.fm/revision5js/HistoryManager.js">photogallery.neilj.fastmail.fm/.../HistoryManager.js. You can demo it at photogallery.neilj.fastmail.fm/revision5

I hope this helps!

# September 15, 2007 7:08 PM

David Cumps » String Concatenation vs Memory Allocation said:

Pingback from  David Cumps  &raquo; String Concatenation vs Memory Allocation

# September 16, 2007 1:34 PM

CumpsD said:

I've done some tests as well, on the memory usage of various string concatenation methods, might be a useful addition to your research: blog.cumps.be/string-concatenation-vs-memory-allocation

# September 16, 2007 1:52 PM

Julien Lecomte said:

Using about:blank or that "magic" url simply does NOT work. The first state does not get stored! The ONLY way I know to make this work FULLY on IE is to use an IFrame in the markup (do not create it dynamically) and point it to a real file on the server. After that, you can do some document.write. Also, the YUI history library works perfectly well on Safari 2. Look at the source code to figure out how it's done.

Cheers!

# September 16, 2007 3:57 PM

  links for 2007-09-17 by The Third Part said:

Pingback from  &nbsp; links for 2007-09-17&nbsp;by&nbsp;The Third Part

# September 17, 2007 4:20 AM

Anonymous said:

When is support for v1.0.61025 of the extensions going to be available.  Check out Codeplex and please respond to inquiries!!

# September 17, 2007 11:52 AM

Bertrand Le Roy said:

Julien, thanks for the comment. You are absolutely right, on the first request, the frame needs to point to an existing file on the server, the magical url doesn't quite work at this point (it does later). Just to be clear, our history manager *does* work on Safari 2 and the article explains how. It's Safari 3 beta for Windows that currently has a problem.

Updating the post to take your comment into account...

# September 17, 2007 1:06 PM

Bertrand Le Roy said:

Neil: thanks for the trick. It does work. I'll update the article, but I probably won't integrate that into the product as the bug seems to be fixed in Oera 9.5.

# September 17, 2007 1:52 PM

Dave said:

I don't know about going forwards but going backwards I can vouch for the fact that for IE 5.5 I was better off leaving it off. We had a lot of weird script engine issues that were only happening in code where we had the attribute - took it out and magically the problem was solved.

# September 17, 2007 5:04 PM

Venk said:

im getting sys.undefined only in firefox and not in ie can u help me out with this

# September 18, 2007 2:48 AM

GH said:

I have been coding in Script since IE3 and I never saw problems with IE5.5 by including a type OR language attribute - I'd suggest any issues Dave encountered might be to do with use of non-standardised (i.e. non W3C compliant) script.  I used XML DOM, DHTML, XSLT, etc with IE5.5 and never once had a problem by including type="text/javascript" in the tag.

Although use of the language attribute is somewhat deprecated, given the number of browsers that are still out there which support different combinations, I still think it's good practice to at least include a type attribute in script tags, and I will continue to do so - after all, what if, for example, someone disables javascript but has VBScript enabled - if that's possible - oh dear - big hole in Mr Crockford's plan perhaps?

# September 18, 2007 7:01 AM

Yves said:

@Dave : The futur of the internet is not based on IE 5.5 -_-

# September 18, 2007 7:28 AM

BIG DOE said:

Thanks for all your help.

One more question. =)

What part of the code would you have to change in order to make it so that if you click on the thumbnail, a new window pops up with the photo?

Thank you so much in advance, this is an awesome tool.

# September 18, 2007 9:45 AM

Brett said:

It doesn't appear in my limited testing, that IE supports either application/javascript or application/ecmascript.

This page appears to confirm:

www.robinlionheart.com/.../scripts

I'll probably just use text/javascript for now.

# September 18, 2007 11:25 AM

Bertrand Le Roy said:

Brett, you're right, I'm an idiot and I've updated the post.

# September 18, 2007 12:49 PM

Bertrand Le Roy said:

Venk: you probably introduced a syntax error while patching the file. Please double-check.

# September 18, 2007 2:24 PM

Bertrand Le Roy said:

Big Doe: look for the GenerateFolderPage method. Then look for the loop over images that's in there. In there, you can see code that renders the A tag. Add a target attribute in there and use "_blank" as the value. That should work. If you want more control over the size and appearance of the new window, you may want to use an onclick instead and some basic window.open javascript.

# September 18, 2007 2:32 PM

Douglas Crockford said:

You can violate RFC 4329 or you can violate XHTML 1.0 or you can fail on some browsers. You must choose one. I find it is best to ignore XHTML because it isn't going to happen anyway. We are stuck with HTML.

# September 18, 2007 4:01 PM

Scott said:

"in the future browsers won't support other scripting languages"

On one hand, I understand why we want to think about what future browsers will/won't support. A lack of that kind of thinking got us, the web developer community, into a mess 5-7 years ago.

But there's lot of things, plugins and what not, that browsers might not support in the future. Should we ignore all of those things now? No.

The biggest problem I had with Crockfords statement is that he didn't present any negative effects of using the "type" attribute. He didn't have an example of something breaking or not working because the tag had a "type" declared. I don't see any reason to not use the type attribute.

# September 18, 2007 4:29 PM

BIG DOE said:

Thanks Betrand Le Roy:

This is what I have:

writer.RenderBeginTag(HtmlTextWriterTag.A);

writer.AddAttribute(HtmlTextWriterAttribute.Target, "_blank", true);

The second line should create a new window when the user clicks on the thumbnail, no?  I saved the ashx file and it still showing in the same window. Anything I am doing wrong?

Thank you so much!

# September 18, 2007 4:36 PM

Bertrand Le Roy said:

Douglas: all that's true, but not everyone may have the luxury of ignoring XHTML. Many administrations have this as a requirement. Also, even if some browsers *cough* IE *cough* don't support XHTML, it's still very useful in situations where you need the markup to be a dialect of XML for whatever reason.

For me, violating RFC 4329 is by far the least of those three evils: (almost) no one can afford to fail on IE, many people can't afford to ignore XHTML and there is no big disadvantage in violating RFC 4329.

Just trying to present people with the options and what they imply.

Thanks for the comment!

# September 18, 2007 5:36 PM

Bertrand Le Roy said:

The attribute has to be written *before* the tag.

# September 18, 2007 5:39 PM

Shanmuganathan said:

Hi,

       I hav a situation that i need to open a file in specific program... For example i have a Text file(Notepad) and Onclicking,it must get opened in Notepad... How do i do that in ASP.Net using C#..

and also i need to download multiple file in ASP.Net... If u have any articles or codes regarding this send to me...

Im expecting ur reply...

Regards,

Shanmuganathan

# September 19, 2007 5:35 AM

BIG DOE said:

Worked Perfectly!  THanks alot!  Our entire office is going to love this, I'll make sure the wonderful person(s) behind this awesome program be known.

# September 19, 2007 8:45 AM

Milan Negovan said:

Bertrand, why does iframe have to be static? I've managed to dynamically insert one into DOM and point it to an existing file (!) just fine (it was a centered AJAX progress indicator, not a history control, though).

I documented my struggle here: aspnetresources.com/.../always_set_iframe_source.aspx

# September 19, 2007 10:23 AM

Bertrand Le Roy said:

Shanmuganathan: you're terribly off-topic ;)

Please send me mail using the contact form on this blog and I'll give you an answer offline.

# September 19, 2007 1:47 PM

Bertrand Le Roy said:

Milan: it's fairly easy to build an iframe dynamically, even without a physical page to point at (just use the magical url). But you can't use it for history management. Sorry about the misunderstanding.

# September 19, 2007 1:50 PM

InfinitiesLoop said:

You should do this to a controller :)

# September 20, 2007 12:40 AM

Bertrand Le Roy said:

Ah, Dave, you must be reading my mind...

# September 20, 2007 1:09 PM

steve johnson said:

Here's one more, when you know the variable

exists, but the value is undefined.

if (undefined != var)

# September 20, 2007 2:33 PM

おぎわら@.NET道場 Blog(わんくま編) said:

[Tips][記事リンク](ASP.NET)ブラウザの履歴管理

# September 21, 2007 1:22 AM

おぎわら@.NET道場 Blog(わんくま編) said:

[Tips][記事リンク](ASP.NET)ブラウザ種類別の履歴管理表

# September 21, 2007 1:30 AM

PKINTAL said:

How to create aspx pages Dynamically?

# September 21, 2007 6:50 AM

Ernie Malagrida - at Ernest.Malagrida@eot.state.ma.us said:

Hi,

I am looking to do the following:

I have a gridview and each row has a checkbox.

If the user does not check at least one checkbox,

I want to display an alert message that at least

one box must be checked.

Any help would be appreciated.

Thanks,

Ernie

# September 21, 2007 9:55 AM

Bertrand Le Roy said:

PKINTAL: this is off-topic. Please send me mail through the contact form of this blog and I'll give you an answer offline.

# September 21, 2007 12:33 PM

Bertrand Le Roy said:

Ernie: I don't think you can do that without writing some specific client-side script except if you're willing to do that during a postback, in which case you can look through your checkbox controls and call show on the alert from the server side if necessary.

# September 21, 2007 12:42 PM

Techy News Blog » OpenAjax InteropFest 1.0: Microsoft's entry said:

Pingback from  Techy News Blog &raquo; OpenAjax InteropFest 1.0: Microsoft&#39;s entry

# September 21, 2007 5:04 PM

Microsoft News Aggregator » OpenAjax InteropFest 1.0: Microsoft's entry said:

Pingback from  Microsoft News Aggregator &raquo; OpenAjax InteropFest 1.0: Microsoft&#39;s entry

# September 22, 2007 1:07 AM

OpenAjax InteropFest 1.0: Microsoft's entry : Celebrity News Corner said:

Pingback from  OpenAjax InteropFest 1.0: Microsoft&#39;s entry : Celebrity News Corner

# September 22, 2007 3:32 AM

Brad Abrams said:

Recently Bertrand posted OpenAjax InteropFest 1.0: Microsoft's entry . The OpenAjax's InteropFest 's

# September 23, 2007 10:11 PM

MSDN Blog Postings » Microsoft Passes the OpenAjax InteropFest Test said:

Pingback from  MSDN Blog Postings  &raquo; Microsoft Passes the OpenAjax InteropFest Test

# September 23, 2007 11:23 PM

Noticias externas said:

Recently Bertrand posted OpenAjax InteropFest 1.0: Microsoft&#39;s entry . The OpenAjax&#39;s InteropFest

# September 24, 2007 1:26 AM

Brian Otten said:

I've implemented the Ajax patch and so far so good. But I'm pretty sure that the fix has not been implemented in the AjaxControlToolkit.

I've just downloaded the 9/20/2007 build and I'm still getting the 'Access denied' error when viewing my app within a Sharepoint PageViewer web part. I'm about to grab the source code and do the changes manually and rebuild.

Can anyone else confirm that the current AjaxControlToolkit still has the issue? I can't find squat about it on the CodePlex Issue Tracker.

# September 24, 2007 3:36 AM

Scott Barnes said:

heh, i love the title dude as I at times often wonder if *some* folks online think we do actually belong to the evil empire...well now i can point those to this blog ;P

-

Scott.

# September 24, 2007 6:04 AM

Bertrand Le Roy said:

Microsoft joins several other companies and open-source projects in meeting OpenAjax guidelines.

Microsoft has passed the OpenAjax Alliance's suite of interoperability tests to prove that its software can interoperate with other parts of the OpenAjax ecosystem.

# September 24, 2007 1:39 PM

Kirti Deshpande said:

Is this the Toolkit issue you are looking for? www.codeplex.com/.../View.aspx It was fixed as far as I can see in changelist # 17775. But it seems like people are still seeing it though: www.codeplex.com/.../View.aspx. We will look into the problem.

Thanks,

Kirti

# September 24, 2007 1:50 PM

Joe Chung said:

It's JSON-like syntactically but not as flexible as JSON.  You can neatly nest JSON within JSON, for instance.  Nesting object-initialized anonymous types, on the other hand, sounds like it could get pretty messy, syntactically speaking.

For a IDictionary<string, string> parameter, JSON is overkill, but it's a nice substitute for XML, especially in Web browsers where XML support is spotty and inconsistent *cough* where's E4X, IE? *cough*.

I'm just waiting for some standards body to come along and ruin the party for us all by coming up with some JSON-Schema specification. ;)

# September 24, 2007 8:08 PM

Missing Features » Solving the Top AJAX Usability Problem: The Back Button said:

Pingback from  Missing Features &raquo; Solving the Top AJAX Usability Problem: The Back Button

# September 25, 2007 12:52 PM

Infinities Loop said:

This question comes up from time to time , to time . If you understand how redirects work, then you also

# September 25, 2007 2:02 PM

Kari said:

I'm also looking for a solution to the problem posted above by Abhishek.  I have a Div that appears on top of some selects.  They are all hidden fine by the iframe (which I have inside the div) but as soon as you scroll the page the selects show through, and stay there. Unfortunately I have to support IE5.5 and 6.  Any ideas?? (other than the ugly method of hiding each one of the selects)

# September 25, 2007 2:07 PM

Ali Khalid said:

Thanks. This solution helped me a lot.

# September 26, 2007 3:39 AM

Techy News Blog » Getting AJAX defined… said:

Pingback from  Techy News Blog &raquo; Getting AJAX defined&#8230;

# September 26, 2007 4:54 AM

MSDN Blog Postings » Getting AJAX defined... said:

Pingback from  MSDN Blog Postings  &raquo; Getting AJAX defined...

# September 26, 2007 5:25 AM

voip » Getting AJAX defined... said:

Pingback from  voip &raquo; Getting AJAX defined...

# September 26, 2007 11:40 AM

Fine Art » The format for JavaScript doc comments - Tales from the Evil Empire said:

Pingback from  Fine Art &raquo; The format for JavaScript doc comments - Tales from the Evil Empire

# September 26, 2007 11:54 AM

Christian Toivola said:

Are you referring to parameter currying? similar to passing in a hash (more or less)?

# September 26, 2007 12:46 PM

BlackIsle Forever said:

Bioshock is too far away from perfect game design.

Hacking by using water-pipe combinations and also steam powered machine guns which can identify friendly and foe  are far too imaginative. They tried to create a world but could not keep it consistent.

Many things Bioshock claims to have innovated, especially A.I behavior, is already existent in many games. The mini helicopter guardians (i name them like that) are obviously inspired from the manhacks of half life 2.

It has many faults.

Also I always think that the most important sin of modern game design is the "story(fiction)" and the enviroment. Look at fallout it has pages of story behind it (before the game) and the game is based on that (even though you encounter the total story or not).    

# September 26, 2007 3:16 PM

Bertrand Le Roy said:

Christian: not quite currying, but passing a hash, yes.

# September 27, 2007 12:32 AM

Bertrand Le Roy said:

BF: "far too imaginative"? Since when is being imaginative a flaw? I don't think it's inconsistent. Unlikely maybe, but it's a game, it doesn't have to be likely to be immersive. Underwater skyscraper city? Not very believable from the start but *who cares*?

Not innovative? No, it's not (except for the checkpoint system). I don't think they claimed to have invented new AI behavior or the hovering thingies. I'd go so far as saying that if you've played System Shock or Deux Ex, you've pretty much already played Bioshock. But that's not the point. The point is that Bioshock delivers brilliantly and does what it does perfectly. It's no revolution, but it resets the standard to which future shooters will be evaluated.

What are those faults that you allude to?

I'm not following your point on story and environment. Do you mean the story and environment in Bioshock leave to be desired? That would be funny.

# September 27, 2007 12:42 AM

.net DEvHammer said:

Via Christopher Steen : Microsoft Passes the OpenAjax InteropFest Test Recently Bertrand posted OpenAjax

# September 27, 2007 10:42 AM

Dev Girl said:

I'm having the same problem as madtown.  I put the ashx file in the folder with the images i want to display and i have changed the handler's configuration from disk to memory and none.  It still doesn't show the pictures until i click the last one.

Otherwise this is a really cool program.  Thanks :)

# September 27, 2007 2:35 PM

Bertrand Le Roy said:

Dev Girl: please contact me through the contact form of this blog, and I'll have a look.

# September 27, 2007 3:21 PM

nkrick said:

I am using the photo handler on Whiist and am having a problem loading the "medium" sized images.  All of the thumbnails generated fine.  When I click on many of the thumbnails though, I do not get a medium size image and the next picture link does not load either.  All that is on the screen is the "back to folder view" link and "previous picture" link.  I have noticed that the pictures that do not load medium sized images are ones that have been modified and saved in Picasa (but not all images saved from Picasa have this problem).  Does this not work with certain compression levels?  or is there another problem?

# September 27, 2007 3:27 PM

Bertrand Le Roy said:

NKrick: I don't know of any such problems but I'd love to have a look at one of those images and try to figure it out.

Please send me the url using the contact form.

# September 27, 2007 3:34 PM

Dev Girl said:

Actually I just figured it out.  Thanks for the quick response. It looks great!!

# September 27, 2007 3:40 PM

Nick said:

I have tried everything with this problem - still no good. It really seems to be to do with IE and cookies - which is frustrating. Have a look at my post in ASP.NET forums - lots of detail on my problem.

forums.asp.net/.../1931020.aspx

I'd love some help...

thanks,

Nick

# September 27, 2007 11:20 PM

Phil Fostini said:

Just a quick question. I have 70 pictures in the share folder but only 22 show up on the web page. Am I missing something? I am using Windows Home Server RC1. My page is the above URL. I also posed this question on Andrew Grant's site.

I like how easy it is to use.

# September 27, 2007 11:52 PM

Bertrand Le Roy said:

Are all 70 photos .jpg files?

# September 28, 2007 2:14 AM

Phil Fostini said:

Actually 18 are jpeg and the balance is bitmap. Is that where I have gone wrong? The bitmaps are 1,800 - 2000 KB and the jpegs are 130 - 200 kb.

# September 28, 2007 9:37 AM

Bertrand Le Roy said:

Phil: yes, the handler only takes jpg files.

# September 28, 2007 12:03 PM

The ServerSide Interoperability Blog » Sample of Ajax interop said:

Pingback from  The ServerSide Interoperability Blog &raquo; Sample of Ajax interop

# September 28, 2007 4:08 PM

Phil Fostini said:

Thanks, I converted all to Jpeg and they all show up now

# September 29, 2007 11:06 AM

Programming said:

Recently Bertrand posted OpenAjax InteropFest 1.0: Microsoft&#39;s entry . The OpenAjax&#39;s InteropFest

# September 29, 2007 7:39 PM

josh said:

actually the print screen key is used to copy the image currently seen on the monitor so you can paste it in a word document or e-mail.  because you go writing articles maybe you should figure out how to fully use the keyboard.

# September 30, 2007 6:28 PM

Bertrand Le Roy said:

<g>, thanks Josh! Maybe because you go writing comments you should figure out how to read a post.

# October 1, 2007 2:02 AM

Morten said:

I've created a set of webcontrols that registers scripts (both at runtime and designtime), and these scripts also reference other scripts using the <reference assembly.../> tags.

When I add the webcontrol to the page, I would think that the scripts also gets included in the page so I get intellisense on them, but apparently not.

I might be doing something wrong, but if not, I'd like to see this kind of support in Orcas too.

# October 1, 2007 3:55 PM

Bertrand Le Roy said:

Morten: you can get Intellisense on those files by including an explicit script reference to the page.

# October 1, 2007 3:57 PM

Gaidar Magdanurov said:

Коллеги Брэд и Бертранд написали о возможности использования Microsoft Ajax для работы с сообщениями OpenAjax.

# October 2, 2007 9:58 AM

Noticias externas said:

Коллеги Брэд и Бертранд написали о возможности использования Microsoft Ajax для работы с сообщениями

# October 2, 2007 10:16 AM

I don't get the weird imagecrack to work said:

I've been trying to fix Opera support with this timer method for a long time now. I've noticed that timing only stops when the hash or adress changes. I think it would be prefereble to run the timer in a seperate page in a third iFrame on the page where the URL doesn't change. Reaching the timer is probably a little tricky, but for someone who can code well it's no problem i think. I have no idea if this works, but it seams logical enough to me..

# October 2, 2007 4:04 PM

Stève said:

Thank for this, scanpst did the job for my OST this morning

# October 2, 2007 11:45 PM

Robin Debreuil said:

wow, that is big news!

# October 3, 2007 1:34 PM

Martin Bennedik said:

This is great news. I remember the source code was shipped with the good old MFC. There was even a book "MFC Internals" which was a guide line to the MFC source code. Very good if something doesn't work as expected.

# October 3, 2007 2:15 PM

nikunj said:

I need .NET framework sample code

# October 4, 2007 12:48 AM

Runi Thomsen said:

Thank you - you just saved my day :-)

Worked great!

# October 4, 2007 9:17 AM

Max said:

I have the same problem with simple ASP, but I solved with a strange and unexplicable solution: I simply call the sessionId on top of page, with no precise function:

i simply write

SessionIdNumber=Session.SessionId

and all the following session values are not lost

?!?

# October 4, 2007 12:29 PM

M Anderson said:

A little more explaintion of the fix for black background on thumbnails please tried

Found a little bug/annoyance - im posting it here since gotdotnet will phase out in a few days(19th of June 2k7). in CreateFolderImage you didnt fill in the BackGround - thus using any other background than black will look wierd :-O I added this to fix it: g.FillRectangle(new SolidBrush(BackGround), 0, 0, size, size); Right after the stacked Graphcis has been declared (was line 477 of the .ashx file for me - v 2.1 of the handler) :-)

but did not change anything

# October 4, 2007 7:26 PM

h1pchek said:

Kari,

put a onresize sniffer in there:

window.onresize = moveWindow; //move popup if resized

var popDialogueDiv = document.getElementById('popDialogueShadow'); //positioned content div

function moveWindow() { //check to see if popup is showing before moving

   if (popDialogueDiv != null && popDialogueDiv.style.display == 'block') {

       findPos(hrefLocation);

       }  

}

i then coded the findPos function to move the iframe/contetnDiv.  you still get a flicker of the select boxes showing through, but it isn't as bad b/c of IE's quick redrawing.

# October 5, 2007 11:03 AM

Bertrand Le Roy said:

M Anderson: thanks, but this is a known issue (and the project moved to Codeplex long ago):

www.codeplex.com/.../View.aspx

# October 5, 2007 1:06 PM

wojtek said:

Bertrand,

Thanks for your work, but it wold be nice if you could break this article into parts and post updates in separate posts instead of cramming everything into this post and changing it around, it's hard to read and hard to follow.

I also believe "current state" should be a summary of how to make it work, sort of an abstract or outcome of your search - now it's just a reference to the article, which like I said is pretty hard to follow (I read the original, now I have to keep coming back to read again and again).

I wouldn't mind an edit that says click here for follow up, then the rest posted in new articles.

Cheers

Wojtek

# October 7, 2007 11:27 AM

jigar said:

So what is the best way to reject scripts in input? anyone please...

# October 7, 2007 8:46 PM

Bertrand Le Roy said:

Well, I prefer to have all the information in a single place. Thanks for the comment.

# October 8, 2007 12:50 AM

Bertrand Le Roy said:

Jigar: do you mean in an html input tag? Then use an asp:textbox, or just html-encode the value when rendering it.

If you mean in input data in general, the trick is to always use a technique that makes it impossible in the current context to inject code. That means parameters  in SQL instead of concatenation, HTML-encoding when rendering HTML, etc. Finally, validate input through a white list.

# October 8, 2007 12:55 AM

danilm said:

Hi, I have the same problems with

"using com.drew.metadata.exif" error.

I've downloaded latest album files (AlbumHandler2_1), extracted to wwwroot.

May I have to do anything else in IIS? (winxp)

thanks

# October 8, 2007 3:09 AM

Bertrand Le Roy said:

Danilm: I'll give you the same answer I gave to other users who had the same problem and which you can read above... You probably forgot to copy the dll into the bin directory.

# October 8, 2007 3:13 AM

danilm said:

I'm sorry but I have copied the dll into the bin directory and it doesn't work

is the right version: 2.2.2.41745?

I've downloaded AlbumHandler2_1 that contains all the files and folders

thanks

# October 8, 2007 4:57 AM

Bertrand Le Roy said:

Is the bin directory directly below the IIS application folder?

# October 8, 2007 12:35 PM

alejo699 said:

I must agree, Bioshock is as close to perfect a game as I have seen.  If one looks hard enough one can nitpick some flaws, but why would one want to?  To prove one's world-weariness, perhaps, or to demonstrate one's own inability to enjoy life?  I don't know.

As for BlackIsle's comment, yes, it's true:  Steam-powered guns are not likely to have IFF.  However, if you examine any game's "reality" quotient, you'll find it coming up short.  The bottom line is, if a game requires a single player to kill hundreds or thousands of foes it is NOT realistic.

Yes, Bioshock borrows from other games, including its own predecessor, just as most games do.  The difference is that Bioshock took many disparate ideas and created a more immersive world than any of the others have.  - And yes, I am including Half Life 2 in that, even though I love it dearly.

# October 9, 2007 7:58 PM

H Nguyen said:

Congrat!

Keep up the good work.

# October 9, 2007 10:39 PM

Angelina Fernandes said:

I tried using the onresize event ..it failed to work with me. so instead i captured the onscroll event. works  perfect now. let me know if anyone foresees the code failing.

angie

# October 10, 2007 4:23 AM

sebax said:

man, you really do not belive yourself, pls stop wasting your time...

# October 10, 2007 7:31 AM

Brad Abrams said:

Almost a year ago Microsoft joins the OpenAjax Alliance , then a month ago, Microsoft Passes the OpenAjax

# October 10, 2007 11:45 PM

Noticias externas said:

Almost a year ago Microsoft joins the OpenAjax Alliance , then a month ago, Microsoft Passes the OpenAjax

# October 11, 2007 12:12 AM

varma said:

can anyone tell me whr i can find abt noise generated from tidal plants...any link or smthing...

# October 11, 2007 1:12 AM

Dmitry said:

Another solution to the problem when you scroll the page with DIV above SELECT boxes:

simply make onScroll handler, that changes something in the page, for example, add a hidden div:

<div id="dummyDiv" style="display:none;"></div>

add onScroll handler:

function fixIe6Scroll(){

document.getElementById("dummyDiv").innerHTML="something";

}

document.body.onscroll=fixIe6Scroll;

the SELECT boxes still flicker, but it's not a big deal.

Hope it helps.

# October 11, 2007 2:22 AM

MSDN Blog Postings » Microsoft Joins the OpenAjax steering committee said:

Pingback from  MSDN Blog Postings  &raquo; Microsoft Joins the OpenAjax steering committee

# October 11, 2007 2:23 AM

HG said:

Thanks Bertrand for your article, but in my case the fix simply doesn't work. I've tried to call Redirect with false, set a dummy session variable and nothing. I'm really at a loss here.

I have a Login page, from which the user goes to a main admin page (default.aspx), which has 2 buttons, one that opens an Orders page, the other one an Artists page.

Here is some of my code:

In Login:

   protected void Page_Load(object sender, EventArgs e) {

       if (!IsPostBack) {

           string previousPageCode = Request.QueryString["p"];

           switch (previousPageCode) {

               case "o":

                   adminLogin.DestinationPageUrl = "~/admin/Orders.aspx";

                   break;

               case "a":

                   adminLogin.DestinationPageUrl = "~/admin/Artists.aspx";

                   break;

               default:

                   adminLogin.DestinationPageUrl = "~/admin/Default.aspx";

                   break;

           }

       }

   }

   protected void adminLogin_Authenticate(object sender, AuthenticateEventArgs e) {

       Admin adminUser = new Admin(adminLogin.UserName, adminLogin.Password);

       if (adminUser.IsAuthenticated) {

           e.Authenticated = true;

           Session["theAdminUser"] = adminUser;

       }

   }

In default.aspx:

   protected void Page_Load(object sender, EventArgs e) {

       Admin adminUser = Session["theAdminUser"] as Admin;

       if (adminUser == null || !adminUser.IsAuthenticated) {

           Response.Redirect("Login.aspx", false);

       }

   }

   protected void btnOrders_Click(object sender, EventArgs e) {

       Response.Redirect("Orders.aspx", false);

   }

   protected void btnArtists_Click(object sender, EventArgs e) {

       Response.Redirect("Artists.aspx", false);

   }

   protected void btnLogOut_Click(object sender, EventArgs e) {

       Session.Remove("theAdminUser");

       Response.Redirect("Login.aspx");

   }

And in Artists.aspx (Orders.aspx is similar):

   protected void Page_Load(object sender, EventArgs e) {

       Admin adminUser = Session["theAdminUser"] as Admin;

       if (adminUser == null || !adminUser.IsAuthenticated) {

           Response.Redirect("Login.aspx?p=a", false);

       }

       lblErrMsg.Text = "";

       if (!IsPostBack) {

           //...

       }

   }

   protected void btnAdmin_Click(object sender, EventArgs e) {

       Response.Redirect("Default.aspx", false);

   }

   protected void btnLogOut_Click(object sender, EventArgs e) {

       Session.Remove("theAdminUser");

       Response.Redirect("Login.aspx");

   }

# October 11, 2007 11:36 PM

Giumi said:

It works but I get a strange javascript error: Unspecified error.

Can anyone help me? Thank you!

# October 12, 2007 8:11 AM

Bertrand Le Roy said:

HG, we should take that offline. Please contact me through the contact form of this blog.

My question would be why you don't use Forms authentication instead of rolling out your own that has hard-coded pages and that is unlikely to be easily maintanable in the long run?

# October 12, 2007 2:21 PM

Gabe Misura said:

How about we do what so many business people ask: Get rid of the back button? heh.

We write web_apps_, in non-webapps, are there usually back buttons? Is there still a need to have the back button?

I still use it, so I'm sure it would be very hard to break everyone's habit of using/needing it.

# October 14, 2007 1:58 AM

Bertrand Le Roy said:

Gabe: the problem is that you can't get rid of it, so you might as well make it do something useful.

# October 15, 2007 1:42 PM

Atteint de Javascriptite aiguë [Cyril DURAND] said:

En JavaScript, il y a 2 grandes façons de faire une classe : le mode prototype et le mode closure . Méthode

# October 16, 2007 8:48 AM

Revenge said:

Yup same thing her on XP2SP2 with an iPaq 2215. I do sync, but not in WMP, just Outlook. No way to get rid of the message while device is docked. I hate MS sometimes.

# October 16, 2007 11:44 PM

John said:

I have read through the post and all of the comments numerous times.  I am very confident I have patched MicrosoftAjax.js and MicrosoftAjax.debug.js correctly.  No typos or anything.

I have the 10920 release of the toolkit, so it has the similar bug removed there as well.

I have followed the steps to apply the fix exactly, using the ScriptReference technique.  But I still get 'Sys' and 'Type' errors as others have noted when I run the application locally from Visual Studio 2005.  Whenever I do that my app always loads and gives these errors when I use the CalendarExtender control.  It doesn't matter if I am running in debug or not.

However, if I publish to my test server, things run fine there.  My test server does not have AJAX Extensions installed.  I'm a publishing them in my /bin directory along with the AjaxControlToolkit and also the System.Web.Extensions folder with the patched .js scripts.

# October 18, 2007 5:30 PM

Bertrand Le Roy said:

John: you should check with a tool such as Firebug, Fiddler or Nikhil's browser helper if the script files are actually downloaded. I'm suspecting that you have a path inconsistency between what you specified in the script reference and the physical location of the file.

# October 18, 2007 5:51 PM

Morten said:

I especially like how IE handles stack overflow. *POP!* and IE is gone...

Stack overflow is actually a faster way of closing down IE than clicking the close button :-)

# October 18, 2007 6:25 PM

Bertrand Le Roy said:

Errr, Morten, which version of IE are you using? I'm getting the error message in a dialog and it doesn't crash.

# October 18, 2007 6:39 PM

John said:

Thanks, Bertrand.

Fiddler showed that I was receiving a 403 error when trying to pull the MicrosoftAjax.js file from my /bin/System.Web.Extensions/1.0.61025.0 directory.  Made perfect sense once I saw it.  The internal web server in Visual Studio 2005 is apparently blocking that folder, but on my test server I can get to the file.  In order to avoid the problem altogether, I moved MicrosoftAjax.js and MicrosoftAjax.debug.js to a new folder in my project named /Scripts and updated my script reference appropriately.  Everything works just fine now, both locally and on the test server.

Regards,

John

# October 18, 2007 7:59 PM

Erjan said:

I prefer using elementID_EventName. It is close to the C#/VB convention and makes it more understandable for people viewing my client-side code that are not used to code javascript.

Cheers,

Erjan

# October 19, 2007 1:01 AM

prashant jalasutram said:

Roy,

Good catch point learnt today.Thanks for sharing.

Thanks

Prashant

prashantjalasutram.blogspot.com

# October 19, 2007 8:38 AM

alexandru savu said:

Good point with this overflow by wrong name.

PS: you need to do something with the code layout.

I had to copy the code into notepad2 to see what the onclick event was.

# October 22, 2007 5:51 AM

Bertrand Le Roy said:

Alexandru: what's wrong with the code layout? I viewed the post under IE7, Firefox, Opera and Safari w/o a problem.

# October 22, 2007 1:52 PM

Robert said:

Please use Session.Add(name as string, value as string)

Make sure you don't clear any sessions and strictly declare your variables to session if you are doing so.

Hope that helps!

# October 23, 2007 4:53 PM

Matthias Reichenbach said:

Just downloaded your test files. It works great on IE7 but for some reason in firefox 2.0.0.8 it gets into a infinit loop of reloads.

Did not found any reason for that. Gonna keep looking at it, just wanted to let you know

# October 24, 2007 2:20 PM

alyssa cimacowski said:

you're all freaks . i can't believe you think that tidal power plants are effecting the earth's rotation!

let me make this clear YOU ARE ALL ......LOSERS & STUPID UNEDICATEDFREAKS

# October 24, 2007 3:21 PM

Bertrand Le Roy said:

Alyssa: sure, with a PhD in physics, I'm clearly not educated enough to understand those problems :) The part about being a freak is correct though.

# October 24, 2007 3:41 PM

Jral said:

What I would like to know is:

Is this only a problem if adding something to Session for the first time?

That is, if i simply update a variable in Session and perform a Redirect on the next line, is my application still open to potential problems????

# October 25, 2007 10:48 AM

Ghaj said:

I am having the same issue in ASP classic, is there a similar work around I can apply?  Any help would be greatly appreciated, I am pulling my hair out :(

# October 25, 2007 7:58 PM

Bertrand Le Roy said:

Ghaj: what do you mean "the same issue"? Do you mean you're getting an access denied error or that you're using MicrosoftAjax with classic ASP?

If it's just an access denied error that's unrelated to Microsoft Ajax, you probably have some javascript that's trying to get at an object in another frame that's pointed to a different domain.

# October 25, 2007 8:06 PM

Ghaj said:

Thanks Bertrand you are right it is javascript trying to get another object in a different frame, do you know of anything I can do to make it load properly in my frame without giving me the access denied error?

# October 26, 2007 10:54 AM

Bertrand Le Roy said:

Ghaj: it's an essential security measure that browsers don't allow you to script windows that came from a different domain. Your options are to get those pages to be in the same domain or use a cross-frame communication technique such as Subspace but that's fairly complex and only allows limited, message-based communication.

# October 26, 2007 3:27 PM

Programming said:

Almost a year ago Microsoft joins the OpenAjax Alliance , then a month ago, Microsoft Passes the OpenAjax

# October 27, 2007 12:00 AM

Nathanael Boehm - UI/UX designer & developer, Canberra said:

Pingback from  Nathanael Boehm - UI/UX designer &amp; developer, Canberra

# October 27, 2007 8:49 AM

A Real Beginner said:

I am a newbie at this stuff, trying to learn along the way, and struggling. I run Windows XP SP-2 and have set up IIS for my testing server. I have installed PHP5 and MySQL, which was a nightmare to get working because of poor documentation. Want help? You have to register on some forum, submit your problem and sift through the scanty replies from people who don't bother to read your questions properly. So, after three weeks of struggle I finally get IIS/PHP/MySql running properly. Two weeks further on I can actually get some data from a database onto the webpage, but it looks awful and I am struggling to learn how to format it.

At the suggestion of a colleague I get myself Visual Studio 2005 and install it, with no problems, in a few minutes. It comes with the MSDN library, so I also have excellent local, step-by-step, help.

In about 15 minutes I create a MS Access database with a table containing the data I need.

In Visual Studio I create an ASPX webpage which reads the data I want from the Access database, nicely formatted just as I want it. This takes me about 45 minutes because I have to consult the help files a few times.

So, PHP = 5 weeks to get nothing, while

ASP.NET = less than 2 hours to get what I want.

For newbies, its a no-brainer.

# October 27, 2007 5:22 PM

Ricardo Kawano said:

Thanks a lot man, this solution worked fine on my website.

# October 28, 2007 7:44 PM

matt said:

that is quite obtrusive!  try the jquery way

# October 31, 2007 2:30 PM

Bertrand Le Roy said:

Matt, you're not paying attention. In ASP.NET Ajax, you attach events using Sys.UI.DomEvent.addHandler or $addHandler. This topic of this post is not how you should attach DOM events though. It's how when throwing together some quick test code (and in test code, I personally feel free to use obtrusive event handlers as I'm the only one who should care and it's way quicker to set-up, but feel free to do however you prefer), you can shoot yourself in the foot and spend some time figuring out what's happening.

# October 31, 2007 2:39 PM

Trynyti said:

Awesome App Bertrand!  I love how easy it is to use just the .ashx page!  Now of course I have a question...

My file structure is such:

<Root>/Family/Photos/album.ashx

<Root>/Family/Photos/default.aspx

<Root>/Family/Photos/2007/<photos>

I had to change the CacheLocation to CacheLocation.Memory because of my host.

When I run just the album.ashx it works perfectly, all the images display, only the 2007 and sub-directories show and navigation works fine.  

When I try and run the default.aspx (which I modified the original to have the src="album.ashx" instead of src="~/album.ashx") I see all directories from the root (minus hidden/protected ones) and only the red X image, no images anywhere, even in the 2007 and subs, but if I click "Details" it does show the EXIF details of the photo.  The navigation still works fine, and when I get to the point where the tool tip would normally read "Click to view picture at full resolution", if I click that it opens a new browser and shows the photo as expected.

Two Questions:

1. Any idea why it doesn't show any of the photos when being called from the Default.aspx but works fine in the album.ashx?

2. How do I make it so it only scans sub-directories from it's location when being called from the default.aspx file?

Thanks for the awesome utility!

# November 1, 2007 3:45 AM

Qwerty said:

I just got told that the SysRq-key in kombination with Alt and a letter key is used i Linux OS to make some qiuck commands

# November 1, 2007 8:41 AM

Bertrand Le Roy said:

Trinity: I think that may be a bug. Please file it on the CodePlex site.

The control will always limit what photos it displays to the directory where the handler is (not the page) and subdirectories.

# November 1, 2007 12:48 PM

Muthukumar said:

I have a question. we are using client call back in our application. its calling serverside event in mozilla and ie but safari does not call server side event. can you help me how to fix this

# November 2, 2007 2:17 AM

Bertrand Le Roy said:

I'm pretty sure Safari should work. Can you contact me through the contact form and send me a simple repro?

# November 2, 2007 1:28 PM

kxs said:

I have to say that this blog has quite a history.  

I have a few questions:

Now in 2007, where can I find performace statistics for PHP in comparisson to ASP.NET?  

Do you have any new information on the pros and cons of ASP.NET and PHP 5?

Thanks

# November 4, 2007 12:50 AM

Shouvik Basu said:

That was excellent, no more large libraries, great insight what actually happens. worked in IE7 Firefox 2.0.0.9 no problems as a user. i used it in my project customized a lot.

in my project I've made similar libraries for separate browsers. they all have merged beautifully

still working to merge opera and safari in my project THanks

# November 4, 2007 12:18 PM

Bob Vilaraiso said:

I downloaded your test files, and tested them locally on my Windows 2000 computer with IE6 and Firefox 2.0.0.1 (I don't have a local web server, so I ran them directly from my local folder). Here are the results of my testing. It worked perfectly in IE6, but I'm having that same "infinite loop" problem in Firefox that Matthias Reichenbach mentioned above. Here is what that problem looks like: from the first moment you try to open the page and continuing permanently, the page keeps spontaneously reloading about once every second (without any user activity).

# November 5, 2007 6:32 PM

Bertrand Le Roy said:

Matthias and Bob: each test file illustrates how to make it work for a particular browser. A file that's intended for IE is not supposed to work in Firefox, and vice-versa. The files provided here are not in the business of providing a cross-browser history library but to explain how to build one. If you're looking for a full solution, those techniques are used in the next release of ASP.NET Ajax and in the latest RSH library (which is of course totally independant from Microsoft).

# November 5, 2007 6:39 PM

HPC said:

Mark Perrin said:  

I thing this is terrible news, I use OSX Tiger and to be honest i went with OSX because it just works better for me. I do not understand why apple is even bothering porting safari to windows, they should leave it with OSX. If a windows user wants safari, buy a mac you cheapo. I believe that the windows version should be a lower spec than the OSX version and the same with Itunes otherwise whats the point. Apple should make their own versions for their platform and customers the better version. Windows is crap. full stop! Id rather the Apple developers dedicate their time to Apple, why bother with Microsh1t.

Aww. the proud Mac user feels a bit less special now..boohoo

You're the typical stuck up Mac user which makes me never ever consider a Mac. And yes I CAN afford one.

Apple makes good money from PC users dumbass so they'e customers as well.

# November 5, 2007 7:44 PM

BIG DOE said:

Hi all, anyone know a way to skip the preview and go to the full resolution when cliking on the thumbnail and also to a new window?

thanks!

# November 6, 2007 9:03 AM

Bertrand Le Roy said:

Big Doe: in generateFolderPage, there is a loop over images. You can change the rendering from there so that the link's href is pointing to image.Url instead of image.Link. You also want to add a target attribute with the value "_blank" to open in a new window.

# November 6, 2007 1:05 PM

Your Websites, Our Passion! said:

It should be no surprise that JScript Documentation Comments power much of what you see in JScript IntelliSense

# November 6, 2007 2:35 PM

Noticias externas said:

It should be no surprise that JScript Documentation Comments power much of what you see in JScript IntelliSense

# November 6, 2007 3:00 PM

Jacky_xu said:

摘要

本期共有8篇文章: Refactor!forASP.NETBeta发布

如何解决ASP.NETAjax1.0中跨域名frame访问时出现的accessdenied问题...

# November 6, 2007 10:56 PM

sanka said:

yep its very good

# November 8, 2007 3:46 AM

Joe said:

I don't think I could give it a perfect score.  Its so good I didnt want it to end, but it did.  And way too soon.

Hopefully we'll see some bonus levels or something for it really soon.

# November 8, 2007 9:15 AM

Dave said:

> "It seems like we're the only ones to actually care about not colliding with existing aliases from competing frameworks, and we don't even get some credit for that?"

Actually, jQuery does a very good job of preventing namespace collisions; it only uses "jQuery" in the global namespace and you can tell it to not use "$" if someone else is using it.

docs.jquery.com/Using_jQuery_with_Other_Libraries

# November 9, 2007 10:08 AM

Bertrand Le Roy said:

Dave: If I'm not mistaken, that jQuery feature appeared after that comment was written. It is true that jQuery does an excellent job at keeping to its namespace, as does Dojo.

# November 9, 2007 2:23 PM

Dave said:

It was awesome, but it ended way to quickly. I wish there were more levels.

# November 11, 2007 2:13 AM

Bertrand Le Roy said:

Don't we all?

# November 11, 2007 2:27 AM

Rich said:

Has anyone got a good example of the Futures implementation?

Documentation is a little scarce to say the least!

# November 13, 2007 7:05 AM

Darksaint said:

Hi. This Photo Handler really rocks. Thanks for providing it.

I see it is already mentioned in the comment from Anke. When I run my project on my localhost everything works very fine, but as soon as I try to Build --> Publish Web Site, then I get an error

"There is no build provider registered for the extension '.ashx'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'."

I'm using VS2008 Beta - it can off course be something with that. However the project im using is in 2.0 not 3.5

I have tried to add a buildProvider as explained, but I cannot see how I can add the attribute that is mentioned.

Did you manage to find a solution with Anke or did you stop researching. Thanks in advance

Regards

Darksaint

# November 14, 2007 9:32 AM

Ev said:

Is there a limit to the amount of js that can be commented?  I'm getting a strange error when the .js file with comments is over 256K.  I've tried splitting into two files and same result:

"Error updating JScript IntelliSense: JScript IntelliSense has been disabled for referenced scripts. A referenced script may have caused a stack overflow. Reopen this file to reenable IntelliSense."

# November 14, 2007 11:22 AM

Bertrand Le Roy said:

Darksaint: please verify that the IIS application is configured to use 2.0.

# November 14, 2007 2:05 PM

Bertrand Le Roy said:

Ev: not that I know of, but send me mail through the contact form of this blog and I'll get you the right contacts to debug that issue.

# November 14, 2007 2:14 PM

Rob said:

This solution works great with SELECTs, but it does not appear to work with APPLETs.  I was under the impression that as long as the iframe was last to be rendered in the document, it would appear over other windowed elements.  Isn't an applet a windowed element???

# November 14, 2007 2:59 PM

David Fauber said:

I agree with your take.  Its something that'll be nice to have as a first class feature of the language.  (this is actually one of the few ES4 things I'm looking forward to having)  Its  nowhere near a big enough deal for me to want a ES3 workaround, though.

# November 14, 2007 3:02 PM

Bertrand Le Roy said:

Rob: so you're the guy still using applets ;) Seriously, I think Java applets are just running in an ActiveX control so I'm just as confused as you are.

# November 14, 2007 3:13 PM

Bo Breiting said:

This sounds like an all too familiar road to me. JavaScript has suffered a long history of hacks and personal interpretations that has lead to clouded standards and unstable solutions causing more and more developers to turn away from client side development and towards server side solutions for stability. Now with the dawn of web2.0 clients are growing feature rich again and once again the focus is on client side scripting which has finaly lead to some at least half decent environments with IntelliSense making client side development and debugging easier. The last thing we need now are more individual problem solving and hacks.

# November 14, 2007 3:43 PM

Rob said:

I use a charting software applet in my web applications for advanced web chart features.  This is a 3rd party tool that is very effective.  Is there something that you have against using applets?  Regardless, if my understanding is correct, my navigation menus using this blog's principle should appear over the applet, but they do not.  Any ideas?

# November 14, 2007 4:09 PM

Bertrand Le Roy said:

Rob: I was just kidding. Sorry, I have no clue why Applets would behave any differently.

# November 14, 2007 4:13 PM

AndrewSeven said:

I don't feel any need for hacked-in* overloading, but I do think its a good thing to be adding to the next version.

# November 14, 2007 4:34 PM

Joe Chung said:

I am a big fan of IntelliSense but not at the expense of a programming language's expressiveness.

I wonder if there would be a way for currying to support overloading methods by arity.

Maybe use pattern matching like in F# to support overloading methods by arity and parameter datatype.

# November 14, 2007 5:14 PM

Darksaint said:

Bertrand: Yes the IIS application is configured for 2.0 - it's on windows vista - so it's IIS 7.0 but I don't think that should be an issue.

It's pretty strange as soon as I exclude the ashx file from the project then I can publish/compile the projet but when I include it and try again - then I get the error message that i mentioned before, incredible frustrating *hehe*

# November 14, 2007 6:14 PM

Bertrand Le Roy said:

Oh, right, I see. The build/publish thing doesn't work and probably never will because we have both a control and a handler in the same file and, well, weird things happen. So in the end, you don't build this from VS, you just drop it on your server and ASP.NET will do the compilation. Makes sense?

# November 14, 2007 7:37 PM

Darksaint said:

Bertrand: Yes it makes sense - actually i did just leave out the page that uses the ashx file when I compile and then I manually upload the page afterwards - that works - I was just puzzeled about the error message and it could be there was some nifty solution to that. Anyways thanks for good support and a kickass handler :)

# November 14, 2007 7:50 PM

Sean Kinsey said:

Here is a simple solution that supports multiple signatures differentiated by types, and it has a low overhead as well..

# November 15, 2007 2:06 AM

Chris Newton said:

Hi,

I have applied the fix as specified above, and have gone down the ScriptRefernce route as I am using the toolkit. I am running the latest patched version of the AjaxControlToolkit, and this is fine. I am receiving the following error on page load:

Sys.ArguementTypeException: Object of type 'Sys._Application' cannot be converted to type 'Sys._Application'.

Parameter name: instance

And the is being raised by the following line in MicrosoftAjax.debug.js:

if (!this.isInstanceOfType(instance)) throw Error.argumentType('instance', Object.getType(instance), this);

Any ideas as to why this error is being thrown and how I can correct the problem?

Many Thanx,

Chris

# November 15, 2007 5:57 AM

Bertrand Le Roy said:

Chris: this typically indicates that a reference to an object in one frame has been passed somehow to the other frame. The system gets confused because the two application types in the two frames are actually different objects.

I'm suspecting that you're somehow passing complex objects across frames here. If that's the case, try passing plain JavaScript data objects instead (such as {foo: "bar", baz: 42}).

If this doesn't help, let's take that offline and send me mail through the contact form of the blog.

# November 15, 2007 12:24 PM

Void said:

It didnt end too quickly at all. It was the perfect length. If it were any longer i would not have picked it up for a second go. It had the right amount of depth to it. Think of the old school games you used to play. (minus RPGs) This game brought old school mind set to new school tech. Orange Box brought new life to video games.

# November 16, 2007 9:25 AM

napyfab:blog» Blog Archive » links for 2007-11-17 said:

Pingback from  napyfab:blog&raquo; Blog Archive &raquo; links for 2007-11-17

# November 17, 2007 6:28 PM

Crile Carvey said:

Thanks for your informative article.

Just wondering if VS 2008 / 3.5 obviates the need for this patch? You mentioned: "I expect this is the fix that will be in the next service release" Has this happened yet?

Thanks

# November 19, 2007 11:07 AM

Jay Kimble said:

I was reading this post by Bertrand Le Roy . And in many respects I agree with Bertrand and also with

# November 19, 2007 12:39 PM

Bertrand Le Roy said:

Crile: yes, the fix is in 3.5 already.

# November 19, 2007 2:23 PM

chetana said:

hi, its a great tool!! But could you please suggest way to add text/caption to the pictues?

Secondly, can we add a fileUpload control there to upload the pictues on the default.aspx?

Thanks,

Chetana

# November 20, 2007 11:57 AM

Bertrand Le Roy said:

Chetana: Sure, if you're using the control in templating mode, the image objects have a Caption property that you can add to the template.

Adding a file upload control should be no problem at all provided you're careful about authorizations.

# November 20, 2007 2:20 PM

C.Anandan said:

we can create serverside msgbox like

page.RegisterClientScriptBlock("KeyValue","MessageString")

KeyValue : Give any name to message box

MessageString : Write down message what do you       want to Display  

# November 21, 2007 7:23 AM

Bertrand Le Roy said:

C: you forgot the alert(' and '); around the message string and the key is not the name of the message box, it's a name that you use on the server side to be sure not to register the same thing twice.

# November 21, 2007 2:05 PM

barbora said:

few days ago we had some sort of sonic bang in our area,could feel it even inside a house,it happend twice in interval of about 30-40mins,but there was no other noise before or after,which made me think it can not be a supersonic airoplane?anyone have an idea what else this could be???

# November 21, 2007 6:13 PM

Bertrand Le Roy said:

Yup, with a supersonic bang, there should be noise after, as you are inside the cone. On the other hand, that noise is always considerably weaker than the bang itself, as the boundary of the cone packs most of the energy so it may be that there was noise afterwards but you didn't notice. Those could have been plain explosions too. Did you check the local news?

# November 21, 2007 8:07 PM

laila said:

Does anyone know where the num key is that is used for visual studio along with "-" to collapse all tree. I have an hp pavilion laptop and I can't figure out how to do it!

# November 23, 2007 5:39 PM

cab said:

weird error..

<!-- Web.Config Configuration File -->

<configuration>

   <system.web>

       <customErrors mode="Off"/>

   </system.web>

</configuration>

and

<!-- Web.Config Configuration File -->

<configuration>

   <system.web>

       <customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>

   </system.web>

</configuration>

Any Ideas ?

# November 25, 2007 5:48 PM

mike said:

But what about the JavaScript version number?

Isn't there contradictory syntax between JS 1.0 and 1.2 for example -- equality operators? strict typing? -- and it's the version number in the script tag is the only way to switch between the modes?

Is JavaScript syntax now frozen in 1996 -- you can only use JS v.1.0? Or do modern browsers inherently use a later JS version -- so your current code will break in older browsers?

# November 25, 2007 7:09 PM

Bertrand Le Roy said:

Mike: unfortunately there isn't much for JS version mangement. Prettt much everyone is targetting EcmaScript 3 at this point (which all modern browsers implement), but there's still a debate going on on how this is going to work in the future. This is going to have to be solved before the next version of EcmaScript is out, whatever that is.

Currently, There are differences between browsers (bugs and additional features). For bugs, people just work around them, sometimes with ugly browser detection code, and for additional features, people either don't use them or use capability detection (checking if a method exists before using it).

But differences between implementations of the EcmaScript are nothing when compared with the nightmare that is DOM quirks anyway.

# November 26, 2007 12:18 PM

Paul said:

Hi,a many thanks for this control...but can you tell me how if in a gridview there is a commandfield for delete operation(I mean something like this <asp:CommandField ShowDeleteButton="true" />), I can use your control? I cannot go for an item template & declare an alertbox there(The commandfield delete button is configured with an objectdatasource)....Also the Gridview is declared inside an update panel...thanks in advance....

# November 27, 2007 5:11 AM

Flying alone said:

The following items are covered XSLT JavaScript SQL CSS/XHTML Managed code (?) Tools &amp; resources

# November 28, 2007 3:05 AM

Dougal said:

Dude you just don't know how to code in a dynamic language if you think == is an error. pfft.

# November 28, 2007 12:15 PM

Bertrand Le Roy said:

Cab: what's the error?

# November 28, 2007 2:42 PM

Bertrand Le Roy said:

Paul: you'll have to template instead of using a commandfield and specify the delete command name on the template's delete confirmbutton, like in the blog post's example. I'm not sure how using an ObjectDataSource changes anything. On the other hand, the curent version of this control doesn't work with UpdatePanel.

# November 28, 2007 6:01 PM

Matt Heere (mattheere@hotmail.com) said:

Subject is sort of self explanitory.  I got this to work no problem locally in VS.NET 2005.  Put everything up on my hosted site (DiscountASP.net hosting) and get no images.  No error messages - just no images.

Tried it with all 3 flavors of caching.  No change.  I verified that I'm running framework 2.0.

Not sure where to look next....

# November 28, 2007 9:09 PM

Bertrand Le Roy said:

Matt, you probably didn't set the HandlerUrl and/or Path properties on the control (see above comments).

# November 28, 2007 9:37 PM

Matt Heere (mattheere@hotmail.com) said:

Doh! Yes, a handler makes it work much better...

Doesn't seem to matter what I set for path though, I end up getting a server error:

Value cannot be null.

Parameter name: value

Line 1563: if (path != _requestDir && !path.StartsWith(_requestPathPrefix)) {

If I leave it blank I get images for everything except the folder navigation

# November 28, 2007 11:20 PM

Bertrand Le Roy said:

Matt: I'm suspecting that you have a .jpg file in that directory that is not a valid jpeg.

# November 29, 2007 12:51 AM

Estéfano said:

Hi

You try set backgroud-color, because this property is not set the controls under div can be accessed.

# November 29, 2007 7:49 PM

Julien Couvreur said:

Can you confirm that the Guitar Hero II or III works with Rock Band?

From reading the GH and RB forums, it sounded like the RB guitar would work on GH, but not the other way around.

# November 29, 2007 8:50 PM

Bertrand Le Roy said:

Julien: the GH controllers work fine in Rock Band, but the Rock Band guitar does not work in Guitar Hero.

# November 29, 2007 9:05 PM

Flying alone said:

The following items are covered XSLT JavaScript SQL CSS/XHTML Managed code (?) Tools &amp; resources

# November 30, 2007 3:27 AM

Dave said:

Darn, by the titleof this post, I thought you were going to show us how to build a USB or blue tooth device from scratch.

# November 30, 2007 7:24 AM

IKnowNothing said:

The Guitar Hero II and Guitar Hero III guitars both work with Rock Band...but the Rock Band controller does not work with either Guitar Hero Games. I have all three games and Bertrand is absolutely correct in his statement.

The Rock Band guitar doesn't work with the GH games because of the extra fret buttons and effects switch.

# November 30, 2007 9:08 AM

Umer Farooq Butt said:

Why the hell you don't make things work properly the first way? I spent 1 whole day just to find the problem. I was stupid to have used your library the first place.

# November 30, 2007 11:32 AM

Bertrand Le Roy said:

Dave: sorry, now that you mention it it could give that impression :)

IKnowNothing: I don't know if it's because of the additional buttons but the behavior of that guitar in both GH titles is super weird: everything works fine in the menus, but from the moment you start a song, the buttons seem to be mapped differently (orange is red, etc.) and the green stays pressed all the time. I'd be more inclined to a more paranoid interpretation which is that Activision sends a command to the guitar when you start a song to remap the buttons. I think it's more likely to be Activision locking you into their own peripherals than MTV not making it right. This is kind of confirmed by the legal mumbo jumbo at the beginning of the game that prohibits the use of GH games with controllers not sold by Activision. Lame in both cases.

# November 30, 2007 12:55 PM

Bertrand Le Roy said:

Umer: now it works properly out of the box as the fix is in .NET 3.5. This was a bug that was found after the product shipped. These things happen, unfortunately. We thought it was better to provide a workaround than nothing. I'm sorry you had to spend a day on that.

# November 30, 2007 12:57 PM

Matt said:

Mostly working at this point.  Thanks for all the speedy replies!

Two things, I still can't get the path paramter working.  Do you have an example for the syntax for this bugger?

Also, should this work for photos stored in a virtual directory?  Ultimately I'd love to just point the web server at a NAS device with the photo content.

# November 30, 2007 1:40 PM

Bertrand Le Roy said:

Matt, do you *need* to change the path?

I don't know if it would work with a directory that's on your network. Don't see why not. File a bug on the CodePlex site if it doesn't.

# November 30, 2007 6:00 PM

Matt said:

Not 100% sure is I need to change the path or not.  I need to keep the album.ashx file somewhere other than where the pics are.

This is part of the strategy to use a network share to house the images.  I'll have read only access to the image share, and no ability to execute code that resides there.

The album.ashx file will need to live in a physical folder on my web server, and the photo store will be a virtual directory as a sub folder of this real folder.

Either way, the album.ashx code doesn't see to recognize a UNC connected virtual directory.  I'll list it on Codeplex.

# November 30, 2007 9:01 PM

Skowronek said:

I spent 10 seconds on Google and found this article. Thanks for the heads up.

# December 1, 2007 10:33 AM

Keli said:

Hello all,

I've tried it and it works ! Thanks a lot

# December 3, 2007 10:55 AM

Bertrand Le Roy said:

Thanks, Matt.

# December 3, 2007 1:22 PM

Jacky_xu said:

摘要

这周末不休息,差点忘了这件事……本期共有7篇文章: JavaScript文档注释的格式

VisualStudioOrcas中对JavaScript智能感知的支持

在ASP....

# December 3, 2007 11:51 PM

Nicholas Smith said:

Hi, i have been using this control to navigate to a second page.  (which happens to be an excel spreadsheet) using response.redirect withing the choice method, the problem i have is when i clich the 'back' browser button the dialog box created stays on the screen. How can i get rid of it and stop it displaying ? i have tried various methods of making it not visible on pre_load init etc.

PS. This is a great little tool !

# December 4, 2007 7:20 AM

Bertrand Le Roy said:

Nicholas: this may be caused by client-side caching. Did you check if the server gets hit at all by attaching a debugger?

# December 4, 2007 1:13 PM

Christian Nickel said:

Hi,

Thanks to everyone discussing this issue, I wanted to share my solution to this. I took Collin's example and changed it to automatically do the work of hiding the select elements behind a certain object. I also took some code from DOCJSLIB, from this page: www.webreference.com/.../image.html

Heres my solution:

<script language="javascript" type="text/javascript">

function toggleSelect(obj){

var appVer = navigator.appVersion.toLowerCase();

var iePos = appVer.indexOf('msie');

if (iePos !=-1) {

var is_minor = parseFloat(appVer.substring(iePos+5,appVer.indexOf(';',iePos)));

var is_major = parseInt(is_minor);

}

if (navigator.appName.substring(0,9) == "Microsoft")

{ // Check if IE version is 6 or older

if (is_major <= 6) {

var selx,sely,selw,selh,i, objx, objy, objh, objw, visibility

var sel=document.getElementsByTagName("SELECT")

var hidden = false;

for(i=0;i<sel.length;i++){

selx=docjslib_getRealLeft(sel[i]);

sely=docjslib_getRealTop(sel[i]);

selw=sel[i].offsetWidth;

selh=sel[i].offsetHeight;

selxoff=(selx + selw);

selyoff=(sely + selh);

objx=docjslib_getRealLeft(obj);

objy=docjslib_getRealTop(obj);

objw=obj.offsetWidth;

objh=obj.offsetHeight;

if((objx < selx) && (selx < (objx + objw)) && (objy < sely) && (sely < (objy + objh))){

if(sel[i].style.visibility!="hidden"){

sel[i].style.visibility="hidden";

}else{

sel[i].style.visibility="visible";

}

}else if((objx < selxoff) && (selxoff < (objx + objw)) && (objy < selyoff) && (selyoff < (objy + objh))) {

if(sel[i].style.visibility!="hidden"){

sel[i].style.visibility="hidden";

}else{

sel[i].style.visibility="visible";

}

}else{

if(sel[i].style.visibility=="hidden"){

sel[i].style.visibility="visible";

}

}

visibility = sel[i].style.visibility;

}

}

}

}

//gets the X position of the element in question

function docjslib_getRealLeft(imgElem) {

xPos = eval(imgElem).offsetLeft;

tempEl = eval(imgElem).offsetParent;

  while (tempEl != null) {

  xPos += tempEl.offsetLeft;

  tempEl = tempEl.offsetParent;

  }

return xPos;

}

//gets the Y position of the element in question

function docjslib_getRealTop(imgElem) {

yPos = eval(imgElem).offsetTop;

tempEl = eval(imgElem).offsetParent;

while (tempEl != null) {

  yPos += tempEl.offsetTop;

  tempEl = tempEl.offsetParent;

  }

return yPos;

}

</script>

# December 4, 2007 2:24 PM

Jacques PHILIP said:

Hello Bertrand,

I wrote a little utility a while back to make thumbnails of transparent images, I don't know if the framework 3.5 supports this directly now, but it has been useful for me:

www.c-sharpcorner.com/.../MakingThumbnailsOfTransparentImages.aspx

If it is a any use, feel free to use it.

# December 5, 2007 10:17 PM

Kjell-Åke Andersson said:

Have you checked if Paint.Net generates thumbnails with similar quality as Photoshop? If it does, then you you probably could get the algotrithm from there since the code for it is open source. Otherwise you probably could get it from Gimp.

# December 6, 2007 2:20 AM

Wesley said:

Nice article. Definately clears some things. I'll use High(or photoshop) for my thumbnails.

# December 6, 2007 4:16 AM

web design melbourne said:

thanks allot. I almost moved my wmv content to the place where it does not come in a way of website css menu. Now I do not need to worry about that issue and can place windows medial player content on top left side div on my website

# December 6, 2007 5:40 AM

Tony said:

Just an FYI, thank you for posting the screenshot of your file location.  We had a problem here where Outlook wouldn't even open, so we couldn't right click on anything to see where the Personal Folders were stored.  I found your site after a few searches and was happy to see the path highlighted so we had an idea.  Thank you

# December 6, 2007 9:19 AM

Andrew Vasylevskyy said:

Hi, I'm trying to load into IFrame application that uses ASP.NET Ajax and have the issue described in this post. But I can't fix it thru the proposed solution because I can't access applications ScriptManager. Application is compiled and I've no access to the source code.

Is there any other approach to replace JavaScript files than accessing ScriptManger to fix this issue? (maybe thru pathching ScriptReference.axd handler)

Thanks in advance!

# December 6, 2007 9:27 AM

Greg said:

I've suggested that better imaging codecs be put into .NET as well as adding support for mainstream image formats (jbig2 especially as an improvement over tiff G4).

Microsoft should have some of these already implemented in its professional photo editor package.

Consider using photoshop, gimp or imagemagick to compare the thumbnails to each other.  Also consider using an image optimizer to see how well the thumbnails compress (optipng for png images and jpegtran for jpegs).

I'd also like to see a JAI like set of operators in .NET (JAI - Java Advanced Imaging).

# December 6, 2007 11:03 AM

Bertrand Le Roy said:

Andrew: I think your only other options are:

1. to ask your hoster to upgrade to .NET 3.5

2. to replace the whole function that we're patching here. You'd do that by including an additional file that contains a redefinition of the function that will overwrite the one in the resource.

Makes sense?

# December 6, 2007 12:48 PM

Lionel said:

Wikipedia suggests that Lanczos resampling (en.wikipedia.org/.../Lanczos_resampling) gives very good results.

@Kjell-Åke Andersson:

I believe that Paint.NET uses the methods provided by the .Net framework, so it would be HQ Bicubic or supersampling by default.

# December 6, 2007 1:51 PM

Morten said:

"Another thing I want to test is how much jpeg compression levels affected my automatic thumbnails"

For these sort of tests, you shouldn't be doing any kind of lossy compression. That will just give you too many variables.

# December 6, 2007 6:12 PM

Bertrand Le Roy said:

My point exactly, Morten, although the differences between the compressed versions are still very visible. But there are only 24 hours a day and those will have to wait a bit.

# December 6, 2007 6:23 PM

Don Irwin said:

Great post Bertrand.  Know of any way to change the image on hover?  Say a grayscale image until the user hovers over an icon and then diplay the same image in color.

# December 6, 2007 9:21 PM

Andrew Vasylevskyy said:

Thanks Bertrand!

The 2nd option works fine for me. I've got access to the master pages, so I've just included script block with overriding whole funtion into the master page. And it works fine now.

# December 7, 2007 5:33 AM

PriyaS said:

Thanks for the informative Redirect/Session related discussion going on.

I have a similar issue (not exactly). I'm working on migrating a classic ASP shopping cart app to .NET. On one particular condition we need to redirect the user to the old ASP site to grab the details. The redirect logic works flawlessly on all pages except the home/default page. I mean the logic works on my local host but does not work when moved to a Server. Any clue as to what I may be doing incorrectly?

Thanks in advance.

# December 7, 2007 1:14 PM

Bertrand Le Roy said:

Priya: if you provide more details on how it fails, we might be able to tell what's going on. Feel free to send me mail through the contact form.

# December 7, 2007 1:41 PM

Brad Abrams said:

Ok, ok, it took us a little longer than we expected, but we finally got the ASP.NET 3.5 Extension Preview

# December 9, 2007 10:29 PM

Noticias externas said:

Ok, ok, it took us a little longer than we expected, but we finally got the ASP.NET 3.5 Extension Preview

# December 9, 2007 10:48 PM

MSDN Blog Postings » The Wait is Over: ASP.NET 3.5 Extensions Preview Posted said:

Pingback from  MSDN Blog Postings  &raquo; The Wait is Over: ASP.NET 3.5 Extensions Preview Posted

# December 9, 2007 10:50 PM

Tonio's developper .NET Blog said:

La ASP.NET 3.5 Extensions Preview est disponible sur le site asp.net. Téléchargez-la vite. Consultez

# December 10, 2007 9:18 AM

Lionel said:

Actually, you can get nearly the same result as Photoshop's "Bicubic sharper" using Paint.NET.  Here is the method:

1. Apply a Gaussian blur (with radius 2)

2. Resize using Best Quality/Supersampling (to 134x100 pixels)

3. Apply a "Sharpen" effect (with radius 2).

The Gaussian blur avoids moiré patterns, and the final sharpening increases the _apparent_ sharpness of the image (see en.wikipedia.org/.../Unsharp_masking for how it works).  Both would be rather easy to implement in a standalone assembly.

The visual effect is nice, but the is some cheating involved: even if it looks nicer, the blur+sharpening actually further degrades the image.

As for Lanczos resampling and other high order methods, it looks like they are much more suited to encreasing the resolution of the image.  For making small thumbnails, it looks like very little is gained.

# December 10, 2007 12:04 PM

Bertrand Le Roy said:

Lionel, that is very good info. Thanks a lot.

# December 10, 2007 2:27 PM

Roi said:

ok, i agree with most of the issues of why you should keep the jax async but then im getting this scenario : we are using autocompleteextender to select from a list of some 10k employees, upon selection, or onchange we need to validate that the value represents has a match in the list (even if the user typed the entire name - no hidden value)

to add complexity - this is done inside a 3rd party grid control which have an onbeforeupdate event in which we are hooking in the validation.

(a similar scenario is when a user types somthing in the autocomplete and then clicks the save(submit) button.)

now, when validation fails it must cancel the update event, and that is not possible if its async.

i would love to keep it async but i dont see any alternative besides shooting myself in the leg (and it will hurt oouch...)

any thoughts ?

# December 11, 2007 2:45 AM

Bertrand Le Roy said:

Roi: that is actually a fairly typical scenario that works well with async. Just disable the relevant pieces of UI during the callback.

# December 11, 2007 3:24 AM

Rick Brewster said:

Paint.NET uses its own code for resampling. There are issues with the underlying GDI+ library when trying to use some of System.Drawing's interpolation modes. It quite often makes the border pixels slightly transparent. Or it makes things blurry like you documented here.

# December 11, 2007 8:27 PM

Bertrand Le Roy said:

Rick: thanks for the info! Cheers!

# December 11, 2007 8:59 PM

John said:

I had applied the this fix months ago on a Framework 2 site with the ASP.Net Ajax 1.0.  Now, when the site was upgraded to 3.5 and my script manager was pointing to manual copies of the scripts I got the error "ASP.NET Ajax client-side framework failed to load"... I've had to remove the script manager pointing to those scripts and am in the process now of testing to make sure this bug is fixed with IFrames with 3.5 like some here have posted, I'm crossing my fingers it is!  :)

# December 13, 2007 5:09 PM

Will said:

Your my hero, thanks for writing this.

# December 13, 2007 8:58 PM

Store __VIEWSTATE in session said:

There is a little trick:) about keeping the viewstate in session (server side). It's not what they (the guys from microsoft) intended us to do so, but it works like a charm. You should've been already intrested. www.eggheadcafe.com/.../20040613.asp

# December 14, 2007 9:01 AM

Bertrand Le Roy said:

Sorry to disappoint you but it was very much the idea when "we (the guys from Microsoft)" decided to expose extensibility mechanisms for ViewState. We've even used it ourselves to put ViewState in session by default on some mobile browsers. ;)

# December 14, 2007 1:30 PM

Jim Baltika said:

WebSite.WebCameraInfo.prototype = {

   ZoomLevel: 11,

....

Hi guys. Does any have any ideas how to comment prototype getter like this?

# December 15, 2007 1:03 PM

Bertrand Le Roy said:

Jim: that's not technically a getter, but you can document it from the constructor using a field tag.

# December 17, 2007 4:30 PM

Rick Strahl said:

Ah, but they'd want it PREINSTALLED! Make Opera the DEFAULT Browser, non?

Good one...

# December 21, 2007 2:26 AM

Luis Abreu said:

lol...btw, opera is free now (and i believe that in the past you only had to pay to remove the publicity banners, though i could be wrong as always :) )

# December 21, 2007 3:54 PM

Bertrand Le Roy said:

Luis, you're right, it's free now except maybe for the Wii version which was only free in the beta phase. I also paused on that part of the joke.

# December 21, 2007 6:26 PM

Mart said:

All the stuff provided by you, specially the links, are very helpful and interesting. They really helped me a lot.

Keep it up...

# December 26, 2007 1:59 AM

Thomas said:

can someone please post a code sample on how to do this resizing using the Paint.net api, I downloaded the source code and it's an abyss of functions that are not documented and don't even bother posting on their forum so far they've been less than helpful.

I'd truly appreciate it.

thanks

# December 26, 2007 7:09 PM

c10se said:

hi,

I have applied this fix to my web application. how ever I still got 'Sys' is undefined, 'Type' is undefined Errors. I have two questions,

1. how do i compile the MicrosoftAjax.js, what whould i do?

2. does the main web application need to add this fix as well? the main web application is Net 1.1 and the web application inside the frame is Net 2.0. does that cuz the problem?

thank you.

# December 27, 2007 12:39 AM

Bertrand Le Roy said:

1. You don't have to compile it. Just follow the instructions very carefully and you'll be fine. Also look at the answers I already made to other people with the same difficulties, there are a few possible causes for that.

2. No.

# December 27, 2007 11:10 PM

Anthony Peterson said:

I have validation code (related to tolerances which are specified in my database) on the server side which I wanted to use with this alert code. I was able to add in the DLL as a reference to my project and Intelisense detected the reference and what was in it, but when I went to build for the first time after adding some alert code in, I got an error in VS 2005.

"Assembly Generation Failed: Alert does not have a strong name."

In my code I was constructing an alert by the second method you mentioned (in C# code rather than ASP tags)

# December 31, 2007 7:46 AM

Bertrand Le Roy said:

I don't know. Maybe in order to reference the alert controls from a signed assembly, you need them to be in a signed assembly. You should probably try to compile the alert code into a signed assembly and reference that.

# December 31, 2007 8:03 PM

Christopher Steen said:

Link Listing - January 4, 2008

# January 5, 2008 12:57 AM

zahi said:

the video is very small.

how can i enlarge it with good resolution?

# January 5, 2008 1:02 PM

Bertrand Le Roy said:

Zahi: there is a link right under the embedded video that leads to the same video in a larger size.

# January 5, 2008 3:44 PM

tha monkey said:

i gonna buy rockband when it comes out here in sweden.. its just so damn expensive, i hope i can buy drum and microphone and the game only.. cus i got gh3 and gh2.

# January 8, 2008 1:50 PM

The ASPx Blog said:

First the disclaimers/warnings. The following uses preview technology. It requires VS2008 and the ASP

# January 9, 2008 4:14 AM

jaci said:

who takes these tests? they r lame i already kno that i am sooo not a nerd...

# January 9, 2008 12:47 PM

Victor Vogelpoel said:

Just to inform you of issues in the MetaData library:

I could see every image album folder in the initial page, but when I click an album image, nothing would happen.

I found that the metadata library was unable to open my images and thus 'freeze' your application. My images are shot with a Canon 350D and Canon 40D; the MetaData library with your application is outdated (2.2.2, current version: 2.3.0g) and unable to open these photos.

As someone else already pointed out, replacing the outdated library with the newest will result in .NET binding errors.

When I disabled the Metadata parts in the ASHX, I was able to browse the directories successfully.

# January 9, 2008 4:21 PM

Bertrand Le Roy said:

Thanks for the report. Please file a bug on CodePlex.

# January 9, 2008 4:26 PM

cxspan said:

Freakin' sweet! (Peter Griffin voice)

This is just what I needed to figure out how to *remove* Menu items programmatically.  I couldn't just remove them from my sitemap b/c I still wanted them to show up in the breadcrumbs (don't ask).  I added a "hideOnMenu" property to the sitemapnodes I wanted hidden and set it to true.

Then, in the MenuItemDataBound event I added the following:

MenuItem parent = e.Item.Parent;

string hideOnMenu = ((SiteMapNode)e.Item.DataItem)["hideOnMenu"];

       if (hideOnMenu != null)

       {

           if (bool.Parse(hideOnMenu))

           {

               parent.ChildItems.Remove(e.Item);

           }

       }

I don't know if this is the best solution, but it's working great for me!!

# January 11, 2008 3:34 PM

cxspan said:

errr... slight modification to work with top-level menu items:

string hideOnMenu = ((SiteMapNode)e.Item.DataItem)["hideOnMenu"];

       if (hideOnMenu != null && bool.Parse(hideOnMenu))

       {

               MenuItem parent = e.Item.Parent;

               if (parent != null) parent.ChildItems.Remove(e.Item);

               else (sender as Menu).Items.Remove(e.Item);

       }

# January 11, 2008 3:51 PM

Pedro Torres said:

Hi,

I am trying to costumize the application, although I am not being able to change the backgroudn color for the upfolder and thunbnailfolder icons... I want my background to be white and for those its in black... any one can help?

# January 12, 2008 10:32 PM

Bertrand Le Roy said:

Pedro: there are config entries in the handler as wel as forum posts and bugs on the CodePlex site that should get you started.

# January 13, 2008 8:13 PM

pankaj said:

do u have any working example of a form using div layer and overlapping a select box.

# January 14, 2008 7:12 AM

ASP.NET AJAX Forum Posts said:

ok, I think I&#39;ve gone a little askew somewhere along the lines here. First I installed ASP.Net ajax

# January 15, 2008 10:48 AM

Julien Couvreur said:

Probably because there's been a lot of buzz around functional languages ;-)

Here's another pointer which you may find interesting: blogs.msdn.com/.../132646.aspx

# January 16, 2008 8:40 PM

Bertrand Le Roy said:

Yes, Julien, you're absolutely right.

# January 16, 2008 8:47 PM

Fabio Pavani said:

Congratulations!

It works very well at first attempt.

Thanks a lot!

# January 17, 2008 10:17 AM

Granville Barnett said:

I have used F# for a while having used Haskell prior to that and the simplicity of concurrent programming is a joy and one that imperative languages like C# etc will want to emulate in the future given the fact that processors are scaling out in terms of cores.

I guess we will have to wait and see but I would bet that the next version of C# will introduce more abstract language constructs - LINQ was the tip of the iceberg.

# January 17, 2008 1:29 PM

rascunho » Blog Archive » links for 2008-01-17 said:

Pingback from  rascunho  &raquo; Blog Archive   &raquo; links for 2008-01-17

# January 17, 2008 3:27 PM

lee576 said:

译给自己看

# January 17, 2008 10:18 PM

Guido said:

Hi, nice post. only one thing:

if (SomeObject)

works fine on Firefox, but IE (6.0 at least) will raise a javascript error on the client. To prevent this, you can check for 'undefined' and 'unkown' using typeof(var):

if (typeof(SomeObject)!="undefined" && typeof(SomeObject)!="unknown" && SomeObject)

# January 18, 2008 10:54 AM

Bertrand Le Roy said:

Guido: right, there is the assumption here that the variable was declared.

# January 18, 2008 1:27 PM

Josh Stodola said:

>> It would be great if this could become the consensus across the industry. <<

I have been saying this about numerous Javascript inconsistensies for over 7 years. In that time span, I have yet to see a single consensus. The language is extremely desperate for standardization. It's about time somebody in authority puts their foot down! It seems that without a leader, it's going no where (and fast).

# January 18, 2008 4:20 PM

Bertrand Le Roy said:

Well, Josh, this is a little different in the sense that JSON (not directly talking about JavaScript date literals here) is in the hands of a few individuals, not a standards comittee so it may actually be achievable.

# January 18, 2008 4:24 PM

Joe Chung said:

One reason to escape slashes in JavaScript is that some browsers don't handle HTML close tags, e.g., </p>, well in JavaScript so you would use <\/p> instead.

# January 18, 2008 4:40 PM

Alex Osipov said:

For me, what gets confusing is DateTime serialization in regards to time zones.  .NET in general is not consistent when dealing with DateTime and time zones, so would love to see a more standard approach not just for Atlas but .NET in general.  An attribute allowing me to use local time on the client would be very helpful at times.  

# January 18, 2008 4:48 PM

Bertrand Le Roy said:

Thanks joe, that explains it.

Alex, do you have a specific example of such an inconsistency?

# January 18, 2008 4:50 PM

Kris Zyp said:

Bertrand, clever trick, and good job making it go with eval. However, I would still be hestitant to move away from the date serialization used by Crockford's library and ES4. I think your suggestion of defining a property as a date in a schema(JSON Schema or otherwise) outside of the actual data in order to explicitly declare dates, is a better technique, because the standard serialization/parsing libaries can still be used.

# January 18, 2008 5:30 PM

Bertrand Le Roy said:

I'll try to lure Doug to this post and get his thoughts. Good thing is that on the parser side, we can support several approaches. Again, Doug's convention will have false positives so most parsers will probably not do the special casing by default.

# January 18, 2008 5:36 PM

Nikhil Kothari said:

Actually, I should have updated my main post (a year ago I guess) but as discussed in the comments, there is a way to use the @ syntax without false positives.

Your post called my attention to it, and I updated it now. :-)

# January 18, 2008 10:54 PM

Rick Strahl said:

The question is who do we have to bribe to make *some* sort of standard for date literals :-}. This is a pretty big stumbling block in universal JSON usage, although the solution you came up with MS AJAX with the \/Date()\/ seems like a good way to go - it  works and is relatively easy to implement. I posted some additional thoughts and some code to that effect here a while back when we discussed this last month:

www.west-wind.com/.../214731.aspx

# January 19, 2008 8:01 AM

Michael Yeaney said:

I've worked around these problems in the past by using JSON to *only* transport formatted data - in other words, no reliance on the client browser native types at all for numbers and dates.  While it sounds a little odd, most of the enterprise products i've worked on supported the notion of a configurable timezone and/or culture, which makes the browsers cultural settings worthless.  So for dates and numbers, we do *all* formatting on the server (after setting the current thread culture code and format options as per the app config), and just ship the "ready for display" data to the browser.

IMO, until we can *force* the browser to use different time zone and number format options, it's pointless to do manipulation on the browser (and a *lot* more code to support - we tried it) - the .NET framework has most of these features built in (except for explicit DST support), so why not leverage them?

Any thoughts???

# January 19, 2008 12:31 PM

Gordon said:

How about a plastic  Bathtub

# January 19, 2008 9:19 PM

MarcelDevG said:

Nice one!

It's fascinating to observe the childrens view of the world.

# January 20, 2008 11:14 AM

Florian said:

AH AH Excellent :-)

# January 21, 2008 5:45 AM

Eilon said:

Some languages out there already have Date literals - which ones are they? Why don't more languages have Date literals?

And for that matter, what are some other primitive types that lack literal support in languages?

# January 21, 2008 1:41 PM

rascunho » Blog Archive » links for 2008-01-21 said:

Pingback from  rascunho  &raquo; Blog Archive   &raquo; links for 2008-01-21

# January 21, 2008 3:24 PM

Wöchentliche Rundablage: .NET 3.5, WPF, LINQ, Tests, System.AddIn, SubSonic, Sandcastle | Code-Inside Blog said:

Pingback from  W&ouml;chentliche Rundablage: .NET 3.5, WPF, LINQ, Tests, System.AddIn, SubSonic, Sandcastle | Code-Inside Blog

# January 21, 2008 3:41 PM

Wöchentliche Rundablage: .NET 3.5, WPF, LINQ, Tests, System.AddIn, SubSonic, Sandcastle | Code-Inside Blog said:

Pingback from  W&ouml;chentliche Rundablage: .NET 3.5, WPF, LINQ, Tests, System.AddIn, SubSonic, Sandcastle | Code-Inside Blog

# January 21, 2008 3:48 PM

Mike D said:

Is there a way to have handler pull images from a certain directory?

Example file structure:

Bin

App_Data

images

---->Folder 1

---->Folder 2

---->Folder 3

defualt.aspx

ablum.ashx

# January 23, 2008 5:29 AM

StillRockin said:

You keep saying to disable only "the relevant pieces of UI".  What if the business case is that the whole UI should be disabled?  I just don't get it--it seems to me that there may legitimately be some situations in which a synchronous call from a web app MIGHT be justified, such as some kind of dynamic security check in a highly-secured, high-speed network intranet-only app in which the request will almost always complete very quickly and almost never fail.  Or something.  Maybe I'm just too old for this stuff any more :)  In any case, I just tend to shy away from pronuncements like "never do this".  Of course I recognize you have in fact given us the way to do it--thanks BLR.  (Now I can go to work armed and dangerous :)

# January 23, 2008 9:20 AM

Bertrand Le Roy said:

StillRocking: you're right to shy away from "never" sentences. I would usually agree with you and tell users to adopt the pattern that most suits their needs.

But here unfortunately, there is a fundamental flaw in the implementation of XHR that makes any synchronous call a potential usability problem. Most users have no idea what to do with a frozen browser other than hitting the reset button. That's not something you want your users to have to do, even if that's "almost never". Any web application (even an intranet) is dependant on things you don't and will never control. What you can do is provide an intelligible fallback in those cases so why shouldn't you?

I don't see how the case you mention justifies synchronous any more than any other that's been mentioned before. In that case like in all others, the user friendly choice seems to disable the UI (partially or fully), give the user some feedback about what's going on and have error and timeout callbacks (which you can't have with synchronous) just in case.

# January 23, 2008 1:11 PM

Bertrand Le Roy said:

Mike: why don't you put the handler in the images folder?

# January 23, 2008 1:12 PM

Sonu Kapoor said:

Great to have you on board Bertrand.

Actually registration is not required to read the article. Its only required if you want to vote or leave a comment ;)

# January 23, 2008 1:32 PM

Mark Wisecarver said:

This is 2 funny.

My 5 year old daughter asked me if Moma is the only black person in our family...

I explained to her that Moma is Brazilian, dark skinned.

Kids keep this stuff simple and harmless, as it should be. ;-)

# January 23, 2008 4:21 PM

Haissam Abdul Malak said:

Welcome to Dot net slackers :D

# January 23, 2008 5:32 PM

kazimanzurrashid said:

Welcome to the Club of Slackers.

# January 23, 2008 5:45 PM

StillRockin said:

Ah--Now it's a little clearer.  The last sentence in your 1:11 PM post de-obfuscated the matter a bit for me.  So to summarize for my scenario--we use asynch methodology, but disable the UI by, perhaps, showing a modal "Authenticating request blah blah" popup dialog window (which might only display for a split second normally, but maybe program it to stay displayed for at least 1-2 seconds for user-friendliness (rather than just seeing the screen mysteriously flash for a split second)), and implement the error/timeout etc. callback routines to ensure robustness...  That does make sense.  Kewl.

# January 23, 2008 9:12 PM

Simone Busoli said:

Welcome from me too ;) Great to have you on the boat!

# January 24, 2008 5:56 AM

Diamsorn said:

That is great

Enjoy your daughters childhood, it goes way to fast.  

# January 25, 2008 12:12 PM

Debbie said:

When I go to you the target option, to zoom in on the hole, only the dang hand shows up...but no ring to adjust.  Only got the ring to show up once since I had the game?!!

# January 25, 2008 1:39 PM

Dave said:

As one who's company blocks users from upgrading from IE6 to IE7 because we don't want to pay to upgrade existing internal apps - this is great news.

Wish they would have thought of it sooner.

# January 25, 2008 5:11 PM

Michael Arick said:

This is such a great hack.  Here's my version of it in code:

MenuBar.showIFrameHack = function(obj) {

 //Hack to add an iframe under the menu which should hide the selects:

 var iframeShim = document.getElementById(obj.id + "_hvrShm");

 if (iframeShim != null) {

   iframeShim.style.visibility = 'visible';

 } else {

   obj.insertAdjacentHTML("afterEnd",

          '<IFRAME style="position:absolute;z-index:4;"'+

          ' src="javascript:false;" frameBorder="0" scrolling="no"' +

          ' id="' + obj.id + '_hvrShm" />');

   var iframeShim = document.getElementById(obj.id + "_hvrShm");

       iframeShim.style.top = obj.style.top;

       iframeShim.style.left = obj.style.left

       iframeShim.style.width = obj.offsetWidth;

       iframeShim.style.height = obj.offsetHeight;

 }

}

MenuBar.hideIFrameHack = function(obj) {

 //find and remove the iframe:

 var iframeShim = document.getElementById(obj.id + "_hvrShm");

 if (iframeShim != null) {

   iframeShim.style.visibility = 'hidden';

 }

}

# January 25, 2008 6:10 PM

Kearns said:

I don't get it. Why have all of those different modes? It should just do the new standards mode and if old stuff breaks then yell at the crappy Web Devs/Designers that made your code. I was never caugh unawares, and I've coded pages for years that didn't break under IE7...

# January 25, 2008 7:12 PM

Dflying Chen said:

摘要好久没写了,不为自己找借口,不管怎样,还是要继续捡起来。本期共有9篇文章:C#中的不可变类型使用System.Drawing生成缩略图时应采用什么样的InterpolationMode...

# January 27, 2008 4:54 AM

Andrei Rinea said:

Zend doesn't even publish the price for the platform, just a blank "contact sales" link. Lame!

# January 27, 2008 6:53 AM

ttoomm said:

Bertrand-

You should not have blown M Anderson off like that.  He/She is reporting a different issue (October 4, 2007 7:26 PM.)

1. Calios'  June 8, 2007 fix for the background of the stacked  Folder Immages works just fine.  So it is no longer a "known issue" but rather a fixed issue.

2. What M Anderson is reporting is a peculiarity that I do not fully understand but can discribe.  If you make the change Calios describes, the thumbnails don't change until you change the folder names.  The thumbnails are stored in the application's temporary folder, background and all.  They do not change just becuase you say you wnat them to look different.  You have to do something to cause them to re-write.

# January 27, 2008 12:45 PM

Jay Kimble said:

Bertrand Le Roy had a post over the weekend (actually Friday, but I missed it) about the new IE8 meta

# January 28, 2008 10:52 AM

Bertrand Le Roy said:

ttomm: right, and this is a known issue too. If you want to regenerate the thumbnails, for the moment, you need to physically delete them or somehow restart the appdomain (touching web.config should do the trick). The original issue is not fixed in the sense that the fix is not yet in the current release, so it's a "known fix" rather than a "fixed".

# January 28, 2008 2:35 PM

Erik said:

Is the Field tag still part of JS intellisense?  I can't find any documentation on it anywhere.

# January 28, 2008 8:26 PM

Bertrand Le Roy said:

It should be.

# January 29, 2008 1:27 PM

alex grach said:

what if the scriptmanager is in a masterpage and the wizard is in a contentpalceholder in a page that uses the masterpage. i have been having an issue with this situation. i am using ScriptManager.GetCurrent(this) in the page to get the scriptmanager in the masterpage and set the properties to enable it to support history, but when i click the back button to go all the way back to the first step of the wizard it thinks there is still one more step backwards and if i click back it throws an event validation error. how can i fix this.

# January 29, 2008 2:44 PM

Bertrand Le Roy said:

Yes, Alex, I saw your other post on the DNS article. Please send me your code (bleroy at microsoft) and I'll look at it.

# January 29, 2008 6:51 PM

4 ASP.NET AJAX JavaScript UI methods you should learn | Encosia said:

Pingback from  4 ASP.NET AJAX JavaScript UI methods you should learn | Encosia

# January 29, 2008 9:27 PM

dentria said:

Working Around cross domain frame issue (ASP.NET Ajax 1.0)

# January 29, 2008 10:09 PM

Marcus said:

Why don't you just implement the Mootools framework - it's much more lightweight, fast, and simpler to implement.  No point reinventing the wheel again!

# January 30, 2008 1:51 AM

Sebastian Werner said:

Interesting that from time to time people are trying to resolve the same issues. We have had the fun with this "location" detection some months ago. qooxdoo already uses the getBoundingClientRect() for Firefox 3. It has still some differences to the Microsoft implementation but is definitely a lot faster than the original way. qooxdoo is LGPL/EPL. I always think that it is a good idea to work together on these tasks. As you have mentioned the topic is quite complex. qooxdoo for example has special support for different box-models even using the CSS box-sizing property. Does your code do the same. Do you have any interest in sharing your source? You can find our implementation here:

qooxdoo.svn.sourceforge.net/.../Location.js

The API is available here:

demo.qooxdoo.org/.../apiviewer

# January 30, 2008 2:39 AM

ste202 said:

awesome guitar

# January 30, 2008 2:49 AM

Richard Rose said:

Excellent piece of code!

Your example of setting the text on the dialog didn't wotk, but I nested a label inside the <ms: Alert> tags:

<asp:Label ID=DisplayText runat=server Text="Change this progamatically before calling the show method"></asp:Label>

This way I can calculate the impact of the users actions, and tell him before he hits the button.

Works perfectly!

Many thanks.

# January 30, 2008 7:23 AM

Bertrand Le Roy said:

Marcus: I get a lot of comments from people who are not using ASP.NET Ajax asking me why we didn't just integrate <paste your favorite framework here>. I don't deny that it's an interesting question, but there actually are pretty good answers. First, users of ASP.NET have been asking us to do it. Second, Microsoft Ajax, while not requiring ASP.NET, has unparallelled integration with it, which our users appreciate immensely. Third, building our own enables us to control the design and steer it to promote interoperability with other products and answer specific requirements from our partners and customers. Finally, it's very difficult legally for us to integrate external products (although we've done it in the past and may do it again in the future), especially if their license is anything like GPL.

In the end, our decision seems to have been the right one as one year after shipping, our library is already used by 73% of ASP.NET developers (i.e. our customers), whether they develop Ajax applications or not.

# January 30, 2008 12:46 PM

Bertrand Le Roy said:

Sebastian: thanks for the comment. I completely agree with the sharing and stuff. This kind of hacking is no fun at all and I don't wish anyone to have to go through it. Hence the experience sharing and the blog post. So yes, take what you want from this post and use it if you find anything you didn't already know and feel free to share any information I may have missed and I will add it to the post and credit you for it.

As for the code sharing, it may be a little trickier. On my side, there is no chance that the legal department here would even let me glance at something with a license that ends with GPL. The other way around might work, as we're under MS-PL:

msdn2.microsoft.com/.../bb944808.aspx

One thing that may be interesting to talk about would be to share our test suites. That may help achieve consistency, correctness, and would help other developers to debug their code.

Drop me a mail at bleroy at youknowwho if you want to chat.

# January 30, 2008 12:56 PM

Marcos Lavin said:

Hello,

i'm tryng to change the color from the thumbnails to white and i cant find where do i chenge!

ive change this part and works only for the preview images not for thumbnails (next and preview images):

       private static readonly Color BackGround = Color.White;

thanks for the help!

# January 30, 2008 2:25 PM

Bertrand Le Roy said:

# January 30, 2008 3:36 PM

cmroanirgo said:

I applaud the commitment M$ has made to cross-browser compatibility and this article is a great example on the lengths you guys are going to to make our lives (the developers) easier. It is a shame that other parts of M$ are still mired in the 'One platform' mindset.

Where's the tip jar?

On the note of multiple toolkits performing the same tasks...I agree with everyone: It would be nice if everyone was working on the one codebase, but I also understand that M$ would also need to have (some of) it's codebase dictated by commercial concerns (eg. from ASP.NET).

Alas, these two philosophies are on other sides of a river.

Let's hope that one day M$ will allow 3rd parties to develop their AJAX code.

(WTL went down a similar avenue, hopefully for the world's benefit).

# January 30, 2008 7:11 PM

Chris said:

this is sweet man.

i really like it.

im getting rock band in 2 weeks

then im gonna paint this and use it as a bass.

thanks for the greatpics and everything.

# January 30, 2008 9:43 PM

ThomasH said:

Bertrand, your test scenario sounds very interesting. We worked at similar things using Selenium. Could you elaborate on how you implemented the above strategy? E.g. which tool/platform did you use? Or how did you automatically detect pixel discrepancies in the screenshots?

# January 31, 2008 3:37 AM

Bertrand Le Roy said:

Thomas: the way the test suite works is that we have an ASP.NET page that runs locally (as in on the same machine as the server), displays an element with the wanted constraints, call getLocation on it, positions another element absolutely with the coordinates we got from getLocation, then the page's script sends a request to the server, which launches the application that takes a screenshot and analyses the image to detect differences in coordinates and log them.

This way, the test suite runs on any browser, you just go to that page and it starts.

# January 31, 2008 2:45 PM

Brennan’s Blog » Blog Archive » Intellisense for jQuery in Visual Studio 2008 said:

Pingback from  Brennan&#8217;s Blog  &raquo; Blog Archive   &raquo; Intellisense for jQuery in Visual Studio 2008

# February 1, 2008 1:59 AM

ThomasH said:

I'm with you up to the screenshot. But are you at liberty to disclose how you do the analysis of the image?

# February 1, 2008 3:23 AM

InfinitiesLoop said:

The other interesting thing about the suite is that it generates positioning combinations automatically. It takes around I'd say... 30 minutes if I remember correctly, to run though enough combinations in a single browser.

Some issues it has are combinations that produce strange renderings where the positioned element isn't visible or only partially visible (although we do the best we can to minimize those by making everything big enough, it happens anyway), or isn't redrawn by the browser without user interaction.

I could imagine coming up with a single page that had enough of the real key scenarios (eigenpositions?) that could be the GetLocation equivalent of the acid test... :) If I recall the main pain areas across all browsers were combinations of relative and absolute positioned elements, and further when those are inside scrolled elements. So much fun...

# February 1, 2008 5:16 AM

Bertrand Le Roy said:

Dave (infinitiesloop): I like the idea of an acid test for getLocation. By the way, our simplified version of the test that runs on every checkin does include the most pathological cases and comes close to that definition. It lacks the generality of the full test but it has the advantage that because the expected coordinates for each browser are hard coded, it doesn't need the screenshot analysis so it's much easier to run.

# February 1, 2008 3:07 PM

Bertrand Le Roy said:

Thomas: the element we got getLocation from has a border of a specific color, and what we position absolutely to check the coordinates are two squares of a different color on the top left and bottom right. The analysis program scans the image for those rectangles and squares of specific colors. Does that answer your question?

# February 1, 2008 3:19 PM

Paul Anthony said:

Thats pretty cool, although I can't imagine many shared servers would make any use of it..Its a different story if you roll your own.

# February 3, 2008 7:35 AM

Joe Chung said:

Ah, the Web browser version of DLL Hell.  Sometimes I wonder if we will ever learn.

# February 3, 2008 6:57 PM

Joel said:

Hey Bertrand,

This blog entry was from a long while ago and since then it looks like Safari (3 Beta Windows) supports the inline naming of functions. I'm running a couple of tests now and seeing it perform correctly (or at least not crap out).

Of course there's always backwards compatibility to worry about...

Just an FYI.

# February 3, 2008 11:34 PM

Bertrand Le Roy said:

Joel: we still support Safari 2 and will do so at least until Safari 3 has been released in its final version and has reasonable adoption.

I'll update the post though. Thanks for the heads up.

# February 4, 2008 2:38 PM

Bertrand Le Roy said:

I'm not sure, Paul, if hosters start getting better performance and site density from IIS+PHP they might very well do the math and start migrating...

# February 4, 2008 2:42 PM

BIG DOE said:

Hi, This has been working great, but all of a sudden we get this message:

javascript:WebForm_DoCallback('Album1','p/jacksonhole/IMG_0210%20(f).jpg',photoAlbumCallback,'Album1',null,false)

after clicking on an image.

I set it a long time ago to open up in a new window with this line:

writer.AddAttribute(HtmlTextWriterAttribute.Target, "_bank", true);

In the image loop in the gerneratefolder method.

Any ideas why all of a sudden, with no changes, this will happen?

thank you!

# February 4, 2008 3:25 PM

Bertrand Le Roy said:

Where are you getting that message? Is it possible that someone disabled JavaScript on your browser?

# February 4, 2008 3:48 PM

BIG DOE said:

Oh i am sorry, the message I get is Page cannot be found.

Javascript is not disabled, i reloaded the file, and it works but as soon as i add the extra line, i get that error.  I get this message on the new window as soon as I click on an image, the line I added opens up a new window which displays the page cannot be loaded.

its the generic "Windows cannot display the webpage" message.

Does this have anything to do with permissions on the picture folders?  I change permissions on the folders where we put in the pictures so others can have access to delete and add pictures.  

Thank you

# February 4, 2008 3:57 PM

Bertrand Le Roy said:

You mean you added target="_blank" on links that do a postback? Sure, that can't work, postbacks have to happen in the same window. Using a different target is only possible on real links, not javascript ones.

# February 4, 2008 4:28 PM

A JavaScript Stack Trace in ASP.NET AJAX « See Joel Program said:

Pingback from  A JavaScript Stack Trace in ASP.NET AJAX &laquo; See Joel Program

# February 4, 2008 10:11 PM

ThomasH said:

Not quite. I was after the 'analysis' part you mention. How is this performed? Are you using a tool like ImageMagic, or something self-written? How do you detect the rectangles and squares and the deviation from the expected values?

# February 5, 2008 3:44 AM

Bertrand Le Roy said:

Something self-written. We wrote a .NET console app that grabs the screenshot and finds rectangles of a given color.

# February 5, 2008 1:00 PM

Pablo said:

The short dirty way:

add the following script at the end of your page or masterpage:

  <script type= "text/javascript">

   Sys.UI.DomElement.getLocation=function(a){if(a.self||a.nodeType===9)return new Sys.UI.Point(0,0);var b=a.getBoundingClientRect();if(!b)return new Sys.UI.Point(0,0);var c=a.document.documentElement,d=b.left-2+c.scrollLeft,e=b.top-2+c.scrollTop;try{var g=a.ownerDocument.parentWindow.frameElement||null;if(g){var f=2-(g.frameBorder||1)*2;d+=f;e+=f}}catch(h){}return new Sys.UI.Point(d,e)};

   </script>

This will overwrite the faulty script.

 NOTE FROM BLEROY: *DO NOT* use Pablo's patch. The implementation of getLocation is specific for each browser, and Pablo's fix will overwrite the implementation for all browsers with the one for IE. His fix would be more or less OK if the code is surrounded with:

if (Sys.Browser.agent === Sys.Browser.InternetExplorer) { /* code goes here */ }

# February 5, 2008 1:51 PM

Parag said:

I am a Mechanical Engineer. I required to develop a small intranet site for departmental procurement monitoring system. I used MySQL, PHP5 on XP SP2. It did not take me weeks, as "A Real Beginner" says, but just a few days time, in addition to my routine work, to get the site up and running. I am happy, my boss is happy.

I used PHP because I have found MS applications to be like fast food - good to look at & taste, but lacking value.

I know Roy will tell me to go away. Roy, I don't like your attitude, and am not returning to this site... don't bother asking me to go away.

But, before I leave, I must say that everything has its pluses and minuses.... you should be discussing that, rather than ranting against PHP. We see large websites running successfully on PHP. Learn to accomodate others' views.

# February 5, 2008 11:29 PM

Robert said:

Thanks for the post,

It is wise considering integration with a dynamic image optimizer (such as http://www.imageoptimizer.net) with the ASP.NET application. It can make a big difference and is 100% worth the effort.

Thanks

Robert

# February 6, 2008 9:23 AM

Bertrand Le Roy said:

Good for you, Parag, but the name's Bertrand, not Roy.

# February 6, 2008 12:35 PM

Matthias Bruch said:

Thanks for the blog entry. I really liked it to read about all that problems ... I always just did a loop through the dom to find out the coordinates, and "corrected" that by hardcoded values (for the browser differences) ...

But as interesting as your post was, could you explain a little bit more how that console app does the screenshots? As I saw in the comments, I'm not the only one who's interested in that ;-) ...

# February 9, 2008 6:25 AM

Bertrand Le Roy said:

Fine, seeing all the feedback I'm getting on that, I'll find a way to publish that publicly. I'll try to see if we can come up with a simplified version that would look like ACID for getLocation. Stay tuned.

(technically, grabbing the screenshot involves some .NET/pInvoke wizardry, but nothing too intense, basically to get a BitMap object from any window handle and then you're in business)

# February 9, 2008 5:55 PM

Jerz said:

Thanks for the iFrame info.  It works great in some cases. Not to confuse anything, for the newer programmers out there you can always use the ol' standby of: <img src="YourMouseOverImage.gif" onMouseOver="form1.DropdownMenu.style.width=0;" onMouseOut="form1.DropdownMenu.style.width=100;">

# February 10, 2008 12:52 AM

Wöchentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA… | Code-Inside Blog said:

Pingback from  W&ouml;chentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA&#8230; | Code-Inside Blog

# February 11, 2008 2:39 PM

Scott Hanselman's Computer Zen said:

# February 12, 2008 2:48 AM

ASPInsiders said:

Aptana has a cool Eclipse-based IDE for writing AJAX-y websites. It's got built-in support, via plugins,

# February 12, 2008 3:15 AM

Julian Fannin said:

There are commercial applications that will not only fix corrupt PST files but also undelete items and reduce the file size, in my case the problem was that my PST was over 2 GB in size. A known problem (to Microsoft). I've added the URL of the one that I got, outlookfix. It seemed to work the best out of the ones that I tried.

# February 12, 2008 5:06 AM

veni214 said:

does the "enable history" on script manager exist in asp.net 2.0??

# February 12, 2008 10:15 AM

Scott Hanselman's Computer Zen said:

# February 12, 2008 11:45 AM

Bertrand Le Roy said:

No.

# February 12, 2008 3:11 PM

dave said:

This is the first time i have seen Eric's blog. Good site.

Thanks.

# February 12, 2008 5:28 PM

Sweet said:

You guys are killin me. Why not put a few lines a code in here. Whatever you do make sure nobody can find this without spending an hour on google. Nice job

# February 12, 2008 5:38 PM

Giana sisters said:

same with my comodore64 i am sooooooo upset i cry

# February 12, 2008 5:40 PM

JS IntelliSense with Namespaces in VS 2008 at Coderoni.com said:

Pingback from  JS IntelliSense with Namespaces in VS 2008 at Coderoni.com

# February 13, 2008 12:23 AM

ButterCatZ said:

Pablo, your last post was golden. This worked in my .net 2.0 master page. I'm so glad I finally fixed this. Thank you for posting the condensed javascript.

# February 13, 2008 1:21 PM

Eric Lippert said:

Granville: though we are not of course discussing specifics at this time, you should expect that whatever we do next in the C# space will be less heavy on paradigm-shifting features for a while.

After introducing anonymous methods, generics, iterators and nullable value types in C# 2, and then query comprehensions, etc, in C# 3, we want to slow down on the massive influx of complex new language features and concentrate on more targetted improvements to the language and infrastructure.

That said, the future is big and there is a lot more we can do with this language, and yes, multi-core is going to be important.

# February 13, 2008 3:50 PM

df said:

hello

i am like hack login admin panel in asp.net web applection !

# February 14, 2008 1:59 PM

Tonya’s Teaching Blog » Blog Archive » Caps Lock? said:

Pingback from  Tonya&#8217;s Teaching Blog  &raquo; Blog Archive   &raquo; Caps Lock?

# February 14, 2008 10:18 PM

Not this time said:

I apologize in advance for this comment.  It is not directed at you in any way, you've just been caught in the crossfire.

With all the "how is this relavant", "how am I learning from this post", "this isn't what the main feed is for", why are we still seeing posts like this from anyone in the main feed?  I'm fine telling new people, hey you're back from vacation, keep it from the main feed please, but then I feel the same standard should be applied to all posts in the main feed.

It's ok to post OT if you've been around, but new people must walk-the-chalk?

IMHO, Not cool, not cool at all.

I too think we have a lot of new users and some of them may be green, but we aren't welcoming them very well.  "Do as I say, not as I do"

# February 16, 2008 3:19 AM

Mike said:

OK, so what don't you like about the Wii Play?

# February 16, 2008 9:04 AM

Brian Donahue said:

Here, here!  My theory is that Wii Play were the original test games for the Wii and they considered bundling them with the Wii, until someone(s) reminded them how stupid they were.

That said, my 5 yr old gets a kick out of some of them, so it does get some spins on our Wii. But compared to Wii Sports (let alone the better "real" games) it's really pathetic.

# February 16, 2008 9:41 AM

lfriend said:

I have to agree with you, Super Mario Galaxy is one of the best games I've played for years!  It seems easy at first as it introduces you in to the gameplay and the use of the Wii Remote, but after a few plays the difficulty level certainly goes up.

# February 16, 2008 4:24 PM

Brennan’s Blog » Blog Archive » JavaScript Browser for Visual Studio 2008 said:

Pingback from  Brennan&#8217;s Blog  &raquo; Blog Archive   &raquo; JavaScript Browser for Visual Studio 2008

# February 18, 2008 12:53 PM

Bertrand Le Roy said:

"not this time": what "main feed" are you talking about? My posts are always carefully tagged, so that organizations that choose to syndicate my contents can filter out the contents they're not interested in. It's MY responsibility to tag (and I'm doing it), and it's THEIR responsibility to select the tags that are relevant to them.

So if you see a post that you think is not relevant to whatever syndicated feed you're reading, please complain to the owner of the feed, not to the author of the post.

Mike: everything. Not being fun at all being the main complaint.

# February 18, 2008 1:26 PM

Robin Debreuil said:

I just added weblogs.asp.net/the&dark&and&mysterious&side&of&bleroy -- wow!

# February 19, 2008 3:03 AM

Matt Phipps said:

I think it just shows the weakness of clunky aggrators like DotNetSlackers that have an oversimplified approach towards the task, and then also, their overly simple audiences that don't want to do the minimal footwork necessary to get the feeds they want. Hence, I do my direct links to Rick Strahl and others.

# February 19, 2008 10:26 AM

Ronald K. said:

Bertrand,

I am subscribed to this feed: weblogs.asp.net/MainFeed.aspx with the intention of reading anything related to asp.net.

Anything you post, therefore, shows up on that feed.

Ron

# February 19, 2008 12:51 PM

lkempe said:

Welcome on board Bertrand! I am also getting this kind of frustrating comments, and I really hate that! As you are saying it is still our blog or ?

btw, your Xbox Live name is awesome!

# February 19, 2008 1:04 PM

lordabdul said:

This post is irrelevant to the feed in the sense that it's relevant to the feed. I used to like this blog because it didn't stick to the point, so please could you go back to sticking to the point of not sticking to the point? Thanks.

# February 19, 2008 7:47 PM

Luis Abreu said:

Yes, I've had that kind of problem too. I was tagging my posts with trivia but they still showed on the main weblogs.asp.net feed. Since i didn't really had any time for getting crap from anyone, I've close the asp.net blog and went back to the msmvps.com blogs where at least I can write about whatever I want!

# February 20, 2008 6:37 PM

Drew said:

This may have been addressed in an earlier comment but I wanted to clarify.

I am using an iframe under a floating div to display tooltips on a form with select boxes. The iframe is using the alpha filter for transparency in IE6, as the div has a bubble image with transparent sections. This works for most of the form, but the transparent section of the iframe overlapping the select boxes is white instead of transparent. Is this a known issue or am I overlooking something?

Thanks!

# February 21, 2008 3:10 PM

Bertrand Le Roy said:

That's known. I don't know of a workaround.

# February 21, 2008 3:54 PM

Drew said:

I was hoping that was not the case. :(

Thanks for the quick response.

# February 21, 2008 4:02 PM

LA.NET [EN] said:

[Warning: definitely not a technical post] Those 3 guys that normally read my blog (yes, I believe that

# February 21, 2008 6:09 PM

ASPInsiders said:

[Warning: definitely not a technical post] Those 3 guys that normally read my blog (yes, I believe that

# February 21, 2008 7:18 PM

Jeff said:

Awesome little app, however I have some issues with it, when I add the required files to the directory, it shows everything as it is supposed to, however when I click on an image, to see if in the center of the screen, it doesnt show at all, it only shows the 'Details', 'Previous Image' and 'Return to Folder View'.

I like this app very much, but I would LOVE for it to show the image in the center of the screen.

I'm running this on WHS (Home Server) and the client OS is Vista, with IE7.

# February 21, 2008 11:14 PM

Bertrand Le Roy said:

Jeff, please contact me  through the contact form, and I'll look into it.

# February 22, 2008 1:54 PM

Tj said:

I LOVE the windows key;

Windows Key+E-My Computer

Windows Key+R-Run

Windows Key+D-Minimize/undo minimize.

I use the windows key the most, apart from Alt+TAB and Alt+F4

But i think CAPS lock should be moved, and that "Insert" should be DESTROYED!!

I think ill just pull mine out!! =D

And if you go into control panel, and accessability options....you can make your computer beep when you turn on caps lock....then you always notice it!

# February 23, 2008 11:02 AM

Isabella said:

Well I think that is to what everyone else thinks but if it were to change the earths rotation would it have a big impact? I mean how much do we really know about Tidal Energy? because that would really help the ansmer to the question. If scientists have the proof that it will change the Earths rotation than I completely disagree with the Tidal Energy, but if they think that it will help the enviroment and keep supplying us with energy than I personaly think that we should agree, but nothing I can say or do will help prove that it can or can not. It is really not up to us... Thank you for reading this.

# February 24, 2008 11:02 AM

Marc Rubiño **Marckys** said:

Siempre oí hablar del infierno de las DLL pero cuando hablamos de desarrollos web no nos podemos olvidar

# February 24, 2008 5:27 PM

Marc Rubiño **Marckys** said:

Iframe + AjaxControlToolkit v1 + IE = Access Denied Cross Domain Siempre oí hablar del infierno de las

# February 24, 2008 5:34 PM

Brock Allen said:

In VS2008, if I use:

function Foo()

{

/// <param name='x' domElement='true'>x</param>

}

Should I get DOMElement intellisense for x? If so, it doesn't seem to be working. Same for:

/// <returns domElement='true'>

# February 25, 2008 2:17 PM

Bertrand Le Roy said:

@Brock: I don't think that's handled in 2008, no.

# February 25, 2008 2:27 PM

whatispunk said:

I'm also getting the same error as Ev.

"Error updating JScript IntelliSense: JScript IntelliSense has been disabled for referenced scripts. A referenced script may have caused a stack overflow. Reopen this file to reenable IntelliSense."

Any progress on that one? This is the only Google result for that error message.

# February 26, 2008 12:29 PM

Cathy said:

Hi Bertrand,

I want to change background color of thumbnail. I changed the following code:

private static readonly Color BackGround = Color.White;

However, the color remains blank.

Please help. Thanks.

# February 26, 2008 10:12 PM

Jeff King (msft) said:

@whatispunk: There actually is a limit to the XML Comment data per section.  This was a implementation limitation we could not work around.  I'm sorry to say that you'll just have to shorten your XML Comment data.  I'll keep this in mind to fix for our next release.  Thanks!

# February 27, 2008 1:42 AM

MuffinBottom said:

Pablo, your fix works like a champ!

# February 27, 2008 9:51 AM

Paul Mc said:

Yeah Pablo, thanks. I work for a major corp and we had a big rollout this morning when we saw that error. Thanks, it worked.

# February 27, 2008 9:55 AM

Dimitris said:

I can't simulate this and never ever had such a problem. I don't think that it is that straight forward, since I see that other people as well (Carol) don't get that error!

I used to test it:

Session.Clear();

Session["Test"] = "test";

Response.Redirect("default.aspx", true);

The session is never lost

# February 27, 2008 9:59 AM

rox19840702 said:

ASP.NET AJAX Documentation Update, Videos and Cool Articles

# February 27, 2008 11:32 AM

Bob Lindabury said:

Pablo's "dirty fix" fixes the cross-browser issue in IE when using Ajax.

However, this same script causes an error in Firefox2. I can only see the error using Firebug.

The error I see is:

a.getBoundingClientRect is not a function

If I don't have Pablo's script in the page, I do not get this error in Firfox.

My suggestion to those using this hack is to do a browser check and if the browser is Firefox, return.  If some version of IE, run the rest of the script.

# February 27, 2008 11:46 AM

Bertrand Le Roy said:

Yes, DO NOT use Pablo's fix. It is overwriting the implementation of the method for all browsers with the one that's specific to IE.

# February 27, 2008 12:45 PM

Bertrand Le Roy said:

Cathy: that's this issue:

www.codeplex.com/.../View.aspx

The bug is not fixed in the current release but the discussion on it contains a fix.

# February 27, 2008 12:55 PM

cis said:

what about:

if (!someObject)

is this true when someObject is null OR undefined, or just null?

# February 29, 2008 1:19 PM

Ramiro said:

I found a great way of doing what i need it, e leave the link so you check it out.

www.hedgerwow.com/.../css-select-free.html

# February 29, 2008 1:51 PM

Bertrand Le Roy said:

@cis: sure, !someObject will be true for undefined and null.

# February 29, 2008 1:56 PM

James Newton-King said:

I am really happy with how Json.NET 2.0 and LINQ to JSON is turning out. This release offers big improvements

# March 2, 2008 2:20 AM

Lou said:

hello, seems to be a nice album, but it's not working on my hoster. sohosted.com

I also have this problem:

The issue I'm having is that it is scanning all my folders. I only need it to scan one specific folder and all subfolders under it. When I move the .ashx file and page to the folder that I want to show (meaning the main folder or first folder that should display) all I get are X's for all the images. Any ideas?

sohosted.com is running on medium trust, changin the location of the cache to none or memory doesn't fix the problem....

somebody knows what to do?

Regards

Lou

# March 3, 2008 8:04 AM

Bertrand Le Roy said:

@Lou: it seems like you're using the user control version. If that's the case, you can try to set the HandlerUrl property to point at the ashx file, and also the Path property on non-postback requests.

# March 3, 2008 2:28 PM

Tales from the Evil Empire said:

I've said some time ago that I personally would have preferred if IE8 was in standard mode by default

# March 3, 2008 8:24 PM

Denny.NET said:

Passing a JSON object to a WCF service with jQuery

# March 3, 2008 8:55 PM

Tanjia said:

i tnink who all said these are all goat....its nothing seems me to be funny

# March 4, 2008 5:33 AM

John Doe said:

I have to say ASP is lacking in sophistication, Why would I ever want to create an array with 1001 elements when assigning a size of 1000, asp should either start with a base index of 1 or make Dim arraySize(1000) return an array of size 1000, stupid Microsoft Vogons

# March 5, 2008 1:46 PM

Bertrand Le Roy said:

@John: let's not talk about how off-topic you are and how classic ASP is a ten year old product that has long ago been replaced by ASP.NET. Instead, let me point you to some poetry:

www.cs.utexas.edu/.../EWD831.html

# March 5, 2008 2:29 PM

Max C said:

Bertrand -- just a quick note to point our that your comment below is wrong:

"Max: the issue doesn't affect many users as you need to use iframes *and* have your iframe be in a different domain. That is not that common ..."

Every public site gets put in an iframe by someone, sometime.  The developer has no control over this and definitely does not need to be using iframes themselves to be affected, as you claim.  I don't use iframes myself and am still dealing with the fallout from this over a year later.

# March 6, 2008 1:54 AM

Atanas Korchev said:

Are you aware of any issues with getLocation and the recently released beta 1 of IE8? I've checked the autocomplete extender and its dropdown seems a bit off:

www.asp.net/.../AutoComplete.aspx

# March 6, 2008 4:25 AM

Bertrand Le Roy said:

@Max: I'm sorry this affected you but that doesn't mean it affects everyone as you claim. Indeed, support does not seem to be getting that many incidents around that issue. Anyway, this is fixed in the current version of .NET (3.5).

# March 6, 2008 12:40 PM

Bertrand Le Roy said:

@Atanas: yes, we're currently doing a test pass with the IE8 beta and we know of a few problems. getLocation is one API where we have literally thousands of test cases and where new browsers are likely to break the current code because of how tied it is to browser bug workarounds.

# March 6, 2008 12:43 PM

WTF said:

Update 1, Update 2, Update 3, sends you to a new page that says there is yet another update on another page....what's the deal....this page is a collosal waste of time

# March 8, 2008 12:08 AM

Max C said:

Bertrand -- if you don't agree you might be respectful enough to explain where the hole in my logic is.  If you think for a moment, perhaps you'll realise it absolutely does mean that everyone was affected.

# March 10, 2008 5:09 AM

Bertrand Le Roy said:

@Max: I'm sorry if you felt that I've been disrespectful, that wasn't my intention. I think there's a differnece between disagreeing and being disrespectful.

I agree that *potentially*, everyone is affected, but in reality, this issue is relatively rare, as is attested by the number of support calls. I disagree that "every public site gets put in an iFrame by someone, sometime" and anywaythe person setting up the iframe should probably be the one making sure it works. Furthermore, the problem is fixed in the current version of the framework. If you would like a QFE for previous versions, please contact support but I think it unlikely to happen as there is a reasonable workaround.

# March 10, 2008 12:46 PM

Bertrand Le Roy said:

The page that the updates links to points you to another download for a completely different feature, not for sitemaps.

# March 10, 2008 12:48 PM

Benedict Sauri II said:

Wow, thanks a lot it really works!

# March 11, 2008 12:08 AM

Vijay. R said:

HI!

I first of all like to Thank You for Shsring this wonderful article with us.

My problem with this control is, I am Having Alert with YesNo buttons in My Project. Now I want to Know which button is Clicked(i.e thro Server Side Coding).

Plz Help me to Solve this issue.

Thanks and Regards

Vijay. R

# March 11, 2008 3:12 AM

Bertrand Le Roy said:

@Vijay: if you look at the alert.aspx sample page, you'll see an example of that: just handle the OnChoice event, and you'll get an AlertChoiceEventArgs parameter that gives you which button was clicked through its Result property.

# March 11, 2008 2:23 PM

Andrei Rinea said:

Something called "degradable" AJAX?

# March 11, 2008 7:24 PM

Bertrand Le Roy said:

@Andrei: yes. There are many ways you can achieve that, but UpdatePanel is an easy one.

# March 11, 2008 7:35 PM

JA said:

are you actually talking about the AJAX updatepanel or the asp.net 1.1/2.0 feature that lets you output cache a page then define control which update (can't remember the proper name for this feature)???

# March 11, 2008 9:02 PM

Bertrand Le Roy said:

@JA: UpdatePanel (as should be clear from the first sentence in the post ;)

# March 11, 2008 9:04 PM

Nathanael Jones said:

jQuery does a good job at it with the offset() method. I really like the way jQuery is chainable and how properties are implemented.

Seriously study jQuery! I've found it to be the best, easiest, and least intrusive.

# March 11, 2008 10:37 PM

Dave said:

I don't know that the SEO case is a good one to make.  Other than some fancy improvement to the LinkButton, most of the controls that trigger postbacks (or partial postbacks) are going to be disregarded by search engine  spiders anyway.

That said, I do use them for progressive enhancement sometimes myself.  Usually only in scenarios where I can disable ViewState.  It's nice to know that users with JavaScript disabled or XHR not available can still submit the form and get a traditional postback with the same results.

# March 11, 2008 11:22 PM

Brennan Stehling said:

I do believe that UpdatePanel is the poor man's AJAX which is easy to implement. The reason it is not a great solution is the fact that it still pushes around the ViewState and a consequence of that is only one request can be processed at a time. You basically have to manually queue up the requests on the client-side if you know the ASP.NET AJAX client-side API well enough to do so. (Queuing is handled automatically by Telerik control, for example. MS AJAX should have made this a simple option.) Alternatively, you can use the ScriptResource attribute on web services to convert web services into JavaScript proxies that can be emitted through the ScriptManager. You can make multiple calls on these proxies which does not require ViewState and it also does not instantiate the control hierarchy on the server-side. You can even use the LoadControl method to instantiate a UserControl in a web service method and return the markup for the control. The downside is that you cannot get that markup to work in the PostBack model. You have to make a decision to live with PostBack or break out of that model. I will use both depending on the conditions, but I do lean toward the AJAX-ified web services because they are truly asynchronous and the data transfered is significantly smaller. In one case I was polling the server and the response was as small as 1 byte, versus what is typically 10k to 60k with an UpdatePanel.

# March 12, 2008 1:28 AM

Dmitriy Nagirnyak said:

Please show us ASP.NET web sites that fully support degradable AJAX with UpdatePanel. Not only first-time rendering and calculate efforts involved in it.

UpdatePanel doesn't introduce degradable AJAX, it only allows you to render first-page.

If you say it will be indexed properly by search-engines, you are probably wrong.

Think about AJAX-paged grid with list of products.

First page will probably be indexed, but not all others.

So what's a point?

Only humans can do all properly.

With MVC (ASP.NET MVC, or MonoRail) it is much easier to implement fully AJX degradable site (using ViewComponent (MonoRail) or UserControl).

I don't say UpdatePanel is evil (thou I often think about it). It is very productive way even if it is just against the AJAX-theory. But later or earlier you'll find you need to improve performance, make page REST-full etc.

UpdatePanel is just a good idea to *workaround* AJAX non-availability in WebForms.

# March 12, 2008 1:57 AM

Danijel said:

I am still into UpdatePanel story. Maybe, I don't have demanding projects ;), who knows?

Bertrand, can you name a few authors or give a link to "true" Ajax story?

# March 12, 2008 6:03 AM

Jay Kimble said:

Bertrand Le Roy has an interesting post called " a case for partial rendering ." I started to comment

# March 12, 2008 11:32 AM

David Parslow said:

I know that the term laziness is used a lot in software development, but I like the term "avoiding waste" or productive better. It is not only perfectly ok, it is far better to use the more productive approach, combined with continuous improvement.

In this case, implementing "true" Ajax (i.e. lower level Ajax) often drives up complexity and delivery time while adding little value to the process and maybe the Ajax-enabled feature is not even useful to begin with.  While UpdatePanel, on the other hand, often provides all of the value that your customer requires (i.e. faster/more responsive interactivity, but maybe not the fastest or leanest possible), but with little effort.  If it is a business critical pipeline then the MS Ajax framework allows you to go lower level / “lean” Ajax at that point.  In short, when using UpdatePanel the “pros” far outweigh the “cons” for a wide range of applications in WebForms in my opinion.

# March 12, 2008 12:09 PM

Bertrand Le Roy said:

@Dave: sure, you shouldn't hide contents that you want indexed behind postbacks, but that doesn't make my case any weaker.

@Brennan: I think you're missing the point. I'm not arguing that UpdatePanel is the best solution in all cases and you should always use it. What I'm arguing is that there are *cases* where it makes more sense (and having ViewState can be a good thing too). As a side note, you might want to take headers and request into consideration when you make network traffic measurements: there is no such thing as a single byte request.

@Dmitriy: sure, it's not enough and using UpdatePanel is not the only thing you need to do if you want to optimize for search engines. But it does help. You cite MVC, but you can also just handle pagination with plain links. One thing that works well is to have links with an href such as "page.aspx?p=2" and an onclick such as "goToPage(2)", which enables Ajax pagination and search engine crawling at the same time.

@Danijel: there are plenty, but just to cite one, you can look at Michael Schwartz's or Dino Esposito's blogs.

# March 12, 2008 12:42 PM

me said:

I think you have to use an update panel if you want to use asp.net validation controls. I researched for days trying to find a way to use the validation controls with the web service pagemethods approach and it couldn't happen as far as I can tell. If someone knows how to use the validation controls with asp.net ajax web services then please post up how, otherwise I continue to use update panels..

# March 12, 2008 2:35 PM

Matt said:

Dimitris- Clearing the Session is not the same as the Session never existing in the first place.  An appropriate test would be along the lines of:

Session.Abandon();

Session["Test"] = "test";

Response.Redirect("default.aspx", true);

I tested the above code as a button click handler on an otherwise empty web form called test.aspx, then on page load of default.aspx I set the Text property of a Label control to the value of Session["Test"], if Session["Test"] was not null.  With your code using Session.Clear() it worked fine (default.aspx displayed "test" in the label).  With my Session.Abandon() version it mimics the issue described in the article.

For what it's worth, when we experienced this problem after a deployment it turned out to be the server name containing an underscore as mentioned in Update 2.  Accessing that machine by the IP works fine (it's an internal application so the users just updated their favorites to point to the static IP instead of the hostname on the LAN).  That will have to do until our customer's IT department sees fit to change the hostname of the server.

Thanks again for the article Bertrand, saved me from pulling my hair out.

# March 12, 2008 3:43 PM

Siderite said:

I will tell you a story about partial rendering with UpdatePanel. I was asked by our client to make a report that can have some column or row categories collapsible. Basically it was a big table with lots of data in it. I made the control, I tested it with postback, it worked, then I added an UpdatePanel and watch it display without flicker, but about two or more times slower!

I was flabbergasted. I tested it again, more thoroughly, and I noticed that the same thing did not happen so bad in FireFox. As I knew about a similar problem from before, I used a similar solution: I changed the style.display property of the div containing the updatepanel to 'none' and I changed it back to null with RegisterStartupScript. And voila! An increase of 50% in speed with some flicker :)

In other words, don't attack the UpdatePanel, when in fact it may be a browser issue. I would like an IE option to disable visual refresh for some or all elements, then reenable it...

# March 12, 2008 5:03 PM

Luis Abreu said:

hum...well, I still believe that an asp.net ajax application shoud have...several pages :) this would solve the indexing problems, right?

regarding the page refreshing, I concede that the UpdatePanel might be the best solution if you're worried with security (ex.: you're getting data from a secure web service  and calling it is really really much easy on the server side). should you use the updatepanel: well, it depends. I'd say that there's nothing wrong with it if you know what you're doing.

should you always *use* the update panel:no.

should you prefer JS code+webservices over updatepanels: the correct answer would be yes, but we all know that there are other factors that might make using the UpdatePanel a better option (ex.: if you're working with 2 more people and none of them understands why if(i = 1) is true, the panel is the way to go)...

PS: i do really admire the UpdatePanel. It's really great and it really makes partial postbacks available to everyone. I guess that I stoped liking it when MS tried selling it as the best AJAX approach and stopped developing the client side of the framework to polish the server side (ie, the UpdatePanel and friends )

# March 12, 2008 6:47 PM

Bertrand Le Roy said:

@Luis: I think you're almost completely wrong :)

Having several pages solves part of the problem, yes, but only part: each page must still have the contents included in the GET request, which a "pure Ajax" page wouldn't. On having several pages I agree with you as I'm no big fan of single page interfaces if the site is a content site. If it's a non-contents application, you probably don't care about indexing anyway.

I don't get your argument about security: information that can be accessed through an UpdatePanel is not any more secure than information that can be accessed through a web service is it? Am I missing something?

Again, I don't think you should always prefer JS and web services over UpdatePanel, for the reason I expose above, for the productivity reason, because it can actually be faster to render on the server in some cases, I could go on.

Finally, I'd like to know who in the team ever said that UpdatePanel was the best Ajax approach... And what makes you think that we stopped developing the client-side of the framework??? I'm developing it right now, at this very moment, so I'm more than a little surprised by this assertion...

# March 12, 2008 7:07 PM

Frank Wang said:

I agree the search engine part, but I am just a firm believer that client-side script is the only way to go if you want your web sites to be truly ajax'ed.

# March 12, 2008 10:48 PM

James said:

Anyone have a link to an example of a site using ASP.NET AJAX that gracefully degrades when javascript is turned off (progressive enhancement)? I'd appreciate it. Thanks.

# March 14, 2008 6:37 PM

Bertrand Le Roy said:

@James: I don't have a specific address to give you, but try to put a couple of controls and buttons inside an updatepanel and navigate to the page without JavaScript. Should work just fine.

# March 14, 2008 7:40 PM

John Doe said:

We're sorry for flaming your blog -- we're a couple of C++/Java programmers (both of which have indices that start at 0) so we weren't complaining about the indexing system, just that dim/redim(x) produced an array x+1 long, since dim/redim takes x to be the highest index of the new array rather than the new size.  Working through a site translation to ASP, unexpected quarks (every langauge has 'em) were frustrating.  Either way, it wasn't right to take it out on you.  Please forgive us.

# March 15, 2008 2:39 PM

Sridhar said:

Hi,

  Thanks for writing such a nice tool. I have tried on my website and everything works fine. However there is one photo that doesn't show the details when I use the aspx page and clicked on it. If I use the Album.ashx the same photo displays the details. To experience this behavior please go to

www.tampatennisleague.com and click on photo gallery. for now I set the url to Album.ashx to display the images. If you go to that page, you will see two photos. The first image is the one that I am having issues. If you go to www.tampatennisleague.com/.../photogallery.aspx you will see the same photo. And if you click on it, it doesn't display the details.

I am not sure what could be wrong?

Thanks,

sridhar.

# March 15, 2008 11:13 PM

Stefan Sedich said:

I have used the updatepanel in a current project and have gotten some good results. I have created a custom linkbutton that would pump out a normal link for non js users, a postback for js users, I also used the asp.net ajax history control to support full back/forward/bookmarking support with ajax.

In my case the update panel was the most logical option, as I was only doing it for a listviews paging, and product option selection. I could have gone with a webservice that rendered the html and returned that but with limited time frames wrapping everything in an updatepanel was the fastest option. But with the custom link button and a little extra code it degrades nicely if JS is turned off, I do this by making the url link use query strings and then a postback for my ajax support. So say to select a page I would use a link like site/.../catalogue.aspx, so that is what a searchengine would folow but a client with js on would do a postback.

The only issue I have at the moment is that the search screen needs JS, as it has some advanced controls on it etc. But as the whole product catalogue will still be indexed I think this is something I can live with. I will be posting links to these sites on my blog when they are live which should be by the end of the month :)

Thanks

Stefan

# March 16, 2008 9:49 AM

Bertrand Le Roy said:

That's ok, thanks for taking the time for an explanation. Sure, language quirks can be tricky. In VB.NET you can do Dim A(0 To 19) which can be more explicit and avoid that kind of headache.

# March 17, 2008 1:24 PM

Bertrand Le Roy said:

Sridhar: I have no idea. The image isn't even in the dom. Drop me e-mail at bleroy at microsoft com and we'll try to debug into it.

# March 17, 2008 1:31 PM

Construct Web » IE, the Hell That Thou Hast Wrought said:

Pingback from  Construct Web &raquo; IE, the Hell That Thou Hast Wrought

# March 18, 2008 7:51 PM

Oldschool said:

I'm not able to reproduce the "problem"

First time you load the page:

Session["dummyToKeepSessionAlive"] = "xD";

Second time you load the page:

Session["LoggedIn"] = true;

Response.Redirect("Loggedin.aspx");

Third time you load the page:

if(Session["LoggedIn"] == true)

NeverFailedMeOnce();

# March 20, 2008 6:04 PM

mike said:

One mistake you made: the update panel requires a postback in most common scenarios right? So it actually will only allow spiders to fetch the first content, not the rest (after updates of the panel).

# March 22, 2008 1:53 PM

Daryl said:

Hello,

I am trying to load this gallery on my site ( I think it looks great, and can run it locally - but once I drop it in to a test folder on my server (Windows 2003, it's a dedicated and I have it set up with 2.0) I get the following error that I am hoping you can shed some light on:

Line 1:  <%@ Page Language="C#" %>

Line 2:  <%@ Register Src="~/album.ashx" TagPrefix="photo" TagName="album" %>

Line 3:  

Line 4:  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "www.w3.org/.../xhtml1-transitional.dtd">

Source File: /test/default.aspx    Line: 2

I placed the template of my site on the .aspx files and changed the name of the Album.css to style.css - also adding the necessary info to the style sheet to make it flow along with my site.  I don't see how this would have caused a problem for me.....I'm thinking it is something else.  Help, I would love to use this template!

# March 23, 2008 5:31 PM

Bertrand Le Roy said:

@Mike: I never said otherwise. I think you missed the point, which is that on the GET request, if you do "pure Ajax" you don't get anything indexed. And if you look at Stefan's comment just above yours, he describes how you can have postback links that degrade to regular links in the absence of JavaScript, which enables search engines to follow and index them.

# March 24, 2008 3:14 PM

Bertrand Le Roy said:

@Daryl: I'm guessing the handler is not at the root of the web application on the server, and thus the server can't find it at ~/album.ashx.

# March 24, 2008 3:15 PM

K. Scott Allen said:

Given this simple Employee class: public class Employee { public int ID...

# March 25, 2008 10:24 PM

BusinessRx Reading List said:

Given this simple Employee class: public class Employee { public int ID { get ; set ; } public string

# March 25, 2008 10:27 PM

rudgr said:

Could it be that this doesn't work in IE8 beta? Thanks!

# March 27, 2008 11:12 AM

Bertrand Le Roy said:

@rudgr: can you be a little more specific? What problem are you experiencing?

# March 27, 2008 1:14 PM

Carlo Capocasa said:

Actually, you can create the Iframe dynamically... you just need to do so immediately after the body tag. Here is an altered version of HistoryIE.htm:

http://pastebin.com/feac6f97

# March 28, 2008 11:17 AM

Bertrand Le Roy said:

@Carlo: thanks, that's interesting but you still need to include that script at a specific place on the page, so you might as well include the iframe instead, it's just as simple.

# March 28, 2008 1:29 PM

.Net World said:

First the disclaimers/warnings. The following uses preview technology. It requires VS2008 and the ASP

# March 29, 2008 2:23 AM

MichaelR said:

Great Work...

All is working well in my local machine. But when I publish it on my website and click on my Gallery Menu...

It is prompting me a user name and password and not allowing me to access my gallery...It has something to do with the permission with my host...but When   I checked my rights I have drwx...

Is there something else that I need to changed in the codes...Can somebody please give me some suggestion that I can try to make it work....or If somebody encountered the same problem please let me know what to do. I already changed the Caching to Memory but still the same...

Thanks very much in advance.

MichaelR

# March 30, 2008 4:47 PM

Bertrand Le Roy said:

@Michael: I have no idea. You should check that with your hoster. Let me know what you find.

# March 30, 2008 5:11 PM

MichaelR said:

I was wrong...Memory Caching sorted it out.

But I get some links and red croses though in some of

the pictures though...Is this a bug or Is there a work around with this.

Thanks very much

# April 1, 2008 3:40 AM

Bertrand Le Roy said:

@Michael: are the broken images consistently the same images? Are they jpeg images? Is there a public url where I could have a look?

# April 1, 2008 12:50 PM

Jon said:

Has this been fixed with 3.5?

# April 1, 2008 3:24 PM

Bertrand Le Roy said:

Yes.

# April 1, 2008 3:38 PM

John said:

Hi, I downloaded the files from codeplex. I have VS 2005 installed. What I should do? What steps I need to follow?

I have album.ashx file

Then Samples directory contains

Default.aspx

Templated.aspx

and Album.css

Where should I copy these files?

What file I shoud open in VS 2005? Is their any project?

How do i assign the directory in which the images are placed?

Can some one help me? I will create a Video movie and upload in Youtume or any other location for the benefit of others.

Thanks

# April 2, 2008 1:38 AM

MichaelR said:

Hi Bertrand,

My images are in jpeg format.

(thumbnails) red crosses and link are coming out inconsistently in these series...

thummnail ok   thummnail ok  thumbnail ok    red cross  red cross  red cross link link link thumbnail ok...

I say inconsistenly, I mean sometimes when you view the gallery red crosses and links come out the other time they are fine.

url: www.aikidoclub.net

Thanks very much

# April 2, 2008 3:45 AM

Naor Rosenberg said:

If you use Dojo Toolkit's "dojo.dialog" widget to display the popup div, they do all the work for you.

Actually they use the IFrame solution.

# April 2, 2008 8:57 AM

Bertrand Le Roy said:

@Naor: err, sure, as does the ASP.NET menu, the popup control in the Ajax Control Toolkit and many, many other similar components.

# April 2, 2008 12:25 PM

Bertrand Le Roy said:

@John:

* In a web application on your web server. If you want to use just the handler, you just need bin and the ashx. If you want to use it as a control, you need the rest.

* Why do you want to open Visual Studio? If you want to open the web site in Visual Studio, just do file/open/web site and point VS to the web application

* It depends if you're using it as a control or as a handler. If it's as a handler, the images should be in the same directory. If as a control, just set the Path property.

# April 2, 2008 12:36 PM

Bertrand Le Roy said:

@Michael: we should take that offline. Please write me e-mail at bleroy at microsoft. There is a server error on these images but I'm unable to diagnose it because you have cutom errors on (which you should, this is absolutely the right setting). We should be able to sort this out via e-mail. Thanks.

# April 2, 2008 12:45 PM

Morgan said:

If you get this error message when you try to use Snipping Tool:

THE SNIPPING TOOL IS NOT WORKING ON YOUR COMPUTER RIGHT NOW. RESTART YOUR COMPUTER, AND THEN TRY AGAIN. IF THE PROBLEM PERSISTS, CONTACT YOUR SYSTEM ADMINISTRATOR.

Try running Office Diagnostics (Outlook -> Help -> Office Diagnostics).  It fixed the problem for me.

www.microsoft.com/.../default.aspx

# April 2, 2008 2:58 PM

ASP.NET Debugging said:

So after using IE8 for a while now, there are a few things that are useful for people to keep in mind.&#160;

# April 2, 2008 11:12 PM

Raghavendra said:

But unfortunately if the PST size is huge.. this tool doesnot do anything :(. My PST have moved over 1GB and now i am totally lost. I cannot do anything with this PST. As soon as i touch this PST, my machine hangs and i have to hard reboot the machine :(. Totally in a bad state

# April 2, 2008 11:43 PM

Joel Levi said:

I was alo facing the same issue with Redirection but Bertrand Le Roy's article solved it. Works fine now.

Thanks, very helpfull.

# April 3, 2008 1:56 AM

ASP.NET Debugging said:

So after using IE8 for a while now, there are a few things that are useful for people to keep in mind.&#160;

# April 3, 2008 10:11 AM

Bertrand Le Roy said:

@Raghavendra: you should contact support.

# April 3, 2008 12:50 PM

brute forced brilliance said:

It's Time for a Change -- We need Immutable Types

# April 3, 2008 1:13 PM

Jonah Dempcy said:

Nice link! Some interesting topics, good reading!

My vote for best JS blog goes to John Resig: http://www.ejohn.com

obligatory BSP: I am a contributor to a JS/CSS blog called The True Tribe (www.thetruetribe.com) ... The blog is just getting started but so far we've been posting regularly (a few posts a week) about a range of front end web dev topics, with a focus on JS.

# April 3, 2008 4:05 PM

Rob The Jedi said:

This is awesome!

# April 3, 2008 11:42 PM

Girish Singh said:

Seems pretty neat to me, I mean I always thought php was born to be with apache, I guess thats gonna change very soon

# April 4, 2008 11:20 PM

Joe Chung said:

Brendan responded to your question in his blog.  For your readers' convenience:

"Only the @shared value would be shared among script tags. The @src would be loaded only if there was no cache entry for @shared."

# April 5, 2008 1:18 AM

Philip said:

I don't see the security difference between the two plans: how do you guarantee that the hash "generated with a well-defined cryptographic hash algorithm" really matches the javascript file referenced by the src attribute? To do that, you would have to have the browser compute the hash after receiving the javascript file (and then, why are you specifying it in the html in the first place?).

The two plans are equally insecure and share the attack that you describe.

# April 5, 2008 2:51 PM

Bertrand Le Roy said:

@Joe: yes, I actually read Brendan's answer before I wrote that post, but I don't see how it answers my question. I reformulated with another comment that for some reason he chose not to publish. That's why I posted my comments on my own blog ;) The attack scenario that I describe in this post, unless I'm mistaken, is not mitigated by his answer in any way as the src value would never be hit if something is already in the cache for the shared value, which may be a malicious script.

@Philip: I think the third solution that I describe doesn't have this flaw at all. But Doug's approach is much more difficult to compromise than Brendan's: the scenario with his approach is that the cache is organized as a dictionary of hashes to scripts. When you visit a page, if there is a script with a hash attribute, the browser looks up that hash and if it finds it it uses the script. But the way the cache is being constructed is what guarantees the integrity of the hash: the first time a script is loaded, the browser computes the hash locally from the contents and uses the computed hash as the key in the dictionary. Does that clarify?

# April 5, 2008 5:52 PM

Kurisu said:

A lot of storage systems use exactly this concept i.e., storing hashes of files or chunks thereof along with the files themselves and use this to avoid transferring or sometimes even storing the same data more than once. Not surprising very similar ideas have been around for years and decades. Consider the ETag header, the Content-MD5 header or much closer RFC 2169:

www.faqs.org/.../rfc2169.html

The Gnutella network takes advantage of this RFC.

Calling cryptographic hashes too weak for this purpose borders on reality distortion field. How do these people think cryptographic signatures or SSL/TLS works? Not to mention that attacking the hashes by trying to generate evil twins is the least probable attack vector. Anyway, in this context though I'd consider it a total pain for maintenence. At the very least it would require dedicated tools to keep everything consistent during updates. Also if I was going through all this hassle I'd extend this to all files not just JavaScript. For browsers or proxies that already implement caching this would be a low-hanging fruit anyway. All they need to add is an index with the hashes for the cached files.

# April 8, 2008 12:55 PM

Bertrand Le Roy said:

@Kurisu: thanks for the pointers. I agree that crypto hash attacks are blown way out of proportion by Brendan, who tends to generate a quite powerful RDF. That he would be using a security argument to dismiss Doug's approach and propose his own approach which has a much bigger security problem is quite puzzling. And yes, Doug's post wasn't limited to script and neither should any implementation of that stuff. CSS and images would benefit from the same optimizations. To cite the post above, "all elements that have a "src" or "href" attribute".

# April 8, 2008 5:14 PM

masterMunkus said:

This is working fine on my local machine

but on the server it just shows white bg , missing images and links , I have set my server to allow the application write permission. Any thoughts

# April 8, 2008 9:08 PM

Bertrand Le Roy said:

Check that you configured the directory where the handler is as a web application.

# April 8, 2008 9:10 PM

Dom B said:

When was this version last updated ?, is it possible to list the picture in the order in which they were taken rather than there file date ?

Create tool btw

# April 9, 2008 4:25 PM

Bertrand Le Roy said:

@Dom: in June 2007.

The file date is only used as a last resort after the metadata has been searched in at least two different places so if it's not working for you, please file a bug on CodePlex and link to an image where this is not the case.

# April 9, 2008 4:34 PM

Kurisu said:

I hadn't actually read the linked articles before commenting. Now I see he even mentions base32 encoding of the hash which kinda shows where Doug got this idea from.

I think what Brendan meant is similar to DTD URIs in XML. These can be normal HTTP URLs and it's certainly useful to avoid namespace clashes. A few parsers do/did really try to fetch the DTD from such URLs if it wasn't stored locally. This can easily cause an unintended DDoS. Likewise it's only safe if you can trust DNS and the server. So signing the scripts using PKI and/or use of TLS is probably implicitly given. Anything would mean someone misunderstood cross-site scripting. If you use only signatures i.e., you trust everything signed with certain keys but no explicit hashes that means of course the script can be modified by the key owner for good or for bad.

The DDoS issue could be circumvented by using Coral: www.coralcdn.org

All in all, I believe both suggestions are actually complementary.

This article is also related and somewhat interesting:

changelog.ca/.../gnutella_does_not_need_the_x-alt_http_header

# April 9, 2008 7:13 PM

Matt said:

Response.Redirect("~/default.aspx");

...should be...

Response.Redirect("~/");

12 less keystrokes will a) prevent your URL from looking ugly/unprofessional, and b) when you upgrade your site to the next big thing and the file extensions change (remember going from asp to aspx?), the links that search engines spidered won't stop working.

# April 10, 2008 11:16 AM

PineTree said:

Everyone should take just a moment and glance at

whswebsite.googlepages.com

Two fellas started with Andrew Grant's Whiist, added a ASP.NET 2.0 Starter Kit, and mixed in Microsoft's Free Express software to produce fully functioning dynamic websites hotsed on their Windows Home Servers.

Really take a look

* Albums (two methods)

* Forum

* user Login

* Polls

* etc.

And it is easy to read and follow and ALL Free

# April 10, 2008 2:36 PM

Richard said:

Excellent article and the update section helped here with regard to maximum number of worker processes with a value above 1

# April 11, 2008 2:17 AM

Venkatesan said:

Hi,

This is simply superb. But I need to customize the alertbox.

1. Currently the alertbox can be resized by dragging it. I dont want to resize it.

2. I want to change the opacity of the page excluding alertbox like the one in ajax control toolkit modal popup.

3. I dont want the title --Webpage Dialog in the alertbox

4. I need to add some images in the alertbox.(Example: For an error message ,one image will be shown. For a normal information,some other image will be used)

Thanks,

Venkatesan  J

Prince of Pammal

# April 11, 2008 7:19 AM

Kid said:

Is possible to change the backcolor to a thumb image?

# April 11, 2008 10:00 AM

Bertrand Le Roy said:

Venkatesan: those are interesting suggestions, but this code is provided as is. Feel free to implement those if you want to, and I'll be happy to point to your modifications from here.

# April 11, 2008 5:10 PM

Bertrand Le Roy said:

# April 11, 2008 6:12 PM

Desperado said:

Where can i download this song?!

# April 13, 2008 7:53 PM

Fabien Molinet said:

Hi Bertrand,

I have done a small Javascript that corrects this SELECT bug under IE  :

www.fabien-molinet.fr/index.php

It does the trick automatically for you.

The code is released under BSD licence.

Furthermore, you'll find 3 public methods in the Javascript. I think that you'll find them usefull :)

Please give me some feedback !

Best regards,

Molinet Fabien

# April 14, 2008 3:40 AM

@Bertrand Le Roy said:

I'll try to insert the propose fix but doesn't resolve the problem!

Thanks

# April 14, 2008 4:59 AM

Mina said:

create comments by php

# April 14, 2008 11:51 AM

egainey said:

I can't figure out how to get this work! What am I missing?

1. Create Dropdownlist

2.Create iFrame

3.Create div with matcing style...

What else do I need to do...please help this is URGENT!

# April 14, 2008 5:50 PM

Fabien Molinet said:

Hi egainey,

Can you give us more information ? :)

You can mail me at : fabien.molinet[you know what]gmail.com

I'll help you.

Best regards,

Molinet Fabien

# April 15, 2008 8:13 AM

.Net World said:

Given this simple Employee class: public class Employee { public int ID { get ; set ; } public string

# April 15, 2008 1:45 PM

lansol said:

beware that if your PST file is over 2GB, this may not work.

# April 16, 2008 5:03 PM

ASP.NET Debugging said:

So I tend to describe a lot of issues here, but we had some really great conversation in our blog chat.&#160;

# April 17, 2008 8:43 PM

James said:

I was lossing session data after clicking on a new page on a web site I was building only one of the pages out of about 25 was having this issue and it was always the same page.  As soon as I copied the page on to the IIS server on my computer the problem went away.  I think that something was going wrong on the server that visual web developer 2005 was running.

# April 18, 2008 4:12 AM

Bikaram said:

Thanks This was very useful to me

# April 18, 2008 9:11 PM

julz said:

CHECK YOUR RECIEVER IS IN FRONT OF THE TV!

YOU KNOW? THE LONG BLACK RECTANGLE THING THAT RECIVES THE WII REMOTE SIGNALS?

YEAH THAT.

# April 19, 2008 11:48 PM

Mehedi said:

Nice. I learned a great thing today.

Thanx

# April 20, 2008 3:01 AM

Bertrand Le Roy said:

@julz: no need to scream. For your information, the device you are referring to is no receiver, even though Nintendo misleadingly calls it a sensor bar. Quite the opposite in fact: it contains a couple of infrared diodes. The receiver is a small IR camera in front of the wiimote. Nintendo needed that in addition to the motion detectors to get better precision, but when you're in the middle of a swing, the wiimote is pointing down, so the camera actually doesn't see the IR dots and can't help. Add to this the lack of precision of the motion detectors on fast movements and you pretty much can understand why golf games don't work on the Wii.

You might also want to check your spelling.

# April 21, 2008 12:24 PM

mike said:

Suggestion for your blog: each link for JSON is the same, I thought each link was to a relative article/source, so perhaps only link the first instance?

# April 22, 2008 4:59 PM

Jonah Dempcy said:

I posted an article about this, also discussing John Resig's version and offering an alternative. My proposed solution may fall prey to some of the same problems you mention but it offers the nifty ability to overload functions with type signatures, not just based on the number of parameters.

I think some method overloading is nice, like how jQuery or MooTools will sometimes allow you to provide the String id of an HTML object or a reference to the object itself. But, it certainly isn't a necessary feature and adding additional overhead and boilerplate code for defining functions isn't ideal. So, perhaps the solution proposed in my article is best suited for theoretical discussion rather than production use.

# April 22, 2008 6:30 PM

James said:

I common misconception is that because JavaScript includes 'Java' in it's name, it will behave like Java (or C#). I feel it is really more like C than either of those languages.

Though typing tends to default to string, which is peculiar to most languages, perhaps making it more like PHP.

# April 23, 2008 12:08 AM

Chris Pietschmann said:

Do you have an example of how to Localize the JScript Intellisense Support using the locid? If so, could you please send me an example? You can contact me through the contact form on my blog. pietschsoft.com/contact.aspx

Thanks

# April 23, 2008 10:42 PM

Nikhil Kothari said:

How common is it for script code to do different things based on the type of the exception anyway?

# April 24, 2008 2:07 AM

Bertrand Le Roy said:

@Nikhil: most people don't bother but that's a bad thing: why would catch(Exception e) be bad practice in .NET and Java but not in script?

# April 24, 2008 12:54 PM

Suman Chakrabarti said:

Yes, but in .NET it's considered a best practice to not depend on exceptions as the condition to perform a subsequent action. Most actions performed on an exception in .NET are for logging, something that's not very helpful to a user.

# April 24, 2008 3:25 PM

Bertrand Le Roy said:

@Suman: what's your point? Are you saying that it's not useful to handle exceptions??

# April 24, 2008 3:31 PM

Josh said:

Not saying I agree, but perhaps the two different hierarchies are because some are JavaScript programming language related exceptions, while others are W3C DOM. That DOM was specified independent of implementation (ECMAScript), so perhaps it had its own inheritance hierarchy etc.

# April 24, 2008 5:26 PM

Jonah Dempcy said:

Nice! I would love for browsers to adopt a shared, supported standard for Ajax, ideally something flexible like MooTools' Ajax API. Also, we need a simple way to create a push model, where the connection stays open, similar to what you can do with Flash or Dojo.bind.

Opening more concurrent connections by default is desirable from a performance standpoint, as some Ajax apps will have many simultaneous requests going on at once.

I'll have to check out their project page and find out more. Thanks for the link!

-Jonah Dempcy

www.thetruetribe.com

# April 25, 2008 9:53 PM

Jonah Dempcy said:

It certainly is unusual that DOMExceptions are not instances of Errors. But, it shouldn't really hinder your ability to do error handling all that much. I see that Opera doesn't support checking the instanceof a DOMException, but what about typeof?

I'm curious, how much error handling do you put in your code? Like, how granular do you make it?

I'm also interested in how different JavaScript libraries will either raise exceptions or swallow them. Like, Prototype will sometimes silently fail when defining a class, whereas MooTools seems to always raise exceptions. What's the rationale for this? It seems that you'd want to raise exceptions during development mode and silently catch and log the error via Ajax (but not raise the exception) in production.  Thoughts?

# April 25, 2008 10:31 PM

Nikhil Kothari said:

Actually I personally believe there are several cases where catch (Exception e) is the right thing even in .NET. I think the design guidelines are a bit extreme (I might be in the minority camp on this one)

Sometimes there are cases where code switches based on exception type, and its abusing the exception mechanism to implement control flow.

Its not black and white. There are certainly valid cases though to catch a particular exception type. In .NET there are many more app scenarios - eg. you want to distinguish file not found from something else. Script simply doesn't have that many scenarios right now, to make it interesting to distinguish at the exception type level.

In several cases, you want to figure out whats the right alternative a piece of code should do if a dependency threw an exception, and either do something alternative, or return a success/failure result. And that requires an unqualified catch block. If all code catches only specific exception types, then its likely that various exceptions will bubble to the root, where the global catch handler can only either end the app, report there was an error and resume... but it doesn't have much context to do some alternative behavior, or provide a better error report of the specific action that failed.

# April 25, 2008 10:59 PM

Bertrand Le Roy said:

@Jonah: typeof can't help you here. typeof can only return the following strings: "string", "number", "boolean", "object", "function" or "undefined".

I personally think swallowing exceptions is totally wrong in most cases. As you point out, one thing you might want to do is have your own global exception handler that doesn't expose the exceptions to the user but logs them or sends them back to the back-end. But of course that's very different from swallowing the exception, which makes it totally impossible to ever detect and correct problems.

@Nikhil: I disagree that the exception system in script would justify catching specific expetions less than in .NET. If you think about it, the number of exception that you commonly use in .NET is also relatively small, but still you don't want to catch an out of memory exception where you really expect a null ref for example. In script, there are few kinds of exceptions (about a dozen) but they are all pretty common. Plus, frameworks such as Microsoft Ajax expose and use a rich system of exceptions.

One place where it makes a lot of sense to catch specific exceptions is a unit testing system.

# April 26, 2008 1:31 AM

Wil said:

Need Help, I get the album to work when I debug but when I publish I get the following error.

Error 13 There is no build provider registered for the extension '.ashx'. You can register one in the <compilation><buildProviders> section in machine.config or web.config. Make sure is has a BuildProviderAppliesToAttribute attribute which includes the value 'Web' or 'All'. E:\Visual Studio 2005\WebSites\xxxxxx\Entertainment\Gallery.aspx 3

# April 27, 2008 3:42 PM

Bertrand Le Roy said:

@Wil: check that the server has ASP.NET 2.0 or higher installed, then check the web.config file.

# April 28, 2008 12:20 AM

Jonah Dempcy said:

Why not just rely on Google to provide the bandwidth and simply have them host all the major JS frameworks? They are already hosting plenty of code snippets on Google Code and they offer hotlinks (the link actually has the text "Hotlink/Download" so they intend for you to use it directly if you so desire).

For example, I have used Dean Edwards' IE7.js library. Normally I would concatenate it together with all the other JS as part of the build process to minimize I/O traffic, but I'm wondering if I'd be better off just hotlinking to Google Code, on the off-chance that other sites are doing the same and the download would be cached:

ie7-js.googlecode.com/.../2.0(beta)/IE7.js

For now, I will keep doing my concatenation thing because minimizing the amount of separate JS files seems to have the greatest benefit (and I doubt many people have the IE7.js file cached). But, if Google Code were to host MooTools, jQuery or Prototype I'd be all over it in a flash. I'd stop having to write build scripts that combine those files with the rest of the site JS and be able to just hotlink from Google, basking in the benefits of universal caching for popular pieces of code.

# May 7, 2008 10:49 PM

Jonah Dempcy said:

The only game worth playing on Wii Play is Tanks and it's debatable whether or not that's worth $10. Tanks is fun because it is super simple yet very challenging, just like the arcade games of yore. In fact, there even was a classic game called "Tanks" that was very similar. It's simple but the controls are responsive and aiming is intuitive with the Wiimote (just point and click).

Agreed about the rest of the games being pretty much throwaway. There were a couple quirky ones and the PONG type game wins for style/soundtrack but overall the disc is quite boring.

So what _are_ good games on Wii? I've already played Mario Galaxy, Metroid, Zelda, Smash Bros, Mario Kart ... Are there any good games for Wii that are _not_ made by Nintendo?

I've enjoyed Zack & Wiki quite a bit, although it is rather kiddie. But the puzzles are fun.

# May 7, 2008 10:57 PM

garrett said:

i have tried that i even put new batteries in and nothing seems to work but my brothers mote still works

# May 11, 2008 10:39 AM

KM Web Design Melbourne said:

I think we are findign the browsers a big hurdle for our ajax developments. we will check it out. Thanks!

# May 11, 2008 11:19 AM

VR2 said:

Could we have a static "parse" method added to all classes, in order for clients to be able to cast to type?

eg

Sys.SomeClass.parse = function(obj)

{///<returns type="Sys.SomeClass"/>

   return obj;

}

Client Code would be

function onSomeClassClick(sender, args)

{

   sender = Sys.SomeClass.parse(sender);

   args   = Sys.SomeClassEventArgs.parse(args);

   // Full JS intellisense now enabled.

}

Thanks

# May 12, 2008 9:31 AM

ScottGu's Blog said:

Earlier today we shipped a public beta of our upcoming .NET 3.5 SP1 and VS 2008 SP1 releases.&#160; These

# May 12, 2008 1:34 PM

NZEYIMANA Emery Fabrice » Invalid JSON from NET - DateTime said:

Pingback from  NZEYIMANA Emery Fabrice &raquo; Invalid JSON from NET - DateTime

# May 14, 2008 2:21 PM

Tim C said:

So you had to manually change the active step of the wizard. What state gets restored? For example, if in one of your wizard steps you had a button that when clicked updated a label's text property. Then you go forward then clicked back, will the label's text be updated or would it have its original state before the async postback from button?

# May 15, 2008 11:13 AM

VMDude said:

We just ran in this today.

In our case our application is commonly put in an IFRAME by customers and I just ran into to it myself.  Since our site has being deploying within a IFRAME for almost a year I am suprised that it just started to show up and it is only showing up on our test servers and has not shown up on our production servers as yet.  

We did do a update on the servers on Tuesday for the following:

www.microsoft.com/.../ms08-may.mspx

and I don't see what in these patches could be a contributor.   Actually I am rather confused how this    issue just popped out of no where.

I have read the "Work Around" and personally I am shocked that a fix was not rolled out on the previous version.  I am sure there a lot of customers out there that are still using VS2005 and .Net 2.0 that would have welcomed the fix rather than going into their applications to patch external 3rd party files.

I  am off to do try and apply the fix but wanted to post that we have ran into it and given the fact that in today's world more and more sites are mashing things up together and IFRAMES can be used to mash up things I do think people running into this issue is more common than not.  

# May 15, 2008 6:54 PM

Deepak V said:

i want to know the reason why CONCAT() is slower to using pipeline operator || in SQL?

does the same array concept apply to this also?

Regards,

Deepak V

# May 19, 2008 2:04 AM

Doug Winter said:

This worked great for ASP.NET 1.0 and 2.0, but now with ASP.NET 3.5, this script does not work.  Do you have an update for ASP.NET 3.5?   Thanks in advance.

# May 19, 2008 1:54 PM

Jeff Haluska said:

I am having the smae problem, able to debug, but publish....   ASP.net 2.0 is installed on my local machine, and the web config for the website had the build providers included....  Any other suggestions...

# May 21, 2008 4:17 PM

linukalex said:

hi, I am faceing mainly 2 problem with my web site.When i run my website in development server, almost everything works perfect except response.redirect().I have developed a shopping cart web site which uses a master page and lots of content pages.There is index page which also uses the master page.In my master page i wrote lots of codes to control the web site.For example i have used a datalist which has paging facility, for this i used a session to keep the table and the whenever some click events happens , i change the session values with new table.This works fine in development , i get all the changes also, but i published it i am not getting the changes when some click event fires, i am getting the first data which v assigned in the load event of the master page.Y it happenes like this, i mean locally it works fine but after publishing it shows only the data which is assigned in the load event of the page? Please help me out..

second problem is that when i click a control which is in the master page , i used the response.redirect to the index page with some querystring, i am getting a execption/error.but as i simply  give  catch execption without any other statement its not making a problem. Will it be reason for the above problem, as when a click event fires i used , response.redirect or server.transfer() with querystring to reload the index page , where it will make a check for the position (based on the querystring) & get values from db and assigns it to the session as a table....

This all works in the development fine ....

Please help me out as I am struggling bit hard on it.....

# May 24, 2008 2:32 AM

Karthik said:

Excellent Article,

Note:The Path should be relative

# May 26, 2008 2:40 AM

Hiruma said:

Hi,

I have the following errors in release mode :

var $create=Sys.Component.create=function(h,f,d,c,g){var a=g?new h(g):new h,

It appends when I have a timer in my page... as Thomas problem!!

I've checked my script and I think it's ok .

What's wrong please ?

# May 26, 2008 3:51 AM

Diego Frata said:

I'm facing the exact same problem as Hiruma...

# May 27, 2008 10:58 PM

homey said:

Nice discussion.

I am simply trying to pass some variables from asp to aspx page. If I use session, they dissappear, if I use query string, they dissapear. I don't get it.

If I manually paste the url into the browser, everything is fine, so I know my aspx page is recieving the querystring. But, when I use the response.redirect from the asp page with the params in the query string, they dissapear somehow.

ex: response.redirect("/somepage.aspx?name=value")

Any ideas?

# May 28, 2008 9:35 AM

homey said:

Got it working. nevermind.

When I feel really adventurous I will try upgrading it to the more secure session method, but for now query string will have to work.

# May 28, 2008 10:02 AM

Bertrand Le Roy said:

@Jonah: Some have expressed privacy concerns over having scripts hosted by Google (which then gets a lot of free information about people browsing your site through the referrer header). You also have to trust the central location to always be available. But yes, centralized hosting by Google and others is a step in the right direction.

I would prefer a solution such as the ones described here because there is no such reliance on a centralized location, yet the scripts get cached across sites and the load is naturally distributed.

# May 28, 2008 7:29 PM

Bertrand Le Roy said:

@Jonah: good exclusive games on Wii? I would cite pretty much the same as you. There are good third party games though: out of the top ten Wii games on Metacritic, five are third party.  It's less than on Xbox (seven) or PS3 (eight) but still not as bad as you'd think.

# May 28, 2008 7:38 PM

Bertrand Le Roy said:

@Tim: you should include in the state any information that you need to rebuild the page's state. In your example, you'd probably store the fact that the button was clicked in addition to the wizard step.

# May 28, 2008 7:41 PM

Bertrand Le Roy said:

@Hiruma: Thomas had incorrectly patched his file if I remember correctly. Please double-check.

# May 28, 2008 7:59 PM

Bertrand Le Roy said:

@Deepak: in SQL I'm sorry but I have no idea, you should try to ask on a SQL forum or to a member of that team.

# May 28, 2008 8:03 PM

Bertrand Le Roy said:

@Doug: I haven't tried that with 3.5, but I'm not really surprised and I really encourage you to try to find another way to reach your goal here. Feel free to drop me a private message on the contact form to decribe your scenario and why you think you need synchronous calls, I'll try to help.

# May 28, 2008 8:12 PM

Bertrand Le Roy said:

@Jeff: difficult to say without looking at the server. Drop me a mail through the contact form and I'll have a look.

# May 28, 2008 8:16 PM

Bertrand Le Roy said:

@linukalex: difficult to say without seeing the code. Feel free to drop me e-mail through the contact form.

# May 28, 2008 8:41 PM

George said:

From the hint to Lindsey on calculating the angle of the wake: Why is the wave_speed/duck_speed = 1/3? Thanks.

# May 30, 2008 1:06 PM

Robert Folkesson said:

Den senaste tiden har en mängd sajter blivit infekterade av en SQL Injection-attack som använder SQL

# June 2, 2008 3:50 PM

Hiruma said:

I have checked my patch and there's no difference in the  javascript file but I use the ScriptPath property of the Script manager.

In the page source code, the correct MicrosoftAjax.js file is called. I don't understand ...

# June 3, 2008 10:58 AM

Bertrand Le Roy said:

Give me the url of your page and I'll take a look.

# June 3, 2008 11:05 AM

This is an english site Please post in English or do not post at all said:

Thank,

As I recall more than half of montreal speeks English, out of respect for the members of this blog, we request that you write comments in English please.

# June 3, 2008 5:02 PM

Hiruma said:

If I replace my ScriptPath by the ScriptReference it works !

so the files downloaded are corrupted ?

# June 4, 2008 4:56 AM

Bertrand Le Roy said:

With all due respect, this is out of line for many reasons:

* The conference is being organized by a French-speaking user-group, and they explicitly asked me to do the talk in French.

* Only 10% of the population of Montreal speak only English, 87% understand French, 33% understand only French.

* I did write the title and the introduction of this blog post in English so that people who don't understand French can promptly determine that there is no relevant contents for them and that they can safely skip the post.

* This is my blog, and I'm the one who chooses what to write or not to write in it. Other sites that aggregate it must know and accept it.

* Who is "we"?

# June 4, 2008 2:25 PM

Lauren said:

I had that problem with the huge PST file. As someone else said earlier, I used OutlookFix to repair it. It allows you to split the pst file in several smaller files. It worked for me. Check it out!

# June 4, 2008 7:04 PM

衰人 said:

与当今构建的绝大多数Web应用程序所采用的开发模式相比,AJAX对Web解决方案架构师而言意味着一种模式转变。它立足于一些新的原则和规则来解释基于Web的系统的行为,并要求采用一些新的算...

# June 5, 2008 12:34 AM

Mike Ormond's Blog said:

Having talked about the pain of capturing image snapshots , someone mentioned Cropper and its plug-in

# June 6, 2008 6:46 AM

Certified Professional said:

It works like a charm...Dude your a genious.  Thanks alot.

# June 6, 2008 1:02 PM

Kras said:

The motion detection is fine, it's the games that can't use it properly.

# June 7, 2008 10:01 AM

ubgadeashish said:

Ajax creates a runtime object “Sys” and their classes, this is required by the “Scrip Manager” and AJAX controls (like watermark text etc). If we use document.write to change the page contents at the run time, then it creates every thing but do not load the sys object in the memory. If we refresh the page then SYS object is loaded and ajax works fine.

But in both the cases (i.e. before refresh and after refresh) code remains the same. We have checked this by comparing the “View Source” of both the pages.

Probable Workaround: By any means if we can create the “Sys” object and load it in the memory.

I have also tryed document.forms[0].submit(); just after the document.write(); statement, ajax controls works perfect but it gives a refresh effect which I don’t want.

# June 12, 2008 9:20 AM

Tales from the Evil Empire said:

ASP.NET Ajax 3.5 SP1 contains a new feature that enables the application developer to combine scripts

# June 12, 2008 7:31 PM

rachitp said:

Awesome control...

# June 12, 2008 10:10 PM

bryan said:

your all stupid

# June 13, 2008 9:19 AM

J Shissler said:

This is a good idea.  I am curious where the combined script is stored and if the resulting JavaScript is minified (which would be really great).   I assume that this feature could be used by a page that does not use ASP.NET Ajax as long as the developer puts a ScriptManager control and adds any application .js files that are normally included on the page, correct?

# June 13, 2008 3:41 PM

Bertrand Le Roy said:

@J: The combined script is not exactly "stored". It is being generated by a handler dynamically (and output-cached). The JavaScript is not minified by the handler, but the infrastructure allows for a release and a debug version of each script, the release version being minified using one of the many tools available. You could use that with non ASP.NET Ajax frameworks if the scriptmanager didn't always include MicrosofAjax.js (which is something we're looking at relaxing in a future release).

# June 13, 2008 4:46 PM

Andrei Rinea said:

Although it is a great idea and I'm sure it took a lot of effort to build the tool, I'm quite skeptical about the amount of performance gain obtained.

How much do you really gain from this? Bandwidth and/or lag time?

# June 13, 2008 6:46 PM

Bertrand Le Roy said:

@Andrei: you're absolutely right, the gains are most of the time quite modest, but it does add up on a high traffic site. Definitely not a feature that you need to use on each and every site, and definitely one you should use with caution.

# June 13, 2008 6:52 PM

Daniel Brünteson said:

Hi Bertrand,

What about forcing the javascript's to load after the GUI, "loadscriptsbeforeui='false'", which has an even greater effect on what you perceive as performance, does this work with that? In 3.5 w/o SP1 it's not working completely well.

# June 14, 2008 3:39 AM

Bartek said:

Hello,

I copied album.ashx and MetaDataExtractr.dll to directory with jpgs but I get this message:

"Błąd serwera w aplikacji '/PhotoHandler-6410'.

--------------------------------------------------------------------------------

Błąd kompilacji

Opis: Wystąpił błąd w czasie kompilowania zasobu wymaganego do obsłużenia tego żądania. Przejrzyj poniższe szczegółowe informacje o błędzie i zmodyfikuj odpowiednio kod źródłowy.

Komunikat o błędzie kompilatora: CS0246: Nie można znaleźć nazwy typu lub obszaru nazw 'com' (czy nie brakuje dyrektywy „using” lub odwołania do zestawu?)

Błąd źródła:

Wiersz 52: using System.Web.UI.WebControls;

Wiersz 53:

Wiersz 54: using com.drew.metadata.exif;

Wiersz 55: using com.drew.metadata.jpeg;

Wiersz 56: using com.drew.metadata.iptc;"

this line is red:

Wiersz 54: using com.drew.metadata.exif;

this: Komunikat o błędzie kompilatora: CS0246: Nie można znaleźć nazwy typu lub obszaru nazw 'com' (czy nie brakuje dyrektywy „using” lub odwołania do zestawu?)

means: compilator error message: CS026: Could not find type name or namespace 'com' (check whether "using"  is missing.

Hope You'll help me.

Greetings

# June 15, 2008 7:00 PM

J Shissler said:

Thanks for the clarification, Betrand. My thought on this was that it could provide the mechanism to logically combine scripts into a single HTTP request while still allowing one to have separate physical files for easier maintenance, debugging, optional inclusion on the pages that need them, etc.  Does output-caching allow the Expires and related HTTP headers to be set or is the resulting single file always fetched from the server cache?

# June 16, 2008 8:48 AM

Brian S said:

Hi Bertrand

I have a similar problem with ASP pages.

I am setting a session variable:

 Session("locadd") = "1"

on a page "add.asp" which gathers certain location data from input.

Upon clicking the Submit button, the following code is run:

 TheForm.action = "add_res.asp"

 TheForm.submit

In the "add_res.asp" page, the Session("locadd") is empty.  It appears to be working on the production server but not the Dev or Staging server.

Any ideas?

# June 16, 2008 1:24 PM

Bertrand Le Roy said:

@Daniel: loadscriptsbeforeui should just work. If it doesn't, it's a bug and you can send me a repro using the contact form on this blog.

@J: You can combine multiple physical script files using that feature, but we really don't recommend it as there is some server overhead related to file monitoring. What you're describing is much better handled by "building" your scripts at compile time instead of doing the combination at runtime. The feature really is for application developers who want to combine existing scripts from various components that they use in their application.

The output caching expiration is set by the handler. The resulting files are cached at all levels, including client-side. The efficient client-side caching is made possible by the fact that the combined url varies every time one of the underlying files changed.

# June 16, 2008 3:43 PM

Bertrand Le Roy said:

@Bartek: it's hard for me to understand the localized error message but I'm suspecting you didn't put the dll into the bin directory of the web application.

# June 16, 2008 3:45 PM

Bertrand Le Roy said:

@Brian: I don't know much about how this works in classic ASP. You should probably contact support on this one.

# June 16, 2008 3:47 PM

Lokas said:

Well I have started to play little bit with the ATLAS and I want to add DOM event handler to TR element.

Code works fine for IE , but in  a firefox load event is happend  , but events are not hooked to dom element ...

I'm using asp 2.0 , please give me a tip , relly dont have a clue what is going on......

function pageLoad()

{

alert('atload');

    for(var i = 0 ; i<testTable.rows.length;i++)

       $addHandler(testTable.rows(i),"click",RowClick);

}

function RowClick(e)

{

  alert(this.innerHTML);

}

# June 17, 2008 12:16 AM

Bertrand Le Roy said:

@Lokas: you need to define testTable, for example var testTable = $get("testTable");. You also need to use square brackets instead of parentheses to get the rows: testTable.rows[i].

# June 17, 2008 12:26 PM

Todd said:

One thing I see all over the place in programming circles that people mess up all the time is quotes and apostrophes.

A quote is a "

An apostrophe is a '

There is no such thing as a double quote unless it's two quotation marks back to back like ""

If we all help educate people, then perhaps they will start to understand.

# June 18, 2008 11:39 AM

Bertrand Le Roy said:

@Todd: thanks for the tip, and I apologize for my English which may sometimes be imprecise as I'm a non-native English speaker. Still, I did some research and here's the definition I found:

"quo·ta·tion mark (plural quo·ta·tion marks) noun

Definition:

punctuation identifying quotation: either of a pair of punctuation marks, either in double (" ") or single (' ') form, used around direct speech, quotations, and titles, or to give special emphasis to a word or phrase"

encarta.msn.com/.../quotation_mark.html

Still, I'll update the post to make this clearer as this definition doesn't seem to be universally adopted and yours is less ambiguous.

# June 18, 2008 12:51 PM

BFuller said:

I have this problem in classic ASP on a site that had been running fine for a few years. One day it up and errors because the session variables are cleared on redirects for seemingly no reason. This makes me think a server update of some variety is to blame since some server updates were installed around that time.

# June 18, 2008 6:35 PM

skhan said:

Expensive indeed. There are quite a few free ones out there.

# June 18, 2008 6:38 PM

ubgadeashish said:

Hello Bertrand,

It would be a great help if you can comment on my issues.

Thank you in advance

Ashish

# June 19, 2008 5:36 AM

Aurelien said:

Hello Bertrand !

Any idea of a CTP release date ??? ;)

# June 19, 2008 6:04 AM

Robert said:

Thanks for this article - I read and followed the exact sequence for patching the files for debug and release but I still continue to get "Access Denied" errors when attempting to open another web page in an iframe.  I see in "View Source" that my file is being referenced from the correct location - Is there anything else that could cause this error??  I get the error on both debug and release versions of the MicrosoftAjax.js file.  Please let me know what you think about this issue - Thanks for your help!!

# June 19, 2008 8:18 AM

Bartek said:

i checked it once again and MetaDataExtractr.dl is in this directory;/

# June 19, 2008 8:37 AM

Bertrand Le Roy said:

@ubgadeashish: The problem is that I didn't understand your comment, which seems to be unrelated to the problem described in this post. Please contact me through the contact form with a simple repro of the problem.

@Robert: Yes, this error is perfectly normal if you're trying to access the DOM in another frame that is in a different domain. That is a security restriction that is imposed by your browser.

The problem that this post solves was the appearance of this error in pages that didn't explicitly try to access another frame.

# June 19, 2008 12:38 PM

Bertrand Le Roy said:

@Aurelien: this is clearly not the place to make such an announcement, but trust me when I tell you that we're working hard to get those bits into your hands as soon as possible.

# June 19, 2008 12:40 PM

Bertrand Le Roy said:

@Bartek: is the bin directory in a directory that is configured in IIS as a web application?

# June 19, 2008 12:41 PM

Bartek said:

I assured that I put MetaDataExtractr.dll into the appropriate directory.;/

# June 19, 2008 1:57 PM

Bertrand Le Roy said:

@Bartek: I believe you. The question I was asking was on the *parent* directory of bin. Is the parent of bin configured in IIS to be a web application? We can take that offline. Please contact me using the contact link.

# June 19, 2008 2:33 PM

joe said:

yeah - this is a crap post - what about the free ones?

# June 19, 2008 7:13 PM

Bertrand Le Roy said:

@joe: ask skhan. I don't know of any free ones that would compare to that but I'd gladly point to them from this blog.

# June 19, 2008 7:18 PM

Name said:

Bertrand, did you find a conclusive study on the topic? I want to settle and argument I had at lunch today. Clearly we slow earths rotation, but I need to know if the centers of mass get closer or farther.

Thanks,

Kevin

# June 20, 2008 10:10 PM

Mike K said:

Try to open a pst in question with Outlook 2007. I was just able to open a 4GB .pst file that no other program was able to fix.

# June 20, 2008 10:20 PM

Davide said:

Very nice article: it is more and more requested to work with image re-sizing.

Thanks and regards,

Davide

# June 21, 2008 7:16 AM

mohammad Javed said:

hi i am trainee programmer in comm-it india(p) Ltd at new Delhi-110017.your articles is very helpfullto me about postback event.

# June 21, 2008 7:46 AM

Joseph Ghassan said:

nice article.

# June 21, 2008 12:16 PM

rrobbins said:

You could also generate thumbnails using the GD-Sharp .NET wrapper for the GD Library.

# June 21, 2008 5:15 PM

Andrei Rinea said:

@skhan : Tell me more about the free ones. I am interested in at least one.

# June 21, 2008 6:35 PM

Bertrand Le Roy said:

@Kevin: to move farther away from its current orbit, a satellite has to gain momentum so it would seem like as energy is dissipated, the system would move to a state of lower energy, and the Moon would get closer to the Earth. But this would be neglecting the complex interactions between the rotations of both bodies and how angular momentum transfers. While there are natural satellites that go this way (see en.wikipedia.org/.../Orbital_decay), it is not the case for our Moon, which is getting away from us at a rate of 3.8cm/year (see en.wikipedia.org/.../Tide).

# June 23, 2008 1:35 PM

david said:

my wiimote isnt working even though i adjust the "sensor" and the hand wont even show . the games are working fine though!

# June 24, 2008 3:41 PM

Lacy said:

There's a great jquery plugin that automates this.

plugins.jquery.com/.../bgiframe

# June 25, 2008 4:06 PM

Dan said:

Bertrand,

the link you highlighted from Kyle Heon no longer seems to work, I just get a page with a load of Chinese characters.

Please can you check or advise on what solution the page revealed?

Thanks

# June 27, 2008 9:48 AM

Bertrand Le Roy said:

@Dan: I updated the link. Thanks for the heads up.

# June 27, 2008 3:21 PM

orbk said:

excellent utility

# June 29, 2008 4:53 AM

Ty Johnson said:

Has anyone been able to get this into a DNN Module? Can I use this in DNN?

# June 30, 2008 10:48 AM

Bertrand Le Roy said:

@Ty: I never tried, but if you use it as a user control, I don't see why not.

# June 30, 2008 1:52 PM

Mehul Harry said:

Ha, the SEO rapper, very funny.

# July 1, 2008 1:16 AM

Radha said:

After setting session varibales, I am redirecting page. Its working on local host but its not working on server.

# July 2, 2008 2:54 PM

alex said:

sweet!!

# July 2, 2008 11:13 PM

Stif said:

Hi Bertrand

I have the following issue:

When a user visits my website for the first time and my sql server is down, I get an exception during the PreRequestHandlerExecute event (while making my connection to the database). I have a IHttpModule which adds an eventhandler for the application_error event. This eventhandler places some info on the session. In my web config I've enabled custom errors and specified a default redirect. The errorpage asp.net redirects to, gets the info from the session and displays it. But as you probably guessed, I'm losing the session info, because it's the first time the session is built. So you see, the problem is I'm not performing the redirect myself, but letting asp.net do the work. Would there be a way to overcome this problem (other than having to perform the redirect myself)?

Any help would be greatly appreciated

Grtz

Stif

# July 3, 2008 4:46 AM

Bertrand Le Roy said:

@Stif: if you've tried all the workarounds in the post and it still doesn't work, I would advise that you contact support.

# July 3, 2008 1:53 PM

krishx343 said:

Show some realtime Example of This Roadmap implementation. so, that it can be easy to analyse how it is

# July 4, 2008 7:31 AM

Oleg said:

I have a question, when trying to run ajax in facebook, I'm getting an error in javascript. When openning the javascrip error window, the error says access denied. I applied the patch that is mention above by replacing the code in MicrosoftAjax.debug.js & MicrosoftAjax.js. Now instead of getting message "access denied", I'm getting "Sys is undefined".

Somebody mention that it's beacuse the scriptmanger is not set up correctly. I have a dir in my app called javascript, I added the a folder with all of System.Web.Extensions content into it. I'm calling it using the code below, what am I doing wrong?

<asp:ScriptManager ID="ScriptManager1" runat="server"EnablePartialRendering="true">

    <Scripts>

<asp:ScriptReference Name="MicrosoftAjax.js"S criptMode="Auto" Path="../JavaScript/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js"/>

</Scripts>

   </asp:ScriptManager>

# July 5, 2008 2:29 PM

Bertrand Le Roy said:

@Oleg: check the path in the renedered HTML against the real location of the script and adjust your Path attribute accordingly.

# July 5, 2008 5:03 PM

Josh M. said:

I realize it's slightly off-topic, but one think I'd like to see in Visual Studio is code folding for JavaScript the way you can collapse tag elements in the markup or subroutines in the code-behind.  We can close a whole script block, but I'd like to just close up specific functions.

# July 7, 2008 10:34 AM

Michael Stuart said:

Thank you for publishing the roadmap.  I am very impressed with the ideas presented, especially the way to query on the client.  It seems like the items that would be most beneficial to any application immediately would be the build improvements (script combination, minifiying, etc).  I can't wait for the next release!

# July 7, 2008 4:31 PM

Mike Moore said:

Or, you could argue that both are Macs and that 1) survival of the fittest means that only Macs are left in the future, or 2) that only Macs are capable of love, which is why you don't see any PCs in the story.

# July 7, 2008 7:22 PM

Bertrand Le Roy said:

@Mike: that's an interesting way to look at it. But apparently, evil mainframes also survive (the autopilot is clearly HAL, a.k.a. IBM).

# July 7, 2008 7:30 PM

Ray said:

Dropping the album.aspx into the directory with pictures isn't working for me.  The only way it is working is to have it in the top level directory. Since I don't own the hosting provide, is there something I should tell them?  I was able to use the 1.0 version is a subdirectory, but not the 2.0 version.  Or is there a way to hard code the path to the subdirectory?

# July 7, 2008 10:05 PM

Bertrand Le Roy said:

@Rqy: I'm assuming you mean album.ashx. What really needs to be in the web app directory is the bin folder with the dll in it.

# July 8, 2008 12:30 AM

Zubair.NET! said:

hi Bertrand,

As Rick Strahl puts in his editorial for Code magazine here www.code-magazine.com/Article.aspx that jQuery and AJAX can seemlessly work together without stepping on each other, we had a nightmare working with jQuery along with ASP.NET AJAX on a project, we ended up choosing jQuery because we had more fine-grain control over some of the neat client-side tricks but having said that we'd love to use ASP.NET AJAX for some of the built-in features that are a pain in the neck to build with jQuery, kinda best of both worlds so my question is, is there really a way that they both work together ?

# July 8, 2008 1:17 AM

Bertrand Le Roy said:

@Zubair: I'd be very interested to know what didn't work well for you with jQuery and ASP.NET Ajax. Can you please drop me an e-mail at bleroy at microsoft?

# July 8, 2008 1:30 AM

Zubair.NET! said:

I don't have a particular case with me at the moment but I know we had issues and I didn't want to give up ASP.NET AJAX but my UI dev insisted on jQuery, it was a hard decision to make at the end of the day between built-in controls of ASP.NET AJAX vs more control in jQuery for some other tricks.

I'd love to see an example of both these frameworks working side by side in a project, can you put up a post with some sample ? that'll be great. Thanks

# July 8, 2008 1:54 AM

Rick Strahl said:

Bertrand - I think one issue with this is that Intellisense stops working with any subclass of ScriptManager if you have script code in the page. Something about how the page is parsed for scripts that is dependent on the exact asp:ScriptManager reference.

I had previously tried subclassing script manager and overriding the method that injects the MS Ajax code. While that worked Intellisense didn't work.

Intellisense - especially from resources is something that is quite useful and I mentioned this to Jeff and was hoping that there'd be some sort of interface or documented syntax that can be applied to allow other controls to provide Intellisense.

# July 8, 2008 3:02 AM

Lars-Erik said:

That is a very useable control. Well done!

I would prefer to have images instead of OK/Cancel-buttons. Do you see any technical problems with doing this or can I just download the source and start hacking?

# July 8, 2008 3:08 AM

Matt Brooks said:

Given that scripts from other libraries (e.g. jQuery) will not include calls to:

Sys.Application.notifyScriptLoaded();

What affects will this have at runtime? I was under the impression that it was a requirement for scripts to incude this call in order to play nice with ScriptManager - or is this ONLY a requirement when using partial loading, which you mention gets disabled by default anyway?

# July 8, 2008 3:49 AM

Ray said:

Yes, I meant album.ashx.  Sorry.  I have the Bin directory and dll in the top level app directory.  It all works when the album.ashx is in the top level directory, but when I try moving album.ashx to a subdirectory, the page that references album.asxh gets an error. I've updated the @register line to reference the subdirectory where I've moved album.ashx.  Is this a permission problem or do you have any other thoughts? Thanks.

# July 8, 2008 7:22 AM

Bertrand Le Roy said:

@Rick: true, but I think the control is still quite useful. I'll follow-up with Jeff.

@Matt: the script loaded notification really is to play nice with UpdatePanel's script loader. If your scripts are never added to the page as part of a partial update, you don't need it (but having it won't hurt if you include the full code that tests for Sys before using it).

# July 8, 2008 2:02 PM

Bertrand Le Roy said:

@Lars-Erik: that should be quite easy to achieve by hacking into the code a little. I don't think it will care if your use image inputs instead of buttons.

# July 8, 2008 2:04 PM

Bertrand Le Roy said:

@Ray: please contact me offline (bleroy at microsoft).

# July 8, 2008 2:05 PM

Bertrand Le Roy said:

@Rick: Jeff tells me this is fixed in SP1. Couldn't get it to work on SP1 Beta 1 though. Still investigating.

# July 8, 2008 3:33 PM

Ron Macers said:

forget about the pcs and macs just see iphone. microsoft sucks at everything...

# July 8, 2008 4:42 PM

Bertrand Le Roy said:

@Ron: thanks, now I see the Light.

@Mike: wait, that would mean that Apple, in the future, will become the Buy'N'Large mega-corporation that will (under the command of its charismatic leader) take over the Earth, transform it into a crapyard, eradicate all vegetal life, drive the human race into exile and transform people into boneless balls of fat. It all makes sense now. :)

# July 8, 2008 4:51 PM

Lou said:

Hi Bertrand, Please could you clarify something for me?

I am calling Response.Redirect from Application_PreRequestHandlerExecute within Global.asax.  My understanding is that as it is within Global.asax the HttpResponse.End method will not be called and the thread will not be aborted.  Would the first page be executed and sent back to the client, or would the client only receive the page to which it is being redirected (having earlier received the special header directing it to request the new page)?  This is critical as in the situation I am working with, the page originally requested is dependent on unavailable services and it is important that this code does not execute.

# July 9, 2008 8:41 AM

Bertrand Le Roy said:

@Lou: this should be easy to check by putting a breakpoint in the code you don't want to run. One thing I can tell you is that the client will never receive the first page: a redirect works by sending the browser a special header that instructs it to navigate to the new url instead of the old one. There is no contents in the first request, but that doesn't mean that the server code necessarily stops running.

# July 9, 2008 2:20 PM

Peter said:

I appreciate you looking into this, but let me raise the red flag for the record.

I would love to be able to plaster a poster on every ASP.NET team member's office "Do not hardcode! Make it generic!" The SM issue is one, hardcoding intellisense behavior is another example. There are other examples of built-in magic that just smell of hardcoding.

And another thing: Can we please stop coming out with new stuff, take a deep breath, and actually go back and try to polish some more on the things people actually use?! And how about actually going back and updating some of the "old" stuff. I know it's vague (I can come up with examples if needed), but I feel ASP.NET is getting dirty and need to be cleaned.

Rant over,

Thanks.

# July 10, 2008 12:29 AM

Bertrand Le Roy said:

@Peter: feel free to contact me at bleroy at microsoft to tell me what needs to be cleaned.

# July 10, 2008 12:40 AM

Peter said:

I've tried Telerik's SM that has this same feature and I have noticed quite a bit of improvement. The benefit is in the reduction of the chatter between the client and server. When you have more than 10 JavaScript includes and you reduce that to only a couple you will feel the difference.

It is, however, debatable how useful it is. Yes, it will make the first access much faster, but if on page 1 you load scripts A through G, and on page 2 you want A through G and M, since it's all bundled, it will have to load the whole pack one more time. not just M. I guess it depends on your scenario.

As far as compression: People please enable the built-in IIS (v 6 and 7) compression. It's there and it's quite good. You get the biggest bang for the buck just by enabling the compression (off by default in IIS6, not sure about IIS7).

# July 10, 2008 12:44 AM

Bertrand Le Roy said:

@Peter: that's why you need to profile your application, not just a page. Which is why, in turn, we didn't make the feature all automatic because it would have made more harm than good in some cases.

You're right about dynamic and static compression in IIS7, it's one of the most efficient ways to improve perf, but good perf is ultimately a combination of several things. I recommend reading "high performance web sites" by Steve Souders for a pretty comprehensive set of tricks along those lines.

# July 10, 2008 1:12 AM

Peter said:

Not exactly the same league, but it's free:

teethgrinder.co.uk/open-flash-chart

# July 10, 2008 1:26 AM

RichardD said:

The most annoying feature of the ScriptManager control is that it is completely useless without a server form.

Although it's possible to include the ScriptManager control in a page without a server form (when EnablePartialRendering is false), none of the registered scripts will be output to the page.

The control seems to rely on the ClientScriptManager class, which only outputs the registered scripts when the internal Begin/EndFormRender methods of the Page call internal methods on the ClientScriptManager class.

Since MVC views can't use server forms, this must surely be on the "TODO" list?

# July 10, 2008 2:51 PM

Bertrand Le Roy said:

@Richard: Yes :)

# July 10, 2008 3:45 PM

Pablo said:

Thanks Bertrand, I forgot that the fix was only for IE.

# July 10, 2008 7:13 PM

benizi said:

I think I'm missing something, but it might be related to Brock's question to which you replied, "@Brock: I don't think that's handled in 2008, no."

A simplified example:

/// <reference path="Stuff.js" />

var outside = new MyNamespace.Stuff();

outside.+++

Other.Thing.prototype = {

foo: function (inside) {

 /// <param name="inside" type="MyNamespace.Stuff">arg</param>

 inside.---

At the '+++', I get working Intellisense completion. At the '---', I don't. The point being that it obviously found the proper comments for the 'Stuff' class, since it works at one point in the file. Am I doing something wrong (specifying the class name improperly?)? or does VS2008 simply not do Intellisense for <param>'s?

Best,

Ben

# July 11, 2008 12:51 AM

Rick Strahl said:

@Bertrand - I'm also very interested @Richard's comment and would love to hear the ASP.NET team address this. One of the big drawbacks of MVC I see is related to the inability to address the document and inject anything into it - including scripts. Which is crucial for building reusable - well, anything really.

# July 11, 2008 4:50 AM

Bertrand Le Roy said:

@Ben: There is a number of circumstances where IntelliSense doesn't quite work yet. The one you describe and a few others. This is greatly improved in SP1, and will get even better in the next Visual Studio.

# July 11, 2008 2:31 PM

Bertrand Le Roy said:

@Rick: I think you're asking a different question here, probably a more general one. If you want, we can start an e-mail discussion with Phil about that?

# July 11, 2008 2:34 PM

Nicholas said:

Yes, thank you for posting this. I think you guys are on the right track; basically the more stuff you can do "like" jQuery (and better!) would be fine by me.

I didn't realize that ASP.Net Ajax supported templates; I had always just used jQuery's templating or JavascriptTemplates from TrimPath. I will definitely look forward to this feature getting fully developed. I'm sure you're going to run into all sort of performance gotchas across the different browsers..

Looking at the controls, "Grid" would be one of my top requests. The "Upload" control would also be great! It's so hard to roll your own.

MVC support I'm not terribly interested in, but good for that.

# July 15, 2008 9:20 AM

gt1329a said:

Here's my feedback on it (and several others' in the comments), for what it's worth:  encosia.com/.../the-future-of-aspnet-ajax

I meant to say in the post, but forgot:  The transparency you guys are providing with this is just stellar.  As a plain old guy who isn't an MVP or ASP Insider, it makes me happy to still have a glimpse at what's coming next and submit feedback on it before it's too late to matter.

Keep up the great work!

# July 15, 2008 10:58 AM

Jim diGriz said:

Max - thank you for your comment! works great :)

# July 16, 2008 11:54 AM

Kevin Dockx said:

Oh, great!  Didn't even realize these things were released, I actually stumbled upon this via the Encosia-rssfeed. :-)  

Nice read, and I absolutely love the client-data-idea.  As far as controls go, the upload-control looks like a must; as far as a grid is concerned: I'm already using Listview most of the time with some custom scripting, does the job as it should AND gives me LOTS of customization options - so I'd prefer an ajaxified implementation of the 3.5 Listview instead of the Grid.  

Anyway, looking forward to the "futures"-release, keep up the good work!

# July 16, 2008 3:28 PM

Omego2K said:

but since a Menu control doesn't understand the imageURL property, how do you get it to display the image?

# July 16, 2008 6:37 PM

Bertrand Le Roy said:

# July 16, 2008 6:43 PM

Aneesh Abraham said:

Hi , Guys.

I had the above issue with my project and tried most of the solutions provided above.

In my project user has to upload his photo during account creation. So every time there will be some changes in the root directory.

As per the info provided here:

blogs.msdn.com/.../668412.aspx

, every change in directory structure , re starts the application and the sesion vanishes.

In order to solve this issue i used the "Profile" object in ASP.net 2.0 which stored the data in a seperate SQL file.

Hope this helps some one....

# July 18, 2008 7:37 AM

Bertrand Le Roy said:

@Aneesh: it seems like you already found the solution. Letting the user write into the root directory of your application was dangerous practice anyway, and couldn't have been done without opening up the ACL on the directoy. Storing in a different place (a database, a separate directory, profile etc.) is the right thing to do.

# July 18, 2008 1:57 PM

David-Sarah Hopwood said:

In the implementations of safe subsets of JavaScript (Caja, ADsafe, etc.), it's useful to be able to distinguish exceptions that are the result of a stack overflow, out of memory, etc., from other exceptions. See code.google.com/.../detail

# July 18, 2008 3:01 PM

jgd12345 said:

I second the comment above.  A list is much better than  grid.  This will also be beneficial to the encosia.com guy in that he can put the thead and tbody tags in when others don't really need them.

# July 19, 2008 6:24 PM

Ben said:

Good point Richard.

Thanks

# July 20, 2008 1:16 AM

arunpulikkan said:

how can i get microsoft.samples.Alert?

# July 21, 2008 6:34 AM

Dominic Bundy said:

Is there any way to display the folders in date order and not alphabetically

# July 21, 2008 10:18 AM

Bertrand Le Roy said:

@arunpulikkan: follow one of the two links in the post to the CodePlex project. http://www.codeplex.com/alerts

# July 21, 2008 11:55 AM

Bertrand Le Roy said:

@Dominic: it already is in date shot order. If that's not the case for your photos, maybe they are using an exotic EXIF tag. Feel free to send me one of those at bleroy at microsoft and I'll have a look.

# July 21, 2008 11:59 AM

Aykut Ucar said:

Any plans of sample website?

# July 21, 2008 4:00 PM

Bertrand Le Roy said:

Eventually, yes, but we wanted to get the bits into your hands as early as possible.

# July 21, 2008 4:04 PM

NirvanaViper said:

Microsoft ASP.NET Ajax is Spam.

jQuery is Good.

# July 21, 2008 9:23 PM

Gratis Daghoroscoop said:

Can't wait to start playing with this!!

# July 22, 2008 3:18 AM

Mike said:

Finally! It was sooo obvious that most resources went to Silverlight for the last 1-2 years. And because I as an ASP.NET developer want to develop web sites, not Silverlight apps, I was getting really !*%$# about the lack of progress on ASP.NET Ajax.

Let's see some more controls!

# July 22, 2008 4:14 AM

Steve said:

I tried using asp.net ajax the other day for a simple call back to a web service and update content panel. I'm a pretty good javascript developer and have been using jQuery for a long time, but just thought I'd try the .Net way and see how easy it is.

I found a pretty good tutorial, but even at the end of it I had no real idea of how all the "magic" happens. .Net automatically inserted a load of rubbish into the page for me to make it all work.

I think the page was over 100k when it was downloaded and working. I did the same with one line of jQuery and the page was 47k altogether.

The only use I can see for this is for people who are clueless about javascript programming and have to use VB or C#. If that's the case, then they probably shouldn't be doinc client-side programming anyhow IMO!

# July 22, 2008 4:44 AM

Howard said:

What was the point of your comment, NirvanaViper? How on earth is MS Ajax "Spam?" It's a technology which incidentally Micrsoft pretty much pioneered, and everyone else has adopted. I don't know JQuery from a hole in the ground, but then I'm happy with my Ajax solution (which isn't MS Ajax)

Spam is tedious, irrelevant junk - pretty much like you posting. If you don't like it, go elsewhere.

# July 22, 2008 5:32 AM

Mikael Söderström said:

Will it be compatible with ASP.NET MVC?

# July 22, 2008 8:37 AM

Brian Sherwood said:

NirvanaViper, your comment is spurious and irrational. This post/article is nothing to do with jQuery.  Spam is unwanted email, which doesn't fit ASP.NET at all.  ASP.NET remains a powerful development paradigm and language used by businesses world-wide. I have supported my family for years wiht my ASP.NET development services.

The fact that you won't even use your name speaks volumes.

# July 22, 2008 9:04 AM

Daniel Balla said:

Great work mate!

Could you point me in the direction of any documentation or is that not a good question?

I was interested in any events that would be fired around the template rendering.

# July 22, 2008 9:28 AM

Brent said:

@NirvanaViper - Apparently you have no clue what spam is. For a good example, see your last comment...LMAO.

# July 22, 2008 9:34 AM

Andrey said:

I've tried DataView control, but it doesn't work.

I get error about Sys.UI.Preview.DataView is null. Do I do something wrong?

# July 22, 2008 10:56 AM

Mel Pama said:

I'm not a user of Ajax at this time, however it is seeming to me that it is becoming a replacement of ASP.NET when almost everything is using Ajax, whether it warrants it or not.  Eventually there will be no difference because it will take just as long to wait for all the Ajax updates as it was taking to update just the whole page at the same time with ASP.NET.  A litle Ajax is a good thing, there more is better???? I beg to differ.

Mel

# July 22, 2008 11:07 AM

Stuart Campbell said:

Looks promising!

@NirvanaViper: I use both ASP.NET Ajax and jQuery and they are both good. Not sure how you can class a script library as spam...but anyway.

# July 22, 2008 11:52 AM

Bertrand Le Roy said:

@Mikael: what we put in the preview is pure client-side script, so it should work just fine with MVC. Actually, the latest MVC preview has JsonResult, which should be a very good fit with the template engine.

@Daniel: this is a very early preview, and we don't have much documentation ready. Feel free to ping me for questions. The dataview control has an event that gets fired every time a template is instantiated (itemCreated), and the arguments give you access to the dataItem that's being rendered and the templateResult, which enables you to manipulate the generated DOM. Is that what you were asking for?

@Andrey: did you include the script file to the page? Did you also iclude the Ajax Library?

# July 22, 2008 2:12 PM

Jason Diamond said:

@Andrey: There's a typo in the ReadMe.txt file. The actual class name is Sys.Preview.UI.DataView.

# July 22, 2008 2:46 PM

Andrey said:

@Bertrand Le Roy: yes, I add ScriptManager on the page and add reference to script:

<asp:ScriptManager ID="scriptManager" runat="server">

           <Scripts>

               <asp:ScriptReference Path="MicrosoftAjaxTemplates.debug.js" NotifyScriptLoaded="true" />

           </Scripts>

       </asp:ScriptManager>

# July 22, 2008 4:20 PM

Bertrand Le Roy said:

@Jason: good catch, thanks. I'm updating the readme.

# July 22, 2008 5:15 PM

VR2 said:

Again, Ben, an ability to statically parse or cast to type would solve that for you.

This ability can be added by us, retrospectively, via an extensions library applied after MS Ajax is downloaded.

eg

Sys.ApplicationLoadEventArgs.cast = function(obj)

{///<returns type="Sys.ApplicationLoadEventArgs"/>

   return obj;

}

By also doing this in your own classes, your constructor could have code like this:

inside = MyNamespace.Stuff.cast(inside);

inside.---; // Intellisense is now fully enabled.

Also, the lack of "in file" intellisense can be largely overcome by structuring your code differently to the way advertised/recommended.

Firstly you need to ensure that your namespace is defined in an external file (so the namespacing code can run and create the namespace for you ready to go). I have found adding a "_namespace.js" file to contain js intellisense references as well as namespace definition works well. This file is not required to be downloaded to the client. These can also be chained from child to parent folders, for each namespace required.

Secondly, after declaring your class (function) you can get intellisense by setting your function's prototype to that of the class you intend to inherit from. This duplexing (actual inheritance/temp inheritance) can be offset by setting these lines of code together.

Thirdly, when setting out your prototype, rather than set the whole thing (and overwriting the prototype you have just faked), writing it out longhand to add each item to the prototype adds a few more keystrokes but, if done in the correct order, I've found can yield 99% working intellisense at all times.

eg

if ($methodThatAlwaysReturnsFalse())

{

   MyNamespace.Stuff.prototype = Sys.xxxx.yyyy.prototype // Fake inheritance

}

...

MyNamespace.Stuff.prototype._myVar = null;

MyNamespace.Stuff.prototype.foo = function()

{

   this._myVar; // intellisense now enabled

   this.initialize(); // inherited methods are also available.

...

}

# July 22, 2008 7:07 PM

Andrey said:

@Jason: Thanks! The error is not occurs again.

But I get only {{name}} and {{description}} titles on the page, not data from someArray.

# July 22, 2008 9:44 PM

Bertrand Le Roy said:

@Andrey: you can send me your code at bleroy at microsoft, and I'll have a look.

# July 23, 2008 12:00 AM

gt1329a said:

@Andrey: This example may help you get started with the DataView:  encosia.com/.../sneak-peak-aspnet-ajax-4-client-side-templating

There are also a couple suggestions based on my initial impressions, Bertrand.

Thanks for giving us all early access to this stuff.  It looks very promising, so far.

# July 23, 2008 9:31 AM

jgd12345 said:

Hi, good to see you're acting fast on this.  I'd like to see the client server controls.  The doc says this will be in a futures release but surely these should be quite trivual to build once the client library is built.  If this is being pushed back because it wouldn't be useful for mvc then i don't think that is fair on the majority of your user base who are using web forms.

Also i'm interested to see how the client data source controls could allow me to do paging, sorting without page refreshing.  Currently i've been using UpdatePanels (wrapped around a ListView) as alot of the alternative approaches require too much work.  However UpdatePanels don't perform too well when there is lots of data.

# July 23, 2008 10:31 AM

Bertrand Le Roy said:

@jgd12345: nothing is trivial :) and this is not being pushed back, especially not because of MVC (this stuff actually works great with MVC). The data source should be in the next release.

# July 23, 2008 2:55 PM

Drew Marsh said:

Bertand,

I love the new release, but I have one bit of commentary on the client templates so far. Right now you guys have invented a special syntax that overloads the standard comment syntax with an additional asterisk to denote that it actually is code. Instead of doing this, why not use processing instructions? It's exactly what they were intended for. For example:

<?aspnet-script

if(item.property == "Something")

{

?>

<span>Something!</span>

<?aspnet-script

}

else

{

?>

<span>Nothing :(</span>

<?aspnet-script

}

?>

This should also make the parsing experience simpler (for runtime and design time) because you can more easily detect the presence of these PIs rather than having to inspect each comment tag.

Of course the PI target name is up for debate... "aspnet-script" was just a first stab at it. :)

Cheers,

Drew

# July 23, 2008 9:08 PM

migo said:

great idea!

# July 23, 2008 10:56 PM

CareySon said:

wow..i think it's a great way.more simple and less code:-)

# July 24, 2008 12:14 AM

Bertrand Le Roy said:

@Drew: when I first read your suggestion, I thought "oh my, why didn't we think of that?". I really liked it. But then I tried it and it started falling apart. First, you'd need to escape all > characters in your script (we could maybe live with that). Second, editors such as Visual Studio have no clue what's going on and trigger IntelliSense very inadequately (that could get fixed). But what kills the idea is that the processing instruction nodes do not appear in the DOM in Firefox. Too bad. Thanks for the suggestion though.

# July 24, 2008 12:54 AM

exz said:

thanks, just what I was looking for.

# July 24, 2008 4:01 AM

Andrei Rinea said:

Great tip! Simple and effective.

# July 24, 2008 6:47 AM

Evgenij said:

Yeah. Thanx, really cool.

# July 24, 2008 6:48 AM

kamii47 said:

Wow.

Very good idea we can implement that in othere areas also like gridview e.t.c

# July 24, 2008 7:35 AM

Attila said:

#1 is wrong simply because in JavaScript, undefined == null, so your first expression if(someObject != null) will work just fine, and is actually the best expression possible for the job.

If you really-really want to distinguish undefined from null, you can use typeof(x) == "undefined" as someone suggested here (and that seems to be thought in almost all books and tutorials on JavaScript, but I much prefer this one:

function isUndefined(x)

{

   return x == null && x !== null;

}

See <constc.blogspot.com/.../undeclared-undefined-null-in-javascript.html> for some more details.

# July 24, 2008 9:54 AM

Drew Marsh said:

Well first off, I'm VERY surprised to hear that FireFox eats the PIs... that's seriously lame.

Good point about escaping the > though, that would kinda stink. The editors thing isn't really a problem, like you said the tools would just need to be upgraded to recognize the PI which shouldn't be so hard. You have to teach them how to recognize the special comment syntax anyway now, right? 'Cause if I don't get intellisense support on my JS in those blocks in VS10 I'm not gonna be happy. :P

*sigh* I just hate to see the comment stuff overloaded. I was gonna say why not just use custom tags altogether with CDATA, like maybe:

<sys:script>

<![CDATA[

if(foo > bar)

{

]]>

</sys:script>

It's a bit more verbose, but better than overloading the comments IMHO. Unfortunately IE still barfs if you don't encode the > sign in a CDATA section (BUG!), so that's out the window too. :(

Later,

Drew

# July 24, 2008 11:58 AM

Bertrand Le Roy said:

@Attila: right, thanks, I fixed the post.

# July 24, 2008 4:09 PM

Bertrand Le Roy said:

@Drew: You currently don't get IntelliSense at all in the blocks, which is way better than completely wrong and obtrusive IntelliSense, which you'd get with processing instructions.

I don't think a custom tag would work either because they would need to be allowed anywhere in the XHTML markup, which if I'm not mistaken they're not.

We also considered something along the lines of < sc ript type="application/microsoft-javascript"> but that is way too long to type and remember.

We're not super-happy about using comments but it's our best option apparently.

# July 24, 2008 4:32 PM

phanatic said:

I wrote a post about how to do Master-Datails view with the DataView. I thought I'd put in a manual trackback.

-Phani

# July 25, 2008 12:00 AM

ben said:

thanks for the javascript opera tick trick :)

# July 25, 2008 9:53 AM

Fredrik E. Nilsen said:

I'm running the photo album on my Windows Home Server but I've run into problems with a few photos. Some photos shows as thumbnails but they are not shown in full size when I click the thumbnails. It seems like they won't load at all. If the photo doesn't load, the next thumbnail will not appear. If I open the photo in an image editor and save it with a new name, it seems to work.

# July 25, 2008 10:05 AM

Steve said:

I'd prefer the AJAX in MVC to not be 'baked in by MS'.  Keep it separated - if you want to use MS Ajax, fine, but if you want to use jQuery, etc...

# July 25, 2008 11:46 PM

Steve said:

On forum , from you:

"ClientID hell is something we're also working on"

After all these years, finally.... how about this:

let the compiler check for duplicate IDs or unassigned IDs - give a warning/error.  Otherwise.... DON'T CHANGE THE ID I ASSIGN FOR A CONTROL.

If I assign an ID, I don't want ASP changing it.  If you want to assign one because I don't provide it... fine.

# July 25, 2008 11:51 PM

Bertrand Le Roy said:

@Steve: yes on both accounts.

# July 26, 2008 1:29 AM

JRumerman said:

Hi Bertrand,

I'm finally taking some time to dig into the new preview and came up with an initial question.

With declarative instantiation of controls and behaviors, how do I guarantee that the JS file that contains the client component will be available on the page? Do I assume that the declarative instantiation is used at the page level and that the script file containing my client component will be included as a ScriptReference? If I were rendering a control using Rendercontents and wanted to include a declarative instantiation approach with my component (not sure why I would want to, though), would I still need to implement IScriptControl and provide the ScriptReference in the GetScriptReferences method? Is the usage pattern for the declarative instantiation focused at the Page level vs. the Control level?

Also, on a different note, I'm getting a bit confused with the different previews. Why wasn't the ScriptReferenceProfiler included in this preview? I've got two separate previews going on to get me the latest and greatest...

# July 26, 2008 9:18 PM

Bertrand Le Roy said:

@JRumerman: The js files have to be included into the page somehow, either as a script reference or a plain script tag. If you want to create a server-side extender for your behaviors, nothing has changed here. You do it the same way as you did before. This release really is pure client-side additions that do not modify the server-side model at all.

The ScriptReferenceProfiler isn't exactly preview. It's an optional tool that will probably remain a separate download for the foreseeable future.

# July 27, 2008 1:03 AM

jao said:

cool! reminds me of those techniques from the classic asp style. =)

# July 27, 2008 9:51 PM

Brian Wagner said:

Mine problem is all on godaddy when the default.aspx hit this line of code it stops

<photo:album runat="server" ID="Album1" />

If I remove it the style sheet loads, but obviously the ablum doesn't work.

I can only get the original Album.ASHX to work. I an out of options until my contract with gofatty is up, cause I don't know what else to do.

# July 28, 2008 11:22 AM

Brian Wagner said:

Ok I got everything to run fine on my local machine.  When I publish to my site hosted by Godaddy.com I get a problem with the following code.  Apparantly they are not giving me rights to the temporary asp.net folder this is using.  Thanks in advance for your assistance.

Static IMagehelper()

{

..

..

_imageCacheDir = Path.Combine(HttpRuntime.CodegenDir, "Album");

                  Directory.CreateDirectory(_imageCacheDir);

This  is the error:

Request for the permission of type 'System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089' failed.

I saw mention earlier that changing the Caching == CacheLocation.Disk to Caching == CacheLocation.Memory in the ashx file will work for godaddy. But I have tried changing all the string to memory and I still get the same error. I gues I am unsure on how to change the handler.

# July 28, 2008 12:10 PM

rblaettler said:

Is there a way to build this into your page so that the user does not need to sign up?

It would be interesting to use this as a support tool, but most of our customers don't have a WindowsLiveID (or at least don't know what that is...)

# July 29, 2008 5:41 AM

Aurelien said:

Hello Bertrand,

I'm playing around with the Preview Release and I found a strange behavior with "Code Blocks".

Let's use a collection of objects with a "firstName"  property.

I can conditionnaly render my template with : <!--* if (firstName) { *-->.

That works if and only if ALL my objects contains this property.

If ONE or ALL of my objects missed this property, I get a javascript error. It's really strange because when I watch the anonymous template function code, I'm in the "with(__context) { with($dataItem || {}) {".

I found a way to bypass this using "$dataItem" in the "Code Block" like : <!--* if ($dataItem.firstName) { *-->

BTW, really nice work, I can't stand waiting the next release !!

# July 29, 2008 8:05 AM

Aurelien said:

Me again !!

Actually, for the "Code Blocks" issue, I found why it doesn't work.

It's the difference between NULL property value and a property typo issue.

Maybe including a try/catch block in the anonymous template code function could be a nice way to handle that kind of typo issues.

# July 29, 2008 8:21 AM

Bertrand Le Roy said:

@rblaettler: you should probably ask that question on the Live forums: forums.microsoft.com/.../default.aspx

# July 29, 2008 1:51 PM

Fabrice Marguerie said:

I used incremental search in the first version of Visual Studio for .NET, unfortunately I had to stop using it almost immediately because it doesn't search inside collapsed regions. This is a big shortcoming that makes the feature unusable in most cases.

# July 29, 2008 8:30 PM

Bertrand Le Roy said:

That's if you use regions...

# July 29, 2008 8:39 PM

Daniel said:

Duh...

# July 30, 2008 2:55 AM

Bertrand Le Roy said:

@Daniel: May seem obvious to you, but very few people know about this (I know some people in the VS team who didn't know about it...)

# July 30, 2008 1:27 PM

Al said:

I never heard of it.

But looks like its ALT-I and not CTRL-I for my configuration (vb key mapping).

# July 30, 2008 2:40 PM

Alex said:

Does anyone know how to get this working in AJAX 3.5 ??  Sometimes SJAX is a good thing, epecially when performing mathematical functions in certain order which is NOT always in the same order. Can Anyone help get this script working in MS AJAX 3.5??

# July 30, 2008 4:30 PM

Bertrand Le Roy said:

@Alex: The scenario you describe can be achieved by maintaining a simple queue of tasks.

# July 30, 2008 4:58 PM

Alex said:

Perhaps that is possible, but would require a huge amount of rewriting.  I'll pay you well for the script if you can do it!  Not kidding.

# July 30, 2008 5:07 PM

Bertrand Le Roy said:

@Alex: what are you seeing when you try it? How does it fail? Are you getting an error message?

# July 30, 2008 6:11 PM

Troy said:

Dear Bertrand,

I lost the session vaiables. Why? Below my code:

Thx.

Troy

protected void btnLogin_Click(object sender, EventArgs e)

       {

           DataProvider dp = new DataProvider();

           SqlConnection kon = new SqlConnection(dp.dbConnectionString);

           kon.Open();

           SqlDataAdapter ad = new SqlDataAdapter("Customers_ByUserName", kon);

           ad.SelectCommand.CommandType = CommandType.StoredProcedure;

           ad.SelectCommand.Parameters.Add(new SqlParameter("@username", SqlDbType.VarChar, 50));

           ad.SelectCommand.Parameters["@username"].Value = txtEmail.Text;

           SqlDataReader reader = ad.SelectCommand.ExecuteReader();

           try

           {

               if (txtEmail.Text != "" && reader.Read())

               {

                   Session["CUST_ID"] = reader["CustomerID"].ToString();

                   Session["CUST_EMAIL"] = reader["Email"].ToString();

                   Session["USERNAME"] = reader["UserName"].ToString();

                   Session["FULLNAME"] = reader["FirstName"].ToString().Trim() + " " + reader["LastName"].ToString().Trim();

                   string paswd = reader["Password"].ToString();

                   string email = reader["Email"].ToString();

                   Decrypto dc = new Decrypto();

                   string ps = dc.Decrypt(paswd);

                   if (txtPasswd.Text != ps)

                   {

                       Default.MessageBox(this, "Invalid password", "key1");

                       return;

                   }

                   else

                       FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, true);

               }

               else

               {

                   reader.Close();

                   Default.MessageBox(this, "Your username have not been registered", "key1");

                   return;

               }

               reader.Close();

               //if this page called from shoppingbag page

               if (Session["CALLEDFROM_SB"] != null && Session["CUST_ID"] != null)

               {

                   //update shopping bag

                   SqlConnection con = new SqlConnection(dp.dbConnectionString);

                   con.Open();

                   string strSQL = "UPDATE ShoppingBag SET CustomerID = '" + Session["CUST_ID"].ToString() +

                       "' WHERE CustomerID='" + Session["CALLEDFROM_SB"].ToString() + "'";

                   SqlCommand cmd = new SqlCommand(strSQL, con);

                   try

                   {

                       cmd.ExecuteScalar();

                   }

                   catch

                   { }

                   finally

                   {

                       kon.Close();

                   }

                   Session.Remove("CALLEDFROM_SB");

                   Session["CALLEDFROM_SB"] = null;

                   Response.Redirect("Shopping_Bag.aspx", false);

               }

               else

                   Response.Redirect("Welcome.aspx", false);

           }

           catch (Exception ex)

           {

               Default.MessageBox(this, ex.Message + " : Failed to get data", "key1");

           }

           finally

           {

               kon.Dispose();

               kon.Close();

           }

       }

# July 31, 2008 3:20 AM

Sambo said:

The code look great!

# July 31, 2008 4:29 AM

Brian Chavez said:

Thanks, this little insight helped me solve a tough problem in ASP.NET when I was using a TypeConverter.

Regards,

Brian

# July 31, 2008 5:02 AM

Mike said:

"the engine only accepts expressions for the full attribute and within text nodes"

Why is that?

"It would be interesting to hear your comments on that, by the way..."

In this particular case, how about:

<img sys:render="if(Photo)" sys:src="{{ 'Images/' + Photo }}" alt="{{ FirstName + ' ' + LastName }}" />

# July 31, 2008 7:09 AM

beetle54 said:

A possible solution to the comment block issue:

I agree that using current solution is too verbose. Maybe we can use <%**%>. As asp.net developers, we are use to using <%#%> or <%=%>, I think by adding an additional tag like the one I suggested from before would be a good idea.

Just an idea!!

# July 31, 2008 8:43 AM

Andy said:

Great to see Templates coming the Microsoft AJAX. Javascript comments look very powerful and the XHTML syntax seems very clear. Top on my wish list would also be a Meta Data syntax/parser similar to docs.jquery.com/.../Metadata.

# July 31, 2008 8:48 AM

Alex said:

I can try again and let you know shortly.  Thanks for your help.

# July 31, 2008 11:41 AM

Nirvana said:

Microsoft ajax is spam!!!

jQuery is best!!!!!!!!

# July 31, 2008 11:43 AM

Bertrand Le Roy said:

@Mike: expressions are only the full attribute because the parsing would have gotten much more complex and slower otherwise. We weighted the benefit against the cost and decided it was not worth it.
You can already do something like what you suggest for conditional rendering by binding the display style property but that only covers one possible use of code blocks (others include looping over markup, etc.).

@beetle54: those are unfortunately not options as they would be invalid XHTML. Drew Marsh suggested something similar with processing instructions but that doesn't work either.

@Nirvana: great to have you back. Been missing you.

# July 31, 2008 1:20 PM

Bertrand Le Roy said:

@Troy: hard to say just looking at your code. Once you've checked all the possible causes described in this post and linked resources, attach a debugger and try to catch thread abort exceptions. If any happen, walk up the call stack and find the culprit. You can also use Fiddler or Firebug to monitor headers for session cookies and diagnose.

# July 31, 2008 1:27 PM

Alex said:

I put together a simple ASP.NET AJAX 3.5 sample page.  On this page is an (1)UpdatePanel (2)Textbox (3)Button (4)Label ..  When I omit the SJAX script above, it works fine.  Simply updates Label with text that I type into TextBox without a page postback.  Easy.  Not I add the SJAX script and nothing happens.  No JavaScript error. Nothing.

# July 31, 2008 2:30 PM

Bertrand Le Roy said:

@Alex: send me your repro at bleroy at microsoft and I'll have a look.

# July 31, 2008 2:44 PM

gt1329a said:

A server control might be a good way to handle the syntax complaints.

The control could have declarative syntax similar to a Repeater, ListView, or DataList, but render as a proper template for the client-side DataView.  It could accept a DataSource parameter on the server side, automatically set up something like a page method to serve that data as JSON, then (optionally) emit the corresponding set_data command on DataBind.  Something like that might go a long way toward lowering the barrier to entry, while still encouraging the more efficient client-side rendering.

Maybe even enhance the ListView to provide that functionality, depending on an EnableClientRendering flag.  Now, that would be a great feature!

# July 31, 2008 2:57 PM

Alex said:

I sent a zipped VB.NET sample project.  Thanks a ton!

# July 31, 2008 3:02 PM

Bertrand Le Roy said:

@gt1329a: yes, we are working on server integration of those features. Thanks for the feedback, this is very helpful.

# July 31, 2008 3:04 PM

Christian Hagelid said:

In order for CTRL + I to work you have to do a CTRL + F first to type the term(s) you want to search for.

Please correct me if I'm wrong

# July 31, 2008 9:10 PM

Bertrand Le Roy said:

@Christian: you're wrong :) Press CTRL+I then start typing what you're looking for. It will automatically select the first occurence and update it as you type. Once you've got the sequence you want, you can use F3 to go to other occurences of the same sequence.

# August 1, 2008 12:29 AM

Troy said:

      Hi Bertrand, I only show you the point of losing session while redirect to "Welcome.aspx". I have revised my code.

      If I debug in my local server, I am not losing this session. But after I put this on Web server, the session was loose.

      If I set IE on Privacy -> Advance -> Check Automatic....., this session is exist and run normally on IE Client.

      If I browse with IP number, I am not loosing the session, but If I browse with domain name with redirect, the session was loose.

      How do I have to fixe this problem?. Thx for your time.

      protected void btnLogin_Click(object sender, EventArgs e)

      {

          DataProvider dp = new DataProvider();

          SqlConnection kon = new SqlConnection(dp.dbConnectionString);

          kon.Open();

          SqlDataAdapter ad = new SqlDataAdapter("Customers_ByUserName", kon);

          ad.SelectCommand.CommandType = CommandType.StoredProcedure;

          ad.SelectCommand.Parameters.Add(new SqlParameter("@username", SqlDbType.VarChar, 50));

          ad.SelectCommand.Parameters["@username"].Value = txtEmail.Text;

          SqlDataReader reader = ad.SelectCommand.ExecuteReader();

          try

          {

              if (txtEmail.Text != "" && reader.Read())

              {

                  Session["CUST_ID"] = reader["CustomerID"].ToString();

                  Session["CUST_EMAIL"] = reader["Email"].ToString();

                  Session["USERNAME"] = reader["UserName"].ToString();

                  Session["FULLNAME"] = reader["FirstName"].ToString().Trim() + " " + reader["LastName"].ToString().Trim();

                  string paswd = reader["Password"].ToString();

                  string email = reader["Email"].ToString();

                  Decrypto dc = new Decrypto();

                 string ps = dc.Decrypt(paswd);

                  if (txtPasswd.Text != ps)

                  {

                      Default.MessageBox(this, "Invalid password", "key1");

                  }

                  else

{                      FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, true);

                  Response.Redirect("Welcome.aspx", false);

}

              }else

                  Default.MessageBox(this, "Your username have not been registered", "key1");

              }

          }

          catch (Exception ex)

          {

          }

          finally

          {

              kon.Dispose();

              kon.Close();

          }

      }

# August 1, 2008 5:11 AM

Bertrand Le Roy said:

@Troy: it seems like you're doing everything right here. If you've checked all the references I pointed to, I would suggest you contact support at this point. Feel free to contact me at bleroy at microsoft to tell me how that goes.

# August 1, 2008 1:44 PM

Mike.Borozdin said:

Good idea indeed!

# August 2, 2008 8:35 AM

Speednet said:

Rather than trying to shoehorn a lot of syntax into compliant XHTML, why not take the whole template and put it into a special comment block that is structured like an IE conditional block?

All browsers and XHTML validators will ignore the whole thing, and you will have a solution that will stay in one context (not switching back and forth between comment blocks).  You don't have to worry about hiding the code upon initial page load.  And it could one day be supported directly by the browser, just like IE conditionals are.

For example:

<!--[template]>

<div id="peopleIKnow" class="sys-template">

   <fieldset>

       <legend>{{ FirstName }} {{ LastName }}</legend>

       <% if (Photo) { %>

       <img src="{{ 'Images/' + Photo }}" alt="{{ FirstName + ' ' + LastName }}" />

       <% } %>

   </fieldset>

</div>

<![template]-->

-Todd

# August 2, 2008 6:43 PM

Xun said:

Stumbled into this blog when I was searching for JavaScript doc comments. Great post, more so, great blog, more so, great fun cachy hippy evil banner. I did not see your trademark avatar here, but that is great too.

# August 2, 2008 9:32 PM

Bertrand Le Roy said:

@Todd: Sure, that's something we considered. Actually, quite a few template engines out there are using script tags with different types than text/javascript, which are also ignored by browsers and have pretty much the same effect as what you describe. The thing is, we don't want the markup to be ignored. Not by the browser (because we're leveraging the browser's HTML parser to our advantage), and not by HTML editors (because we want designers to be able to work on the template almost like they would on regular HTML code). Finally, people interested in validating their documents might appreciate if half the markup doesn't hide in comments.

# August 3, 2008 1:00 AM

Xun said:

It works great. Somehow, I cannot help thinking this now resembles very much the old asp way, where we interwine code and script together.

Is it so?

Can you kindly reply, sir?

# August 3, 2008 10:11 AM

Christian Hagelid said:

@Bertrand: Awesome! Very very handy now that I understand how to use it. Thanks.

# August 3, 2008 6:46 PM

Bertrand Le Roy said:

@Xun: sure, and you can do that in ASP.NET too. If you don't like that, we have declarative syntax for controls and behaviors too. I'll show that in the next post.

# August 4, 2008 1:16 AM

Xun said:

thanks for the reply. Great

Something off the topic: I happened to read somewhere there is even a "Annual Evil Empire Planning Meeting" from a tech blog, wondering if this is the same evil empire as yours.

Another thought, since Google and Microsoft are archnemesis, is the "Evil" thing some sort of counterjoke against Googles' "no evil"?

Sorry for the baseless speculation and tech irrelevance.

# August 4, 2008 8:29 AM

Bertrand Le Roy said:

@Xun: I don't know about the EE planning meeting. But then again I'm only a henchman. Let me point out that we've been evil way before Google even existed. But yes, it has to do with that, but also with the fact that many people assume that whatever we do is always with some evil master plan in mind.

# August 4, 2008 2:45 PM

Lance Fisher said:

This looks great!  I've been looking for a good JavaScript templating system.  What would be REALLY cool is if I could use the same templating system on the server as a view engine in ASP.NET MVC.  Where the server will replace the tokens.  I'd still want the JS templating system.  I'd just like to be able to parse templates on the server if I could.

# August 4, 2008 8:00 PM

kamii47 said:

Nice But missing One very important thing

That is grouping.I need a free grid like devexpress gridview where we can do filtering, grouping e.t.c

# August 6, 2008 2:30 AM

Hardy Har said:

Or just install ColdFusion 8 FFS! Dropkick!

# August 6, 2008 4:14 AM

Mike.Borozdin said:

Hmmm... this page (dotnetslackers.com/.../Default.aspx) doesn't seem to load...

# August 6, 2008 5:08 AM

Vishal said:

Thank you very much

# August 6, 2008 5:12 AM

Philip Ross said:

While I agree that asynch calls provide the "correct" user experience, there are cases when you may want to use synch calls as a hack (isn't all of web development a collection of cheap tricks now?). In particular, making asynch calls during the unload event doesn't work well in non-IE browsers. This problem is explained more in www.livelearncode.com/.../11 which linked me to this page. It saved my butt.

# August 6, 2008 6:22 AM

jgd12345 said:

How about:

{ if some-expression }

  ...

{ /if }

or

{{ if some-expression }}

  ...

{{ /if }}

# August 6, 2008 8:51 AM

Tanner Wood said:

Thanks for the info.  This is going right into my toolbox!

# August 6, 2008 10:02 AM

xxXd said:

Great! Thanks for the mention. I am proud to say, I am part of the devilish team.

# August 6, 2008 11:21 AM

gbogea said:

Cool, thanks for the tip. The open source controls are specially nice because I have the chance to dig into the code just to see new ideas from other programmers.

# August 6, 2008 3:40 PM

Bertrand Le Roy said:

@jgd12345: text nodes like those are not allowed anywhere in XHTML so that doesn't work.

# August 6, 2008 3:42 PM

inderjit said:

yesterday when i go to open my mails from microsoft outlook express it giving error *.pst file is not personal pst file.

# August 7, 2008 5:18 AM

Sonu Kapoor said:

kamii47: We already have that feature on our to-do list.

Mike: This page just lists the samples that are available for the Gridview control. There is no ajax used on that page.

Bertrand: Thanks for the posting this :)

# August 7, 2008 12:32 PM

Ted said:

You are not the only one that does not like Braid.

1. Ugly, ugly, ugly.

2. Something felt wrong but I could not put my finger on it, now that you mention the jumping, this is exactly what it was.

3. I thought it was boring.

4. I thought all the puzzles in the demo were super easy.

5. $15 should be reserved for extremely special XBLA games that are worth it.  Braid is not that.

You could get as much enjoyment out of your favorite, classic games with an emulator that supports rewind.

# August 11, 2008 10:51 AM

Fabien said:

The aesthetics of Braid is what drew me to the game from the moment I saw the first screen. That, and the music. Man, do they blend well together!

The story of Braid is not what I found interesting though. In fact, I didn't care about it at all. I was just anxious to run through Braid's world.

I didn't have any trouble with the controls, although I agree that jumps are tricky when they're long or when they involve rebounding on multiple 'Lionhead' guys to get to a high platform.

Braid's game play reminds me of a mash-up between 'Mario', 'Donkey Kong', 'Solomon's Key' and 'Prince of Persia' for the control of time. However, Braid brings a whole new dimension in the way time is controlled backward & forward to solve puzzles. I believe that has never been done before in any other game.

But Braid's brilliant ideas aren't just limited to time control: I was blown away with the 'recursive reality' of the game where assembling a puzzle image altered the game world, enabling the very completion of the puzzle image! The last time I experienced a moment like that was in 'Portal' :)

At times, it does feel like the game difficulty is not balanced or progressive enough. As you pointed it out, you'll find yourself breezing through some puzzles while others will be a struggle because new game mechanics are introduced out of the blue.

Clues are provided in the form of a one-liner during transition screens when doors are opened on a new level but that's about it. This leads to frustrating 'discovery sessions' which could have been avoid with a tutorial of sorts.

Having said this, Braid is a truly unique game on many levels and I will very likely finish it, even though I may resort to using a game guide or a YouTube video when my frustration gets too high :)

# August 11, 2008 1:35 PM

Bertrand Le Roy said:

@Fabien: the aesthetics point is clearly very subjective, but talking about the music, I had to turn it off after five minutes and G actually thanked me for it...

I agree that the idea is relatively novel in a platformer (and the idea, to be clear, is not time rewinding, it's making it the central gameplay element) but it's not the idea that I didn't like, it's its execution.

I felt there was something going on with the puzzles being part of the game but was too bored to make an effort and find out (or more accurately, it just felt like such a wart to have lame mini-puzzle-games to build -is this game for 4-year olds?- that I hoped there was something more to it). Now that you tell me, ok, it makes sense, but it doesn't save the game in my eyes.

I guess this is just not for me (but on paper, it felt so *right*). Very disappointed.

# August 11, 2008 1:51 PM

Cathrine said:

Actually the above solution is working for Firefox not in IE.Please advice us.

# August 12, 2008 6:03 AM

Bertrand Le Roy said:

@Cathrine: it was never broken on Firefox. Chances are you improperly patched the files.

# August 12, 2008 2:44 PM

Tiger said:

God fucking yes. It's so taboo to say you didn't like it. THANK YOU for taking this step. It's a terrible, low quality feeling game. Or rather it would be better if it was released years back.

And I'm not just talking about the graphics, granted I don't like the impressionist artwork (not a fan of that art movement). It's that older games did this better. Take Donkey Kong on the GB. Another puzzle platform game that keeps going and going with shit loads of levels. Braid gives us a few with no replay value.

No Braid. And would Blow kindly STFU. Has he never had attention before?

And no number of interviews are going to convince me it's worth $15. Which means don't give ANOTHER interview telling us why we should. Just announce that it will be cheaper! But before someone says I'm uncultured... I don't spend $15 on rubbish. I don't spend any amount of money on something with such low replay value.

# August 12, 2008 7:57 PM

xun said:

wow! Now I understand that you have to become part of microsoft evil team then can you have a lot of good fun and blog about it. (Of course Google people also are having good fun after making a lot of good)

Sorry never had a chance to play any xbox games, still sweating over the never ending stream of asp .net new products and terms (MVC, Silverlight, LINQ ... AJAX is already old timer). So no comments, nor complaints.

But I take your words. Will never play braids even if given the chance.

Went to your flickr. Like the photography and drawings and sketches. Very much.

Definitely evil. Meaning, definitely masterly.

# August 12, 2008 11:52 PM

anna said:

FUCK NUMLOCK! Thank you for this post.

# August 13, 2008 10:04 AM

Ryan said:

I played the demo, loved it, and bought the full game a few days later.

1. The graphics didn't bother me one way or the other, though I can see how it could annoy some people.

2. I got used to the controls after awhile, but the jumping was the same with me - I would often have to do many rewinds to accomplish just what I wanted when jumping or falling.

3. The story didn't really seem to matter until the last world (or level, or whatever). That last level really tied it all together and was great, but you only really needed to know the basic plot elements - Probably just the stuff in the first book or two.

4. The progression may be better in the full game, as the demo skips a bit. It really depends which ideas didn't jump out at you. I do remember having some trouble on a couple of puzzles that took me awhile.

5. The price held me back to start with, but I decided to go for it. I think I got my money's worth, especially as I have some friends that will end up playing it with my copy.

I'm not trying to sway you or anything, just throwing out my opinion :)

# August 13, 2008 9:00 PM

Robbie Huttenhower said:

This is going to be a nice feature.  When can we see this ship?

# August 15, 2008 8:41 AM

Bertrand Le Roy said:

@Robbie: the preview is out there (first link in the post) and you may already use that. The actual shipping vehicle is ASP.NET 4.0, and we haven't announced a date for that yet.

# August 15, 2008 2:30 PM

Dave OS said:

Hi Bertrand.

Excellent work with this photo handler. Well done. I have just one question. I would like to display a subset of the EXIF meta-data. Ie.. If I wanted to view Model, Exposure and F-Number details. Is it possible?

Thanks

Dave OS

# August 15, 2008 11:46 PM

KAGRAN22 said:

for the IFRAME SRC just use the most visited URL in the World about:blank

Doesnt require any external Content and works in IE/FF and guess everywhere else...

^_^

# August 16, 2008 12:34 PM

Tayler. said:

i am just doing this for a school project but after reading all of these comments and articles about tidal power i feel that it could have an impact on the earth. all through college we have been told that energy can not be created but transformed and transferred. so it makes sense

# August 16, 2008 10:04 PM

jonathan said:

Um yeah, i use the final version of safari, and i love it. its great.

# August 17, 2008 10:41 PM

Bertrand Le Roy said:

@Dave: sure, for the moment I'm just dumping all the available info but you could certainly modify the code to only display a subset.

# August 18, 2008 2:27 PM

Bertrand Le Roy said:

@Kagran: as the post states, "if you work with a secure site (with an https: protocol), you can't use "about:blank" as the url of the iFrame, otherwise you'll get a warning from IE saying that the page uses both secure and insecure contents."

# August 18, 2008 2:28 PM

Dave OS said:

Thanks. I've tried but to no avail. My skill set dos'nt include C# :(. Any idea where i can start?

Dave OS

# August 18, 2008 3:11 PM

Bertrand Le Roy said:

@Dave: if you go to GeneratePreviewPage, there is a double loop in there that loops over Image.Metadata. You could modify the code in there so that it continues the loop if the data is not in your predefined list. Something like if (!["OneKeyIWant", "AndAnotherOne"].Contains(data.Key)) continue;

# August 18, 2008 3:23 PM

Dave OS said:

Thanks for that Bertrand. I played around with it for a bit and got it working. Here it is below. I removed the qoutes from each side of the commas. :)

if (!"Model, Exposure Time".Contains(data.Key)) continue;

Again.... Thanks for your help.

Dave OS

# August 18, 2008 5:30 PM

JeffEsp said:

This didn't work for me until I added a cast to IDataItemContainer like so:

((IDataItemContainer)Container).DisplayIndex % 2 == 0 ? "even" : "odd"

Any ideas why?

# August 19, 2008 9:11 AM

Akshay said:

It is interesting.

# August 19, 2008 9:56 AM

Bertrand Le Roy said:

@JeffEsp: Are you using ListView or another data control?

# August 19, 2008 1:41 PM

Dan P said:

This feature is essentially identical to the search command in GNU Emacs (Ctrl+S).  I couldn't find an equivalent for searching backwards though (i.e. Ctrl+R in Emacs)...

# August 20, 2008 5:54 AM

Robin said:

Hi Fabien,

Your solution for the ie bug is excellent if the element is not draggable.

Can you suggest an idea to show select above div

while dragging?

Best regards,

Robin

# August 20, 2008 7:01 AM

Bertrand Le Roy said:

@Dan: use SHIFT+F3 once you've typed CTRL+I and your search string. It's not strictly equivalent to reverse incremental search but it comes close.

# August 20, 2008 1:56 PM

Jimmy said:

Hello,

I think this project is great.

I wonder if you had an idea for this problem, somewhat related to javascript documentation. Our company is developing software on top of Firefox. Firefox uses their version of COM, called XPCOM. They also have their version of interface definition language (IDL), called XPIDL. One creates objects in C++ that conform to an XPIDL interface; and this object becomes available in Javascript.

I haven't been able to find a good tool to generate documentation from XPIDL. Just like IDL, XPIDL has some weird stuff that doesn't belong in the docs (since the docs target javascript developers), which means that it will require a fair amount of processing. Documenting from the C++ objects as opposed to XPIDL doesn't work well, since the capitalization of functions needs to be different between C++ class and XPIDL (aargh!) Well, I guess if I can write something to process XPIDL, I can probably write something to process the C++ class and fix the capitalization...

# August 20, 2008 11:17 PM

Raj said:

The alert box works great when i run my pages in the ASP development server. But when i host it on IIS and try to access the pages, the alert box works fine except for a status bar that gets displayed inside the alert box. Any solution for this problem?

# August 21, 2008 1:50 AM

Bertrand Le Roy said:

@Jimmy: sorry, I know nothing about XPIDL.

# August 21, 2008 1:57 AM

Bertrand Le Roy said:

@Raj: Do you mean the browser's status bar? Is the browser version the same in both cases?

# August 21, 2008 2:00 AM

Raj said:

Thanks for your quick response..

Yes, Roy its the browser's status bar. The browser version is also same in both the cases.

# August 21, 2008 3:59 AM

Raj said:

Hi Roy,

This is regarding the status bar getting displayed in the alert box. I had posted my reply to your query in that post but my reply is not getting reflected there.

Actually, the browser versions are same for both and also, its the browser's status bar that is getting displayed in the alert box.

# August 21, 2008 4:23 AM

Naveen said:

Can we download Visual Studio Express completely wihout paying.

# August 21, 2008 6:16 AM

Bertrand Le Roy said:

@Raj: the comments are moderated, and this is mentioned clearly when you try to submit a comment. Re-submitting comments ten times doesn't help ;) Commenting on a different post helps even less. And my first name is Bertrand, not Roy...

# August 21, 2008 12:24 PM

Bertrand Le Roy said:

@Raj: I don't know where the difference comes from but more and more, browsers don't allow scripts to remove chrome from pop-up windows to avoid phishing attacks that mimic non-browser windows. That may be what's happening here. How much of a problem is this status bar?

# August 21, 2008 12:26 PM

Bertrand Le Roy said:

@Naveen: yes, that's kind of what I'm saying in the post. Here's the url for the latest version:

www.microsoft.com/.../details.aspx

# August 21, 2008 12:28 PM

Daniel said:

Very cool. Is this the feature described in Omars book?

# August 21, 2008 3:18 PM

Bertrand Le Roy said:

I don't know. I haven't read this one.

# August 21, 2008 3:26 PM

Mike said:

Here's my honest feedback (rant): wtf?

From February to August and Microsoft, one of the biggest software companies in the world manages to release one new ajax control that is donated to them! It's a bit sad really.

And it's proof that Microsoft in general doesn't care. I believe you personally care for this project, it's just that Microsoft sees more value in the proprietary Silverlight instead of working on an project bases on open standards.

In fact, several blogging developers have already acknowledged that they couldn't work on this project because they had to develop Silverlight controls.

Now you say the top priority is fixing bugs. Well, you go ahead and do that, while jQuery finishes the second version of their UI project, Ext gets adapted to even more platforms and YUI releases their brand new 3.0.

I want to leave you with this observation: IF the community contribution are not what you'd like, do you think that might be because of the reputation of Microsoft? After all, why help Microsoft build their 'open source' software, when they called other such projects a cancer?

You reap what you sow.

-A developer continually disappointed in the Ajax offerings by Microsoft.

# August 21, 2008 5:59 PM

Bertrand Le Roy said:

@Mike: In the period you mention, we shipped the history feature, script combining, client-side templating and client-side databinding. Next preview of the Ajax framework is next week and will add more client-side data management.

Are you saying we shouldn't fix bugs?

Actually I never said the community contribution isn't what I'd like. As a matter of facts we have quite a number of people working on new controls as I write and I'm quite happy about the quality of most of the stuff that gets contributed.

I know perceptions are hard to change and the most efficient way to do that is with action, and I recognize we haven't sent the clearest signals these last few  months but I hope our actions in the next months will show you that your perception that we only care about Silverlight is completely wrong.

# August 21, 2008 7:15 PM

Matt said:

I see there no longer a version for VS 2005. I still have a number of projects that are in ASP.NET 2.0 using VS 2005, I guess I will need to down grade the latest release to get the bug fixes.

By the way there are some typos on the codeplex page www.codeplex.com/AjaxControlToolkit/Release/ProjectReleases.aspx?ReleaseId=16488 and the samples page asp.net/ajax/ajaxcontroltoolkit/samples/ relating to VS 2005 and the release numbers

# August 21, 2008 8:48 PM

Bertrand Le Roy said:

@Matt: you can also download the source code and compile against 2.0. If there is a lot of demand, we'll add a 2.0 version.

Thanks for the heads up on the typos.

# August 21, 2008 11:20 PM

shailatlas said:

Hello Bertrand,

AJAX control toolkit is a great piece of work by community and MS. The only thing missing is some basic documentation of functions or both server and client side. If you really want AJAX control toolkit to be used as much possible, please make some documentation.

We all are in client projects and hardly get time to go and study the source code of AJAX control toolkit to find required function. Even a great tool is less useful when you do not know how to use it.

Thanks,

Shail

# August 22, 2008 3:53 AM

Paul P said:

It would be a great idea having 2.0 version too. Few servers I work with haven't 3.5 framework :(

In the meantime I'll recompile sources.

Thanks a lot!

# August 22, 2008 7:28 AM

Mike.Borozdin said:

Mike,

Although I agree with that there should be more released of Control Toolkit and moreover I wish it had more controls, I don't think Microsoft doesn't really care. They have Silverlight, but Silverlight is a bit different technology. Anyway, you can still use 3-rd party AJAX libraries.

# August 22, 2008 12:23 PM

Cyrus said:

I can't wait for the release of the Client only Ajax toolkit.  The current HTTPHandler model with tons of those script files just doesn't work for us. It really seems like you guys are spread quite thin with tasks and/or just don't have enough resources in your team as Microsoft's Ajax offerings have been few and far in between in the last two years.

# August 22, 2008 12:46 PM

Bertrand Le Roy said:

@Shail: I agree with you and we want to improve the documentation, especially for the client-side object model.

@Paul: let me know how that goes. For the moment, I've had little demand for it but I'm totally open if that's too mauch of a pain.

@Mike: that's an excellent point, and most third party Ajax libraries work great with ASP.NET. I think you should have a choice of the style of library you like best.

@Cirus: it's live, go download it now! You might also want to check out the new script combining feature in SP1. We are putting more resources into Ajax now. The team is growing an I hope you'll see tangible results of that in the following months.

# August 22, 2008 2:04 PM

89 said:

Hi, Could we have a static "parse" method added to all classes, in order for clients to be able to cast to type?

eg

Sys.SomeClass.parse = function(obj)

{///<returns type="Sys.SomeClass"/>

  return obj;

}

Client Code would be

function onSomeClassClick(sender, args)

{

  sender = Sys.SomeClass.parse(sender);

  args   = Sys.SomeClassEventArgs.parse(args);

  // Full JS intellisense now enabled.

}

Thanks

# August 22, 2008 6:07 PM

Raj said:

Its quite a bit of a problem, as we need these to validate the inputs given by the user which can happen from both client as well as server side. Now if an alert box has a status bar, it doesnt look too good.

Is there any kind of workaround for this problem?

# August 23, 2008 6:30 AM

jose said:

you should try overlord. that's evil in a funny way.

# August 23, 2008 8:08 AM

Alex said:

Most of my projects are running using vs2005, so i really wish that it still can provide update on this version too.

# August 24, 2008 11:51 AM

Bertrand Le Roy said:

@89: that's been suggested before but it requires to write code in order to support IntelliSense. Instead, we prefer to make IntelliSense work in that case with no extra code.

# August 25, 2008 2:55 PM

Bertrand Le Roy said:

@Raj: you could try to use www.asp.net/.../ConfirmButton.aspx instead.

# August 25, 2008 3:01 PM

Mike said:

You mention 4 features, of which 2 are in a preview release. I responded to THIS release.

I never said you shouldn't fix bugs, of course you should. But you should also release new features, and I have been disappointed on that front.

Also, I capitalized the word IF, because I was speculating about contributions. You indicate my speculation was wrong, but I have yet to see proof because in 6 months you have added 1 contributed control. That's not impressive. So I thought you might not get many contributions then.

Oh and thanks for saying that the lack of new stuff is perception, that's like saying I'm delusional, it's all in my head. You guys have yet to release any kind of tree or grid control after 2 years (not even an extender for the GridView). It's not perception, it's fact.

And I understand YOU are excited about Ajax and dedicated, it's just that your company is NOT. It is not perception, but simple fact, that Ajax programmers were working on Silverlight controls. Therefore, Silverlight had absolute priority for Microsoft in the last year.

# August 26, 2008 3:54 AM

Raj said:

Hi, i am not supposed to use AJAX, any other way to solve this problem other than using ajax?

# August 26, 2008 9:13 AM

mike said:

I cannot open outlook and even with the bit of file given I cannot enter it right info to get the location of the personal files.  I have Outlook 2007 and get error that says: a data file did not close properly the last time it was used and is being checked for problems.

And it never opens or works.  

I can get to the repair tool but can't find right file to enter.

Any help?

# August 26, 2008 1:13 PM

Bertrand Le Roy said:

@Mike: never said you were delusional, but not being in the company, you have to rely on external perception, which is wrong more often than right.

Microsoft is a big company with a lot of customers, some of which build rich Internet applications today using Silverlight, and some of which build standard-based web applications. We just cannot afford to only address one of those audiences.

Microsoft is more than big enough that it can work on several things at the same time. Saying that Silverlight is the absolute priority for Microsoft is absurd: I think if Microsoft could only think about one thing at a time, it would probably be Windows 7 right now, not Silverlight.

It's really quite simple actually: our customers want to build Ajax applications on top of ASP.NET, we provide them with the tools to do so, it drives adoption for ASP.NET, which in turn drives Windows Server sales.

Now you tell me about resources that left the ACT to work on Silverlight controls. Right, so two of the devs that were working on ACT now work on Silverlight. At Microsoft, like in any big company, people change jobs from time to time. Guess what? They get replaced. For example, I wasn't working on the toolkit one year ago. Would you conclude from it that now all that Microsoft cares about is the Toolkit?

# August 26, 2008 1:46 PM

Bertrand Le Roy said:

The control in the Ajax Toolkit doesn't really use Ajax, so you might be able to reuse some of the code in there although it might be quite a lot of work. I guess your options would be to live with the status bar, make your own control using techniques similar to what the Toolkit is doing or use the toolkit.

# August 26, 2008 2:22 PM

Bertrand Le Roy said:

@mike: maybe do a global search on your whole hard drive for *.pst files?

# August 26, 2008 2:23 PM

xxXd said:

It is overwhelming. The way he produces tips as if he were a balloon peddler. Need a balloon, here you go. 1, 2, ... 37. Even more overwhelming/amazing, people never get tired.

One winner up, a million losers down.

# August 26, 2008 4:36 PM

VR2 said:

The "89" comment was left by me but I did not use that name nor that URL.

I can see why you might like to have code comments solve this problem of "casting" but

#1 Is there even a doc comment syntax for doing what is being done in the above example yet?

#2 To implement and call to a cast method is not alot of (additional) code.

#3 Even in C# we need to make use of casting, not always do we know the exact type being passed in. Even then we may wish to cast down or up to various types in the inheritance chain.

#4 Sometimes one might want to cast one object into multiple seperate interfaces.

So while I appreciate your keen-ness on not adding any additional code lines, I'm not sure you could cater for these scenarios with doc comments alone?

# August 27, 2008 7:39 AM

Bertrand Le Roy said:

@VR2: we're looking at ways to enable type hint comments in the next version of Visual Studio.

# August 27, 2008 5:34 PM

Mike said:

How could we know anything that happens at Microsoft. It's all so closed, I must have asked on 10 blogs what was happening with Ajax the past year. Should we invest time in it? Where's the gridview/treeview/rich editor? Is that even coming? Should I wait or go with a different tool? Nobody answered. Everywhere I looked I saw Silverlight being discussed. I even mailed Scott Guthrie about it, usually very open, no answer, just silence...

What I express is my frustration, so perhaps we have a communication problem?

---

"Our top priority following this release is bug fixing in order to get back to a stable and low number of bugs. We also have a number of contributors working on new controls, following the priorities the community communicated us."

---

I find that frustrating, because I see the post title in my reader, and I'm seriously excited. I think, oh boy, this will be cool. The general 3.5 SP1 release had so much great new stuff, like dynamic data and entity framework, let's see what's new for Ajax. Well, 1 control and some bugfixes. Disappointing! What's next? More bugfixes and waiting for the community to do controls? Disappointing!

One reason I'm excited about ASP.NET MVC, so I don't have to wait on Microsoft for the Ajax anymore, I would just use YUI, done. Have you seen the 3.0 alpha? That's amazing!

# August 27, 2008 6:36 PM

Bertrand Le Roy said:

@Mike: did you ask here? Scott is a very busy man so I don't think it's a question of openness. There are people working on a grid and a rich text editor. There are several third-party components also (including free, open-source ones). Do you need links? ASP.NET has had an Ajax-enabled TreeView since 2.0 (and the rendering is reasonably good when using the CSS adapters).

# August 27, 2008 6:43 PM

Bertrand Le Roy said:

Oh, didn't see the second part of your comment, apologies. Again, I think you're being unfair: SP1 has script combining and browser history management, and the Ajax Preview has lots of great stuff such as the template-driven DataView and live bindings. So "what's new for Ajax" is much more than "1 control and some bugfixes".

On the toolkit front, I never said I was counting solely on the community: contributors can be internal and external, and indeed a good share of these contributors are Microsoft employees. When I'm saying that our top priority is fixing bugs, it doesn't mean we're *only* doing that, just that we think that's what's most needed today. I understand that you disagree with these priorities and your feedback is well understood. Now I have to weight that against the feedback from the rest of the community.

Finally, YUI works great on top of ASP.NET and if you like that library (or jQuery or whatever), that's perfectly fine by me. Really.

# August 27, 2008 7:21 PM

Raj said:

hmmm. not left with that much time i guess. Let me see if i can do something about it. If i get any solution, will post it here. Thanks a lot for your help.

# August 28, 2008 12:59 AM

Nariman said:

When using client callback (ICallbackEventHandler) in WebForm_DoCallback() script there is boolean parameter useAsync. In theory and as msdn says, if we pass false to this parameter call back must work synchronously. I tryed and realized that it doesn't do so(many of you I think realized that). In some blogs I saw a solution to modificate MS's WebForm_DoCallback() funtion: forums.msdn.microsoft.com/.../f4134c2e-ca04-423a-9da3-c613713a7b52

or saw solutions just like in this blog - to insert a script into head of aspx.

But if it an error of microsoft isn't there any patch o something like that that we can use?

# August 28, 2008 6:53 AM

Ryan said:

Oh dear God, thank you! :D

# August 28, 2008 1:37 PM

Bertrand Le Roy said:

@Nariman: this is by design. I answered the MSDN forum thread with a more detailed explanation. Can you please point me to the MSDN atricle where you've seen claims that this parameter would make the call synchronous? I'd like to get that corrected.

# August 28, 2008 2:46 PM

Bertrand Le Roy said:

@Ryan: you're welcome, but please, you may call me Bertrand.

# August 28, 2008 2:53 PM

Stephwn said:

Did anyone every get this to work on XP with an "Old Version" of media player (sync).  

XP Media Player doesn't work with MS Windows 2003 - same company, but Media Player works with a prioritary Sandisk device wonderfully.

MSFT simply doen't get the mobile environment or the mobile music customs!

# August 29, 2008 1:55 PM

Daniel Cazzulino said:

Have you looked at code.google.com/.../JavaScriptTemplates ?

They have an explanation why they think using a textarea to wrap the templates is the best and most flexible solution.

# September 1, 2008 1:18 AM

Bertrand Le Roy said:

@Daniel: they want the template as a string, we want it as a DOM fragment. This leads to very different constraints and ideal solutions.

# September 1, 2008 2:11 AM

mehfuzh said:

That's cool, finally IE got highlighting feature!! Though, i always miss the colorful view source in IE. Also the input box highlighting like Safari :-).

# September 1, 2008 3:06 AM

Quiet Desperation said:

I wasn't thrilled by it either. I was able to get through the first room just fine except for one puzzle piece. There's this one jump you have to time so precisely, and I could swear I did it a number of occasions, but I just could not clear the gap to the final piece. I must have sat there for 10 minutes rewinding over and over again. Meh... I like a challenge but not something with a millsecond timing window. It's just not worth it.

# September 1, 2008 6:02 PM

Khurram Shahzad said:

Hey,

Many thanks very interesting article you posted.

But I was few questions regarding the web service.

Is it the normal Web Service (.asmx) or a JSon based web service.Another thing if the Web Service fails than How these kind of situations can be manipulated.

Overall, brilliant.

Regards,

Khurram.

# September 3, 2008 5:05 AM

Mike Tavares said:

Does this control only pick up certain script references?  The reason I ask is that when using it it picked up all the Ajax Control Toolkit references and the AJAX references, but did not pick up others like scripts for the menu control, validators, and 3rd party infragistics references.  They are being loaded with my page, but not being listed out by the control.

# September 3, 2008 11:45 AM

Bertrand Le Roy said:

@Khurram: the service is a normal asmx service, *but* used in JSON mode. In ASP.NET, any web service can be very easily morphed into a JSON service by adding a [ScriptService] attribute. ASP.NET even generates an optional JavaScript proxy (that we're using here) that is accessed using the PeopleIKnow.asmx/js url (notice the /js at the end).

You can provide callbacks for failures or timeouts of the web service as additional parameters to the service call.

# September 3, 2008 12:16 PM

Bertrand Le Roy said:

@Mike: it can only pick up script references that were registered with the script manager. Older ASP.NET scripts and third party scripts not using script manager will not get picked up (but they can't be combined either). We're considering making all references go through script manager if there is one on the page for v.next, which should solve that problem and make everything combinable.

# September 3, 2008 12:20 PM

Odegaard said:

Just an idea... how about allowing for javascript expressions like this one:

<span>{Eval(Math.round({Binding Average})}</span>

It allows for some interesting binding scenarios and I've used it with great success in my own binding library.

# September 3, 2008 12:54 PM

Bertrand Le Roy said:

@Odegaard: in a one-way/one-time binding, you can do {{ Math.Round(Average) }}, but even with live bindings, you can provide a convert function (and also a convertBack function for two-way): {binding Average, convert=Math.round}.

# September 3, 2008 1:21 PM

HeartattacK said:

Changing the value in the textbox...it changes the javascript variables held in memory, right? Does the changes propagate to the server (or even the db)? I wouldn't think so. So, how are we to call our script service when a change is made? Are there any hookable event handlers that we can use that give us something like "newValues" and "oldValues" in javascript?

# September 3, 2008 9:32 PM

Bertrand Le Roy said:

Heartattack: that is of course an excellent question. There are mutation events that you can subscribe to on the JavaScript object and I'm going to cover that in the next post. To be clear, you are still using a plain JavaScript object, but we instrument it automatically when you do the binding so that it exposes change events.

In the next release, we're adding a DataSource control that handles those change notifications automatically and will be able to send them back to the server without requiring that you write any code.

# September 4, 2008 1:00 PM

Mike Tavares said:

@Bertrand:  That being said then, what exactly is the difference between using this new composite script combining versus the toolkitscriptmanager?

# September 4, 2008 4:07 PM

Bertrand Le Roy said:

@Mike: the toolkit manager can only combine resources that have been marked as combinable (which excludes MicrosoftAjax.js) and the combination is fully automatic, which in some cases results in worse performance across the site.

# September 4, 2008 5:20 PM

greystone227 said:

I absolutely loved Braid.

1. I found the visuals to be absolutely beautiful, and the music just made the experience outstanding. I understand this is very much an opinion, though.

2. Maybe I don't play enough platformers, but I didn't notice anything about the jump. Felt fine to me. Personal preference again, though.

3. I really liked the story, but it was kind of disjointed. If you listen to one of Blow's interviews though, he has a good explanation for it - since the game can be played in pretty much any order after a certain point, you have to have a story that can do the same.

But I must say, I have to completely disagree with your comment about how the story doesn't blend with the gameplay (and I find your example of a good game story to be quite funny - Portal was awesome and funny, but it didn't really have much of a story man, haha - I mean, the secret rooms with the "the cake is a lie" slogan and companion cube posters were cute and hilarious, but, you know, not really a good story). The gameplay and all of the ideas it presents are extremely symbolic of the story. I find that this is especially the case in World 2, where it is easy to see the connection. It just blends right into what you're doing, especially if you're willing to look further into it and not just breeze through the snippets (and that sounds really stuck-up and stuff, but really I'm just trying to say that this is more than you're typical video game story).

4. If you're just going off the trial to judge the difficulty curve, then yes, I would completely agree with you. The trial definitely jumps around, but only because the developer is trying to show you all the different gameplay elements - and to do that, you have  to skip around a bit. The actual game is a little different. You also have to keep in mind that each world really has it's own difficulty curve. You can't judge the whole game on one scale, because once again, you can play it in any order really. Not to mention each of the world's time mechanics are so different that saying which one is harder to master depends on the person playing.

5. It's easily worth $15. I mean, it probably took me 3 hours or so (maybe 4) to beat all of the puzzles in the game. I also beat it a second time which took me maybe another hour. It's a quarter of the price of an average game. Multiply 3 by 4 and you get 12 hours, so you're getting your average amount of gameplay for your money's worth. Not to mention the fact that Braid is really an experience - an experience that's easily worth $15.

# September 5, 2008 10:59 PM

Bertrand Le Roy said:

@greystone: see, that's the catch22... The demo may give a bad idea of the game but it was such a bad impression that I'm not going to risk paying for the whole game and still not like it (which is quite likely). So I might be passing on a gem but I'm not going to buy every game that has a bad demo because the full game might be better.

I can't let the Portal thing unanswered though. There is very little text in Portal and there might not be a lot of story, but that's not the point. The point is that the game is telling a (short) story in a very subtle way. This is not about "the cake is a lie". You seem to be confusing what's written in English with the story. Case in point, in Portal, <spoiler>you start the game believing that you're just going to be part of a fun experiment and as the game advances, you understand that something actually went horribly wrong and that Glados took over the facility and probably killed everyone.</spoiler> Nothing groundbreaking in the story itself but again that's not the point. The point is that video games are a relatively young art form and have to find their own way of telling stories. There can be a story in a painting or in a symphony, but it's not written in English. In games, the story is best told not in English but through subtle hints. Bioshock also did that well but was being more explicit than Portal. I did choose the Portal example very carefully because it was the exact example that I consider shows how storytelling in games can be done best.

# September 7, 2008 1:11 AM

John Lewicki said:

Looking good!  But!

I can't figure out the expression syntax to use of if my data item is an an array, as opposed to an object with named fields.  In other words, instead of an expression like {{Name}} I would like to use {{[0]}}.

It looks like the template compiler generates code that evaluates the expression inside of a 'with' block, which seems to break the array indexing inside the expression.  So I am currently resorting to a hack: {{ $dataItem[0] }}.

Is there/will there be an easier way to do this?

# September 8, 2008 4:26 PM

Bertrand Le Roy said:

@John: that is actually pretty uncommon, which is why we're not providing a specific syntax for that. {{ $dataItem[0] }} is actually not a hack at all but the supported way of doing that.

# September 8, 2008 4:40 PM

iron9light said:

Make it a string and use your own converter (or parser).

# September 9, 2008 2:46 AM

Bertrand Le Roy said:

@iron9light: that's assuming you know what is supposed to be dates in the data structure. That is sometimes true but not always.

# September 9, 2008 2:11 PM

Dan said:

I'm going to do the same thing soon, been thinking about it for a while. The plain white look simply doesn't give the guitar any personality...

# September 10, 2008 6:49 AM

Matt Brooks said:

Hi Bertrand,

I only just got round to digesting these two posts on client templates. I think it is a necessary feature to aid client development, which when doing anything non-trivial can quickly become overly complex. I'm not sure I'm 100% happy with the template syntax but I can't think of any improvements and it sounds like you guys have debated it a lot! The actual binding syntax looks intuitive.

I've recently completed a project that required a certain degree of client side functionality that we don't get a great deal of help with when using ASP.NET. Among that functionality was a 'right-click-context-menu' for manipulating one-or-more rows of tabular data. I used a jQuery plugin to get the context menu up and running quickly. The menu options called back to an ASP.NET web service (script service?).

The approach worked really well for us. However, if data was updated on the server and the change needed to be reflected on the UI then we were forced to round-trip the current page, to keep view state updated.

I would be interested to know how the client templates play with view state? If I was to guess I would say that with the Web Forms model there will always be the problem of keeping view state in-sync.

Perhaps I am thinking about this all wrong though. I guess a more 'Web 2.0' approach would be to render a 'web form' (aka ASP.NET page) and leverage the power of client script to render out portions of the page and communicate changes back to the server. Therefore the page state is stored on the client and NOT on the server, hence removing the need for view state (?).

I look forward to your comments.

# September 10, 2008 5:34 PM

fb said:

If you like factcheck.org you will absolutely love

http://vote-smart.org

I have yet to find a better site to find out what a politician really is about, not base on his latest sound bytes, but on his voting record, and ratings from interest groups.

# September 11, 2008 10:34 AM

Darren Kopp said:

The *best* place to get facts is fox news................................. LOL! i'm sorry, i couldn't help myself with that joke.

factcheck.org rocks.

# September 11, 2008 10:46 AM

Gabe said: