Timo, please send me a repro page at bleroy (at microsoft).
I know :|
[ASP.NET]Atlas CTP June 2006
Michael, please contact me directly and describe the multiple errors that you get. bleroy (at microsoft).
Info and download here. Be sure to checkthis post by Bertrand LeRoythis post by Nikhil Kothari
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
Kalimuthu: I don't understand what you mean by "demo version controls".
Bertrand Leroy, un des développeurs du projet Atlas de Microsoft a fait une interview où il parle...
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?
Nico, please give me more details by mail. bleroy (at microsoft).
Cyril: merci de ta réponse. C'est triste à dire, mais ceci est à peu près la seule raison qui nous pousserait à supporter Opera...
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?
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.
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
The bug is fixed in 1.0.2 that I just uploaded. Thanks for the bug report.
La question du partage des variables de sessions revient assez souvent, pas plus tard qu'hier pendant...
Masoud: what is supposed to be on this page? It comes out empty for me.
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...
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.
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.
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/
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.
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>).
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.
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.
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?
More Atlas stuff&nbsp;からです。 &nbsp; Using the XmlDataSource Data property for easy samples &nbsp;...
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.
It's the second time in just a few days that I see blog comments attack Atlas on its compatibility layer.
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?
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.
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.
We already knew that JavaScript had some issues with semantics. Here's another funny one. Guess what
Bertrand LaRoy, over at More Atlas Stuff, has discovered some truly weird JavaScript behavior. Apparently...
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".
Abo: the VB source code is available from the GotDotNet workspace. Just follow the link.
Kori: actually no, it's not a new concept, nor is the name. Look it up in wikipedia:
http://en.wikipedia.org/wiki/Mixin
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.
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.
ScottGu's Blogからです。 August 9th ASP.NET Link-Listing 今回の投稿では Scott さんが発見した素敵な記事のリンクとそれぞれの紹介コメントが書かれています。見てみたところ、全て英語(当然)ですが内容はやはり濃かったです。個人的に特に気になったのは...
Albert: this is Nintendo's Brain Age DS game.
Wozoi: all right, you're younger, but that won't last. Wait?!
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).
PingBack from http://blog.dream-coder.de/?p=89
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."
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.
It seems like I'm not alone in my hatred for useless keys.I mean, who hasn't pressed Caps Lock
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).
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.
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.
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.
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.
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.
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.
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.
(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.
Right. I should have done my homework more seriously. Updating the post.
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.
It's the second time in just a few days that I see blog comments attack Atlas on its compatibility
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:
--- 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."
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.
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.
Errrrr... Sure... No need to shout. You?
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.
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.
ASP.NET Event Validation
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.
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.
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.
Xander: it doesn't have anything to do with Atlas but see above comments.
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.
Zois: wow, I wonder where they got that from, but that certainly wasn't a scientific show ;)
Really good post about Creating Session variables and Redirecting the page.http://weblogs.asp.net/bleroy/archive/2004/08/03/207486.asp...
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.
Nikhil さん と Bleroy さん の blog からです。 Script# Prototype Script# brings compile-time and C# niceties to JavaScript
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.
nikhilk.net と Atlas and more と ScottGu's Blog からです。 Back Button Support for Atlas UpdatePanels ( nikhilk.net
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
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).
I thought I'd write a few posts about the controls I've created for Brad's Mix06 demo, which
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)
[来源:Bertrand Le Roy] 传统的web应用一般含有多个页面,用户在浏览时,浏览器地址框里的地址会随着页面的变动而更新。用户可以bookmark页面把网页地址收藏,之后通过收藏夹里的地址回到同个页面。用户在网站浏览时,也可以使用浏览器的向前/向后按钮来回访问多个网页。
Troubled: send me mail at bleroy at microsoft com with code to reproduce the problem and I'll have a look.
PingBack from http://brennan.offwhite.net/blog/2005/09/14/atlas-for-aspnet-20-is-out/
PingBack from http://edgardorossetto.net/2006/03/17/ruby-para-net/
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 ...
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.
SQL Injection attacks are reallynasty security vulnerabilities, and something all web developers (regardless
C'est une annonce relayée coup sur coup sur les blogs de Bertrand Le Roy et de Scott Guthrie : ComponentArt...
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.
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.
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)
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.
Manuel, you'll see in the next CTP that all Atlas classes are now prototype-based.
I'll fix the post.
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.
This posts completes the Microsoft AJAX library OOP enhancements, giving a lot o
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());
Craig. Read on to the next article: http://weblogs.asp.net/bleroy/archive/2006/10/11/From-closures-to-prototypes_2C00_-part-1.aspx
:)
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.
Matt: send me a simple repro of your problem at bleroy (at microsoft). I'll have a look.
It seems that the next MS AJAX preview will be very, very different from the previous CTP. Bertrand Le
So it's been a while since the last Atlas CTP was released (July). By now, if you've been following...
Here are three common mistakes I've seen recently in script files.Undefined is not null.If you've
Betrand Le Roy of Atlas fame has an interesting writeup on what he understood from the Matrix Trilogy.
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.
In part 1 of this post, I exposed the differences between the closure and the prototype patterns to define
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.
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.
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.
Microsoft has been hard at work on the next Microsoft ASP.NET AJAX (formerly "Atlas") CTP,
Michael, Jon: it's imminent.
Scott Guthrie l'annonce sur son blog via un billet fort détaillé . La version Beta 1 de Microsoft ASP.NET
Scott Guthrie l'annonce sur son blog via un billet fort détaillé. La version Beta 1 de Microsoft ASP.NET
Pour compléter le billet de Patrice il y a la beta 1 de Microsoft ASP.NET Ajax Extentions de dispo mais
Patrice et Fox vous l'a déjà annoncé hier : Une nouvelle version de Microsoft Ajax Extensions (nom de
Good post on this subject by Bertrand Le Roy
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.
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).
What do you mean?
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
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.
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.
> 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
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.
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.
We have recently completed converting our suite of user interface controls from the latest Community
</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>
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/
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
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.
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.
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.
In previous CTPs, the client-side DOM event model was the IE model. You would use attachEvent and get
You can download the bits here . The "value-add" package is now called "Futures" and it's available as
Fox nous a TRES brievement annoncer la mis en ligne de la beta 2 de Microsoft Ajax Extension : ASP.NET
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?
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.
http://ajaxian.com/archives/dom-events-in-the-microsoft-ajax-library-formerly-known-as-atlas
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.
Introduction Microsoft Ajax defines a component as a class that inherits from the base Sys.Component
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.
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.
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.
Foo.Bar = function() { this.stuff = {} } Foo.Bar.prototype = { number: 0, toString: function() { return "Bar #" + this.number + (this.stuff.id || ""); } }
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.
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"
Don't ask me...
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.
Chad: this is a known problem that is fixed in the RTM version. Thanks for reporting it.
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.
Ronny: feel free to modify the code and add more space. Would you need help with that?
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
Ronny: good point, you'dprobably need to modify the code a little so that it respects the property.
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..
In RenderChildren, just create a bunch of literal controls that contains " " 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.
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)!
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?
Add a button to the page, make it cause validation, browse to the page, view source.
Hmm, RTM version eh? So you guys are pretty close then :)
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..
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!
Hey, amazing how David Ebbo on this picture reminds me Benigni.
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
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
LOL! I could never have imagined there would be a web site dedicated to it.
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
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.
Do you get any script errors?
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.
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.
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.
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.
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
Any support for using the ms:confirmbutton w/ a delete imagebutton within a gridview?
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!
Alternatively, debug it is using Sysinternals DebugView and lots of Debug.WriteLine() statements...
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?
Got here from Sitefinity 3. Great add-on I am going to give this a try shortly.
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.
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).
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!
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).
the nerd tests are sweet!i was definetly not a nerd!!!
how to display message boxes from server-side code?
Moderage:I think you can use window.setTimeout and golbal virable for your poupose.
PingBack from http://www.fernandowendt.eti.br/?p=36
resh: I don't quite understand the question, that's exactly what the blog post is about...
what is the best xbox 360 game available???
Depends what you like. Gears of War and Oblivion are both marvelous time sinks.
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!
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...
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?
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?
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.
Thomas: Sure, except that you can't master all technologies around. And what if *you* are the client?
How about we make this easier for the people that have to do a science paper on this crap!!!
Great attitude, Kelly. Good luck with that.
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.
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.
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.
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.
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.
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.
Go AJAX, the old fashioned way!
I am having this exact problem with Classic ASP. Any ideas to use something other than Response.Redirect?
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.
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!
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
if (Session["Error"] != null)
Response.Write(Session["Error"].ToString());
Session.Remove("Error");
This does not work:
protected btResponseRedirectToNonExistantPage(object sender, EventArgs e)
Response.Redirect("NonExistantPage.aspx", False);
==> Object reference not set to an instance of an object.
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.
Tony: it's hard to tell exactly what's happening in your case. You should contact support.
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.
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.
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!
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.
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
AM: err, thanks. I think you're missing my point here but thanks. <g>
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?
Yes, that's the point of UpdatePanel.
Congratulations!!!
You've done a nice work...
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.
All I can say is.. Wow.
This looks great. A step toward melting the gap between web and desktop. Great work. Keep it up!
Congratulations!!
Raj
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 !!
i would love to see your demo video-streams... but the quality is so bad that someone can actually not watch them...
thanks b.
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
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
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?
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
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?
Very sweetly done folks ;)
Its making my job easier each day ;) hehe.
SB.
Dev Evangelist.
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.
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!
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?
"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
You shouldn't be proud, the release is buggy.
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.
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.
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 ?
u need a screwdriver to put on a faceplate?? and how come the companies who sell the faceplates dont give instructions??
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?
Mike: no, you don't, it's just easier with a screwdriver, it allows you to lever it out gently.
Bhaskar: good point. You could also set-up a response filter that swallows all new output.
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.
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.
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.
Ali: please contact me through the contact form of this blog.
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.
Right. I stopped reading as soon as the troll said "LOL".
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.
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.
Can you please go away? Atlas *does* run on apache and on PHP.
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.
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.
Good article. Hopefully Microsoft will fix this ASAP. Let's wait together
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!
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
(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...
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!
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.
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.
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.
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?
shashi
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.
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
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.
did the drive keep sticking and its easier with no faceplace like mine??
he asks wishfully
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
Mike: the next version of the toolkit will contain the fix, which may be your best best as I see you're using it.
Max: no.
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?
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.
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
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.
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:
Do you have any idea what causes the problem?
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?
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"
You probably don't have ASP.NET 2.0 installed, or it's not active on that application.
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.
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.
Thomas, please contact me through the contact form of this blog. I'll look at your file.
Does anyone have the full file working. I am getting a Sys is undefined when using the Atlas toolkit
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?
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.
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.
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!
All those comments in javascript will bloat the size of the js files won't they?
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.
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.
Has this now been fixed with the 3/2 release?
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!
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.
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?
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?
Love it! "I was a nerd wannabe" I slightly disagree with that remark!
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
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?
When can we expect ASP.NET Ajax update with this fix?
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.
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.
Fedor: see above comment. The next release (Orcas beta) will have the fix.
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.
Ron: I'm asking O'Reilly. I'll post their answer here.
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!
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).
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 :-)
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.
Try downloading it again. I just re-downloaded the PDF and it's stamped March 13, 2007.
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.
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.
> 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 :)
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?
Thanks Bertrand just purchased a copy of it.
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.
Got a copy too, looking forward to read it. Hope it gives you some motivation to write some more great posts.
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
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.
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?
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.
Does the ASP.NET Ajax team plan to release the "compression" tool they use to create the release script from the debug script?
Are you saying that Safari will not run scripts with the function body inline or that it simply won't show the stack?
Scott: that's good feedback, we're getting that question a lot. We're thinking about it, but it takes some time. Thanks.
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.
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!!
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...
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
Perhaps this bit of guidance could be added to the AJAX documentation at some point.
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.
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.
cool! and keep up the good work.
I bought the booklet today and on page 17 it's still using the atlas tag instead of asp... no biggie...
Hi - I have a Safari subscription, but this document does not show up there.
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.
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).
Kris: I'm asking my editor. What happens when you follow that link: http://safari.oreilly.com/0596527470 (found from the PDF page)?
Tyler: sure, I have a tip... Contact support :)
Jai: use setTimeout to queue the next request.
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).
Can you do up a small sample of how this $ method should be used for debug scripts and not for production scripts?
The features definitely rocks.
Can you reveal more secrets about the "elegant solution" that is implemented.
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.
Morten: I'll try to do that in the following days. I'll post when I'm done.
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?
Stefan: it's a combination of partial script execution, inferring types from the context and taking hints from doc comments. Does this help?
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.
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.
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!
Keith: even "j avascript:'<html></html>'"? (remove the space, I added it so the blog engine doesn't remove it)
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.
how do u take off the faceplate
Read this: http://www.xbox.com/en-US/support/systemsetup/xbox360/accessories/faceplates.htm
the screwdriver trick didn't work meanies
Well, I don't know what to tell you, it was pretty easy for me. Maybe you should contact support.
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...
Is there a way to implement background imagery with this method? Tried BackImage with no success. Ideas? Thanks!
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.
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...
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.
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.
The message works great except when I put <UpdatePanel> around it, then it does not work.
Do you know why?
Ta: yes, this is a known problem. It currently doesn't work inside UpdatePanel.
Thanks for this Bertrand, very useful article - problem sorted:-)
Are you still planning to do a post about Class events or can you point me at a good resource?
Peter: yes, absolutely. I'll try to get that done next week.
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.
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
Great article! This really helps.
What I used to do before reading this post is:
var self = this;
CallWebServiceMethod(function(results) { self.OnComplete(results); });
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!?
Muhammad: you'll have to ask Telerik...
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.
Hey it's really great!!
Is it possible to scan only a certain folder? Because right now it scans everything in my website ehhe
Mike: just put the handler in the folder you want to scan.
guitar hero 2 for xbox 360 OWNS
I am not able to use this code please help
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.
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!
wow this screw driver trick really works
i now have a new (chrome) face plate thx heaps
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.
Awesome, thanks Bertrand.
Thanks Bertrand. I have linked this to Sandcastle post at http://blogs.msdn.com/sandcastle/archive/2007/04/24/documenting-javascript-doc-comments.aspx
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.
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!
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/
You can also try this for really nice Aero Glass on your screenshots!
http://www.windowclippings.com/
Kenny has done a nice job
dm
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?
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.
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.
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.
Just break the damn keyboard on your desk like I do.
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
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.
Congratulations ! Even if I can't see the video on my Linux desktop...
See you soon in Paris ?
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
Frenchy Power!
I really like ASP.net Ajax. it really rocks, and is very easy to start with.
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?
mmh. Actually no, I can't get it to work either.
Did the orcas release fix it? Have the 'ajax bits' been released yet?
http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx
Yes.
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
The comments are the kicker, No one seems to care, or think its a big deal.
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.
Fact: 99% of people who would play God of War thought that looked like a cool party. Excellent PR.
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.
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
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.
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.
They should've used gringo soldiers killing Iraki children to keep up with the depraved barbaric environment.
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.
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.
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.
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....
Daniel, please file a bug on GotDotNet.
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.
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.
Man tough crowd <s>...
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.
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.
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?
Henry: that indicates a syntax error probably happened before. You probably made a mistake when you patched the release version of the file.
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?
How do u take current faceplates off....and put new ones on???????
Dom: please read through the previous comments, your answer is there.
Sebastian: I wasn't able to reproduce a problem with that code. Feel free to send me your repro.
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.
Todd
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.
When building Ajax applications, you basically deal with two kinds of events. First, there are DOM events
... for anything else than aiming and frantically moving up and down. In other words, slow movements
Ron: not sure what you mean. Can you be more specific?
On GotDotNet, but the project has been obsoleted now that ASP.NET Futures have a similar, but much more complete feature.
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..
Deepak: no need to shout. That indicates a syntax error. You probably made a mistake when you patched the file.
One of the things I'm going to try and start doing is to do a weekly post of useful links on .NET related
One of the things I'm going to try and start doing is a weekly blog post of useful/interesting links
In part 1 , I showed how to subscribe to events exposed by JavaScript classes built on Microsoft Ajax
Pingback from May 22nd Links: ASP.NET, Visual Studio, Silverlight, WPF and .NET « Gurusoft
Pingback from Links 22 de Mayo: ASP.NET, Visual Studio, Silverlight, WPF y .NET « Thinking in .NET
dcstarr: call support (1-800-4MY-XBOX) or go to www.xbox.com/.../support
As I mentioned in my post couple days ago that I am doing some web application performance evaluation
crosspost from http://blogs.msdn.com/rextang As I mentioned in my post couple days ago that I am doing
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.
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.
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.
Martin: I'll try to put something together and make a blog post with it. Thanks.
Marc: the fix is already in the Orcas Beta and will ship with all future versions.
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.
Oh, something I forgot.. My locale is ES-MX. Perhaps this is where I'm missing something??
Yendi: there doesn't seem to be a site there. Can you check the spelling of the url?
I can see it:
http://www.nortia.com.mx/
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...
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.
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.
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.
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.
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.
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.
Calios: thanks for the suggestion, that's a really good point.
Calios: thanks for the fix.
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...
I was super-excited to learn that Andrew Grant was able to run the Photo Handler unmodified on Windows
Thanks Mike! This rocks!
Pingback from Granville Barnett June 2007
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.
> 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.
Pingback from Links: ASP.NET, Visual Studio, Silverlight, WPF y .NET « Alexander Jim??nez
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.
It's a great thing.
I think MS should get out of the browser business, they murk it up too much
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?
Kearns: you should report it to Apple. Bugs can be filed at http://www.webkit.org.
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.
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!
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?
I agree. Its all about the iPhone and the windows developers.
No, offset values on what?
拷贝C:\ProgramFiles\MicrosoftASP.NET\ASP.NET2.0AJAXExtensions\v1.0.61025\目录下的MicrosoftAjaxLibrary...
Pingback from Mac Rumors Kicks Around the Yellow Box « Quod Ero Spero
Stefano: you should probably ask this question to the toolkit team.
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?
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!
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.
<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.
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.
Russ: can you look for the UpFolderStackHeight setting in the handler and check that it's not set to 1?
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.
UpFolderStackHeight = 3
Russ: then I have no idea, sorry. Never seen that happen.
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.
BTW - I'm using JQuery and Thickbox and my iFrame's called into the DOM work without a hitch. jquery.com/.../thickbox
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.
Russ
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?
Yes, hold on, I'm migrating to Codeplex. The new address will be: www.codeplex.com/PhotoHandler
Last night, I uploaded the source code and release package for version 2.0 of the photo handler . I'll
I just finished migrating my PhotoHandler workspace from GotDotNet to CodePlex. I have got to say that
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.
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.
Shane: urls with periods in the address? That's radical. Most of the web must be filtered out by this?
One of the features that web developers will really like with VS 2008 is its built-in support for JavaScript
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.
Pingback from Intellisense en JavaScript con VS 2008 « Thinking in .NET
VS 2008 JavaScript Intellisense
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
Anke: you should talk to your hoster. Apparently they disabled the build provider for ashx.
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
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.
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.
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?
Anke: I'm sorry, but no, I don't.
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)
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.
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?
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.
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.]
Ted: not in principle. How many pictures are we talking about? Did you try with the same settings but just a few images?
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?
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.
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
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.
ScriptDoc is a tool that extracts documentation from JavaScript files and packages it into XML files
Pingback from The format for JavaScript doc comments - Atlas and more
When I was talking at the Journées Académiques last week, someone in the audience asked me about documentation
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!
In April I blogged about Bertrand Leroy 's, cool document extraction tool (ScriprDoc 1.0) that will generate
Great works! Thank you Roy!
For background image try setting a custom attribute to reflect the css class for the menu item and set the background in a stylesheet.
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
Pingback from University Update-AJAX-ScriptDoc 1.0 available
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!
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?
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.
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.
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.
Caterwomtious: I agree, and I've passed this suggestion along to the right team for a future version (a while ago :) ).
Why don't you guys just provide us with the modified file?
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.
I just migrated my ObjectHierarchicalDataSource and CompositeHierarchicalDataSource projects from GotDotNet
Great works! It is very useful!
Hello Friends
i have added
<ajax:ScriptReference Name="MicrosoftAjax.js" ScriptMode="Auto" Path="~/Scripts/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js" />
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)
GAY
I've fallen behind on my weekly link-listing series - apologies for the delay. ASP.NET ASP.NET RSSToolkit
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.
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.
I found out about these ASP.NET controls by way of Bertrand LeRoy . "These data sources enable Menu and
I found out about these ASP.NET controls by way of Bertrand LeRoy . "These data sources enable Menu
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;
Dinesh: doesn't removeChild work?
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.
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.
This article about bad points in game design is kind of interesting... Source: weblogs.asp.net/.../seven-deadly-sins-of-game-design.aspx
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.
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
Check out this link for more...
www.dotnetuncle.com/.../71_page_life_cycle.aspx
In his recent post Bertrand Le Roy announced that he migrated his ObjectHierarchicalDataSource and CompositeHierarchicalDataSource...
Bas: did you make any changes to the style sheet? I just checked and it displays fine in Firefox, Opera, Safari and IE.
@ 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.
No sample up and running?
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
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...
I did the same thing that EB did from March 5, 2007 and it worked great.
AdmiralGanja: sorry, no.
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.
参考网址:support.microsoft.com/.../ho...
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..
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?
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!
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.
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.
Nathan: why not use regular SqlDataSources with the CompositeHierarchicalDataSource?
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).
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.
I shoed alert msg but after pressing button my aspx page get expired.how to solve this pblm
Kalpesh, what do you mean "expired"?
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">
where Scripts is the Virtual Path Folder of the project...
Now what else should i check...
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
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
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
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..
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.
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.
Deepak: did you check in Firebug that the script do actually get loaded?
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..
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.
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?
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.
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.
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
Great, works well!
Is it possible to put spaces between the icon and the text?
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.
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.
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 />
The following code worked but it's not the most practical.
<siteMapNode url="site.aspx" title="&nbsp;&nbsp;&nbsp;Site" ... />
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
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?
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?
the solution was very helpful n awesome .
It saved me .
thnx a lot
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?
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"/>
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) {
??????????????
Lance: you can't, sorry.
Pingback from callback asp.net 2.0 « Private: .NET + OO concept
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.
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.
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.
BTW: I am using Win XP Professional
Sona
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..!!!!!
Sona: not sure I'm following you, it seems to work fine on your site.
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">
In the lines below i have seen that the path appears twice. Is this normal?
Thanks.
Ziro: you probably included too much in the script path. Apparently in your case it should just be "scripts".
this so stupid because it did NOT HELP ME AT ALL! [deleted about a thousand exclamation marks]
LEARN HOW TO WRITE! [and here too]
How can I generate msgbox with three buttons Yes/No/Cancle when a user is updating his record.
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.
Suraj: the gridview example in the post is almost what you're looking for, except for the cammand name and the buttons, right?
This solution is mutch more simple!
forums.asp.net/.../1546323.aspx
:p
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.
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.
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?)
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
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?
Nicholas: no, IE doesn't use any of .NET or Windows Forms.
Luke: do you have a url where I could have a look at that?
John: you forgot to drop the meta data extractor dll into the applicaiton's bin folder.
Vladimiro: err, it is a simpler solution, but to a completely different problem so I'm not sure what you mean here...
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.
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?
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 « 10 astuces pour faire parler de,Beaucoup
Alberto, you're right. I've sent mail so that this gets fixed.
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!!!
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)
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?
Rafal: I confirm that the site map stuff is now in Futures.
quickstarts.asp.net/.../searchsitemaps.aspx
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.
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?
Just noticed that Martin Smith has asked the same question :)
My wiimote isn`t working and I put more than 1 pair of new batteries in. What`s wrong?
Has the link been fixed yet?
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.
Brandon: I have a feeling Nintendo's support would be much better qualified than I to answer this...
<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...
Kalyan: Err, not to be rude, but the only thing I can suggest is that you read the post...
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
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.
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..
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?
作者: Truly 日期:2007.8.5 首先我们要遵循JavaScript注释规范,详见 ScriptDoc 和 weblogs.asp.net/.../2007
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.
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..
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.
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.
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.
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?
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
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);
Jeff
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!
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
I figured it out. The ScriptReference path is relative, so once I removed the tilde, it worked. Thank you!
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.
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.
Jeff: I omitted it from the code in the blog post, not in the full source code.
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.
Man, your comments are really fast... It changes everytime I'm gonna refresh it..
"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.
Where can I get the ASP.NET Alerts control since the gotdotnet site has been phased out?
ok I found it and changed it to memory and all is well.
Thank you
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. :)
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.
John: I'm in the process of moving it to http://www.codeplex.com/alerts.
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.
Voici la réponse au Quizz JavaScript - gestionnaire d'evenements et boucles . Pour rappel la question
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.
Atanas: not for the moment but that's a good suggestion.
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
Voici les réponses au Quizz JavaScript : objet et abonnement d'événement Le problème était encore à cause
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.
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.
Awesome....exactly what I was looking for.
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.
dude its being painted
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.
Pingback from I’m CaLendarW Blog » Blog Archive » ASP.NET Event Validation
why photoshop and not expression design?
you know ? "eat your own dog foot".
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.
Joli modele :)
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 :)
A really cool photo plus your wife has done a great job carving that pumpkin! Great work!
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...
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 :-)
Nice design, very nice title ;-)
Great work but i think you have to add a link to the homepage behind the title of your blog.
Very nice :)
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 ...
How about posting some content? Those of us that just subscribe to your RSS feed could care less what you did in Photoshop.
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...
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.
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.
We are not evil Bertrand =). It is all fair in love, war and business. The carved pumpkin is awesome.
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?
George: there's probably a difference in config between the two. Are these the same versions of IIS, both fully updated?
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...
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.
Didn't realize you were on leave, my mistake. Looking forward to new content!
What about web.config? Can you try to reproduce the problem without the iframe?
Very intriguing. I like it. Congrats on a new family addition.
If you currently don't read Betrand Le Roy's blog then you need to start. I started reading it
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!
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.
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?
cool...i like it :)
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
Allan: I haven't had time to migrate the source code yet, but I will in the following days. Sorry about the delay.
George: At this point I would contact support. I'm sorry I don't have any better insight for the moment.
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?
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
Regardless of the new name, my feed reader will forever know you as "More Atlas stuff". :-)
I like it. Much better than mine.
"Tales from the Evil Empire".... What, you're working for Apple now? :)
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 ; ).
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.
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.
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.
Found the Alert source code still not migrated to codeplex,when can i expect it?
Vidya: it's in now. Thanks for your patience.
Pingback from » ASP.NET Alerts available with source code on CodePlex
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.
Steve
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!
Link Listing - August 26, 2007
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!
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!
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.
最近在使用Asp.NetAjax1.0的框架,遇到了在不同域名下抛出
select box is display over the div. How to overcom that
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
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.
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.
Bosker: please read the post before posting a comment. Not to be rude but that's exactly what it is about.
Thanks Bertrand!
We are truly honored that you and Scott wrote the foreword for us.
Pingback from » ASP.NET Ajax in action available
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!
Very good patching!
App now works smoothly
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.
Madtown: see above comments. Big doe had almost the same question.
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.
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.
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! =(
Why the quotes? I suppose it should work without them. The PermaLink property should just give you the right url iirc.
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.
You set the NavigateUrl of a hyperlink control to its value for example.
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>
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;
Anything is better than IE
I am completely new to DotNet..can anyone give me exact flow of asp.net page?
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
Thanks, It fixed the problem! Hope that MS would release some official patch as well, I assume there are plenty more to be fixed!
Shauheen: it's already patched in all recent versions of ASP.NET Atlas.
Sashidhar: that's exactly what the diagram is. For more details, please consult MSDN:
msdn2.microsoft.com/.../ms178472.aspx
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.
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
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.
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.
Thank you very much. The patch worked like a charm.
Yes. This being out of the way, let me explain why (just in case you haven't read one of the million
Pingback from Seven deadly sins of game design - Tales from the Evil Empire
Talked me into checking it out.
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
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!
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.
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.
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.
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.
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!
Pingback from OpenSource Connections » Blog Archive » Javascript Intellisense, Documentation, & Visual Studio 2008 (Orcas)
i used "BLOCKED SCRIPT'<html></html>" 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.
One new subscriber from Anothr Alerts
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?
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.
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.
Richard: I run it on Xbox.
Collin: the ads do look very much like the Fallout ones, yes.
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.
Dave: thanks for the kind comments. Good point about analytics, I should definitely do that. When I find time. :/
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 :(
Marcelo
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
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.
Morten: Yes, I agree. Thanks for the suggestion.
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..
What???
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".
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).
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.
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?
How do I know if I'm running AJAX Beta 1?
Peja: look in add/remove programs
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.
Αν θεωρείς κακό μπελά την ιστορία της έκτης, oh boy/girl, you 're so naive. Σε web developers απευθύνεται αλλά αφορά όποιον αναρωτιέται "Μα πόσο άχρηστοι είναι που δεν δουλεύει με όλους τους browser".
Pingback from 4 Links Today (2007-09-08)
I have an iPaq rz1715 and get the same message.
The guitar Harmonix chose for the Xbox 360 version of Guitar Hero II is not exactly my favorite guitar
There's already been several history tools developed for Adobe Flash which has historically had exactly the same problems as AJAX.
Thanks very much for your article. It was really helpful to fix the problem. Keep up the good work :)
Great post on managing across several browsers....
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.
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".
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...
Rick, I totally disagree with you. I need *a lot* more time...
I didn't mean to be condescending - thanks for the follow up response. It is an interesting topic.
Steve: I didn't think you were, don't worry.
Do you always give out awards without telling the recipients?
:-)
Glad you like it.
Works like a charm - thanks!!
Pingback from Ajax Girl » Blog Archive » How to build a cross-browser history management system
Pingback from Dylan Schiemann » Blog Archive » browser history: a pot meets kettle story
Pingback from Javascript News » Blog Archive » How to build a cross-browser history management system
Pingback from napyfab:blog» Blog Archive » links for 2007-09-14
Pingback from Deficiencias en algunos exploradores - Incubaweb 2.0 Bit??cora del Software, Web 2.0, Beta, Windows, Linux, Mac OS X, Open Source, ....
Pingback from 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
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!
Pingback from David Cumps » String Concatenation vs Memory Allocation
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
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!
Pingback from links for 2007-09-17 by The Third Part
When is support for v1.0.61025 of the extensions going to be available. Check out Codeplex and please respond to inquiries!!
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...
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.
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.
im getting sys.undefined only in firefox and not in ie can u help me out with this
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?
@Dave : The futur of the internet is not based on IE 5.5 -_-
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.
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.
Brett, you're right, I'm an idiot and I've updated the post.
Venk: you probably introduced a syntax error while patching the file. Please double-check.
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.
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.
"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.
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!
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!
The attribute has to be written *before* the tag.
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...
Shanmuganathan
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.
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
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.
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.
You should do this to a controller :)
Ah, Dave, you must be reading my mind...
Here's one more, when you know the variable
exists, but the value is undefined.
if (undefined != var)
[Tips][記事リンク](ASP.NET)ブラウザの履歴管理
[Tips][記事リンク](ASP.NET)ブラウザ種類別の履歴管理表
How to create aspx pages Dynamically?
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.
Ernie
PKINTAL: this is off-topic. Please send me mail through the contact form of this blog and I'll give you an answer offline.
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.
Pingback from Techy News Blog » OpenAjax InteropFest 1.0: Microsoft's entry
Pingback from Microsoft News Aggregator » OpenAjax InteropFest 1.0: Microsoft's entry
Pingback from OpenAjax InteropFest 1.0: Microsoft's entry : Celebrity News Corner
Recently Bertrand posted OpenAjax InteropFest 1.0: Microsoft's entry . The OpenAjax's InteropFest 's
Pingback from MSDN Blog Postings » Microsoft Passes the OpenAjax InteropFest Test
Recently Bertrand posted OpenAjax InteropFest 1.0: Microsoft's entry . The OpenAjax's InteropFest
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.
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.
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.
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.
Kirti
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. ;)
Pingback from Missing Features » Solving the Top AJAX Usability Problem: The Back Button
This question comes up from time to time , to time . If you understand how redirects work, then you also
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)
Thanks. This solution helped me a lot.
Pingback from Techy News Blog » Getting AJAX defined…
Pingback from MSDN Blog Postings » Getting AJAX defined...
Pingback from voip » Getting AJAX defined...
Pingback from Fine Art » The format for JavaScript doc comments - Tales from the Evil Empire
Are you referring to parameter currying? similar to passing in a hash (more or less)?
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).
Christian: not quite currying, but passing a hash, yes.
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.
Via Christopher Steen : Microsoft Passes the OpenAjax InteropFest Test Recently Bertrand posted OpenAjax
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 :)
Dev Girl: please contact me through the contact form of this blog, and I'll have a look.
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?
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.
Actually I just figured it out. Thanks for the quick response. It looks great!!
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
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.
Are all 70 photos .jpg files?
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.
Phil: yes, the handler only takes jpg files.
Pingback from The ServerSide Interoperability Blog » Sample of Ajax interop
Thanks, I converted all to Jpeg and they all show up now
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.
<g>, thanks Josh! Maybe because you go writing comments you should figure out how to read a post.
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.
Morten: you can get Intellisense on those files by including an explicit script reference to the page.
Коллеги Брэд и Бертранд написали о возможности использования Microsoft Ajax для работы с сообщениями OpenAjax.
Коллеги Брэд и Бертранд написали о возможности использования Microsoft Ajax для работы с сообщениями
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..
Thank for this, scanpst did the job for my OST this morning
wow, that is big news!
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.
I need .NET framework sample code
Thank you - you just saved my day :-)
Worked great!
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
?!?
A little more explaintion of the fix for black background on thumbnails please tried
but did not change anything
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.
M Anderson: thanks, but this is a known issue (and the project moved to Codeplex long ago):
www.codeplex.com/.../View.aspx
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
So what is the best way to reject scripts in input? anyone please...
Well, I prefer to have all the information in a single place. Thanks for the comment.
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.
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)
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.
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
Should I stay or should I go … with Visual Studio 2005 or 2008 is the question in this particular case
Is the bin directory directly below the IIS application folder?
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.
Congrat!
Keep up the good work.
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
man, you really do not belive yourself, pls stop wasting your time...
Almost a year ago Microsoft joins the OpenAjax Alliance , then a month ago, Microsoft Passes the OpenAjax
can anyone tell me whr i can find abt noise generated from tidal plants...any link or smthing...
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.
Pingback from MSDN Blog Postings » Microsoft Joins the OpenAjax steering committee
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";
default:
adminLogin.DestinationPageUrl = "~/admin/Default.aspx";
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:
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):
Response.Redirect("Login.aspx?p=a", false);
lblErrMsg.Text = "";
//...
protected void btnAdmin_Click(object sender, EventArgs e) {
Response.Redirect("Default.aspx", false);
It works but I get a strange javascript error: Unspecified error.
Can anyone help me? Thank you!
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?
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.
Gabe: the problem is that you can't get rid of it, so you might as well make it do something useful.
En JavaScript, il y a 2 grandes façons de faire une classe : le mode prototype et le mode closure . Méthode
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.
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.
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.
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 :-)
Errr, Morten, which version of IE are you using? I'm getting the error message in a dialog and it doesn't crash.
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.
John
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.
Erjan
Roy,
Good catch point learnt today.Thanks for sharing.
Prashant
prashantjalasutram.blogspot.com
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.
Alexandru: what's wrong with the code layout? I viewed the post under IE7, Firefox, Opera and Safari w/o a problem.
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!
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
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
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.
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????
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 :(
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.
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?
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.
Pingback from Nathanael Boehm - UI/UX designer & developer, Canberra
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.
Thanks a lot man, this solution worked fine on my website.
that is quite obtrusive! try the jquery way
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.
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!
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
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.
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
I'm pretty sure Safari should work. Can you contact me through the contact form and send me a simple repro?
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?
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
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).
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).
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.
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!
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.
It should be no surprise that JScript Documentation Comments power much of what you see in JScript IntelliSense
摘要
本期共有8篇文章: Refactor!forASP.NETBeta发布
如何解决ASP.NETAjax1.0中跨域名frame访问时出现的accessdenied问题...
yep its very good
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.
> "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
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.
It was awesome, but it ended way to quickly. I wish there were more levels.
Don't we all?
Has anyone got a good example of the Futures implementation?
Documentation is a little scarce to say the least!
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
Darksaint
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."
Darksaint: please verify that the IIS application is configured to use 2.0.
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.
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???
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.
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.
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.
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?
Rob: I was just kidding. Sorry, I have no clue why Applets would behave any differently.
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.
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.
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*
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?
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 :)
Here is a simple solution that supports multiple signatures differentiated by types, and it has a low overhead as well..
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
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.
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.
Pingback from napyfab:blog» Blog Archive » links for 2007-11-17
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?
I was reading this post by Bertrand Le Roy . And in many respects I agree with Bertrand and also with
Crile: yes, the fix is in 3.5 already.
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?
Chetana
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.
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
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.
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???
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?
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!
weird error..
<!-- Web.Config Configuration File -->
<configuration>
<system.web>
<customErrors mode="Off"/>
</system.web>
</configuration>
<customErrors mode="RemoteOnly" defaultRedirect="mycustompage.htm"/>
Any Ideas ?
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?
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.
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....
The following items are covered XSLT JavaScript SQL CSS/XHTML Managed code (?) Tools & resources
Dude you just don't know how to code in a dynamic language if you think == is an error. pfft.
Cab: what's the error?
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.
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....
Matt, you probably didn't set the HandlerUrl and/or Path properties on the control (see above comments).
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
Matt: I'm suspecting that you have a .jpg file in that directory that is not a valid jpeg.
You try set backgroud-color, because this property is not set the controls under div can be accessed.
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.
Julien: the GH controllers work fine in Rock Band, but the Rock Band guitar does not work in Guitar Hero.
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.
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.
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.
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.
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.
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.
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.
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.
I spent 10 seconds on Google and found this article. Thanks for the heads up.
Hello all,
I've tried it and it works ! Thanks a lot
Thanks, Matt.
这周末不休息,差点忘了这件事……本期共有7篇文章: JavaScript文档注释的格式
VisualStudioOrcas中对JavaScript智能感知的支持
在ASP....
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 !
Nicholas: this may be caused by client-side caching. Did you check if the server gets hit at all by attaching a debugger?
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"){
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;
yPos += tempEl.offsetTop;
return yPos;
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.
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.
Nice article. Definately clears some things. I'll use High(or photoshop) for my thumbnails.
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
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
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)
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).
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?
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.
"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.
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.
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.
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.
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.
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.
Ok, ok, it took us a little longer than we expected, but we finally got the ASP.NET 3.5 Extension Preview
Pingback from MSDN Blog Postings » The Wait is Over: ASP.NET 3.5 Extensions Preview Posted
La ASP.NET 3.5 Extensions Preview est disponible sur le site asp.net. Téléchargez-la vite. Consultez
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.
Lionel, that is very good info. Thanks a lot.
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 ?
Roi: that is actually a fairly typical scenario that works well with async. Just disable the relevant pieces of UI during the callback.
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.
Rick: thanks for the info! Cheers!
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! :)
Your my hero, thanks for writing this.
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
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. ;)
WebSite.WebCameraInfo.prototype = {
ZoomLevel: 11,
....
Hi guys. Does any have any ideas how to comment prototype getter like this?
Jim: that's not technically a getter, but you can document it from the constructor using a field tag.
Ah, but they'd want it PREINSTALLED! Make Opera the DEFAULT Browser, non?
Good one...
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 :) )
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.
All the stuff provided by you, specially the links, are very helpful and interesting. They really helped me a lot.
Keep it up...
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.
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?
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.
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)
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.
Link Listing - January 4, 2008
the video is very small.
how can i enlarge it with good resolution?
Zahi: there is a link right under the embedded video that leads to the same video in a larger size.
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.
First the disclaimers/warnings. The following uses preview technology. It requires VS2008 and the ASP
who takes these tests? they r lame i already kno that i am sooo not a nerd...
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.
Thanks for the report. Please file a bug on CodePlex.
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!!
errr... slight modification to work with top-level menu items:
if (hideOnMenu != null && bool.Parse(hideOnMenu))
if (parent != null) parent.ChildItems.Remove(e.Item);
else (sender as Menu).Items.Remove(e.Item);
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?
Pedro: there are config entries in the handler as wel as forum posts and bugs on the CodePlex site that should get you started.
do u have any working example of a form using div layer and overlapping a select box.
ok, I think I've gone a little askew somewhere along the lines here. First I installed ASP.Net ajax
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
Yes, Julien, you're absolutely right.
Congratulations!
It works very well at first attempt.
Thanks a lot!
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.
Pingback from rascunho » Blog Archive » links for 2008-01-17
译给自己看
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)
Guido: right, there is the assumption here that the variable was declared.
>> 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).
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.
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.
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.
Thanks joe, that explains it.
Alex, do you have a specific example of such an inconsistency?
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.
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.
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. :-)
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
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???
How about a plastic Bathtub
Nice one!
It's fascinating to observe the childrens view of the world.
AH AH Excellent :-)
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?
Pingback from rascunho » Blog Archive » links for 2008-01-21
Pingback from Wöchentliche Rundablage: .NET 3.5, WPF, LINQ, Tests, System.AddIn, SubSonic, Sandcastle | Code-Inside Blog
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
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 :)
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.
Mike: why don't you put the handler in the images folder?
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 ;)
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. ;-)
Welcome to Dot net slackers :D
Welcome to the Club of Slackers.
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.
Welcome from me too ;) Great to have you on the boat!
That is great
Enjoy your daughters childhood, it goes way to fast.
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?!!
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.
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" />');
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:
iframeShim.style.visibility = 'hidden';
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...
摘要好久没写了,不为自己找借口,不管怎样,还是要继续捡起来。本期共有9篇文章:C#中的不可变类型使用System.Drawing生成缩略图时应采用什么样的InterpolationMode...
Zend doesn't even publish the price for the platform, just a blank "contact sales" link. Lame!
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.
Bertrand Le Roy had a post over the weekend (actually Friday, but I missed it) about the new IE8 meta
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".
Is the Field tag still part of JS intellisense? I can't find any documentation on it anywhere.
It should be.
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.
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.
Pingback from 4 ASP.NET AJAX JavaScript UI methods you should learn | Encosia
Working Around cross domain frame issue (ASP.NET Ajax 1.0)
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!
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
awesome guitar
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.
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.
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.
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!
Marcos: www.codeplex.com/.../View.aspx
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).
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.
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?
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.
Pingback from Brennan’s Blog » Blog Archive » Intellisense for jQuery in Visual Studio 2008
I'm with you up to the screenshot. But are you at liberty to disclose how you do the analysis of the image?
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...
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.
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?
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.
Ah, the Web browser version of DLL Hell. Sometimes I wonder if we will ever learn.
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.
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.
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...
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!
Where are you getting that message? Is it possible that someone disabled JavaScript on your browser?
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.
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.
Pingback from A JavaScript Stack Trace in ASP.NET AJAX « See Joel Program
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?
Something self-written. We wrote a .NET console app that grabs the screenshot and finds rectangles of a given color.
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)};
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 */ }
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.
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.
Robert
Good for you, Parag, but the name's Bertrand, not Roy.
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 ;-) ...
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)
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;">
Pingback from Wöchentliche Rundablage: ASP.NET, ASP.NET 3.5, ASP.NET MVC, Geocoding, WPF, WF, CardSpace, IIS7, LINQ, XNA… | Code-Inside Blog
Aptana has a cool Eclipse-based IDE for writing AJAX-y websites. It's got built-in support, via plugins,
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.
does the "enable history" on script manager exist in asp.net 2.0??
No.
This is the first time i have seen Eric's blog. Good site.
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
same with my comodore64 i am sooooooo upset i cry
Pingback from JS IntelliSense with Namespaces in VS 2008 at Coderoni.com
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.
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.
hello
i am like hack login admin panel in asp.net web applection !
Pingback from Tonya’s Teaching Blog » Blog Archive » Caps Lock?
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"
OK, so what don't you like about the Wii Play?
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.
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.
Pingback from Brennan’s Blog » Blog Archive » JavaScript Browser for Visual Studio 2008
"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.
I just added weblogs.asp.net/the&dark&and&mysterious&side&of&bleroy -- wow!
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.
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
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!
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.
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!
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?
That's known. I don't know of a workaround.
I was hoping that was not the case. :(
Thanks for the quick response.
[Warning: definitely not a technical post] Those 3 guys that normally read my blog (yes, I believe that
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.
Jeff, please contact me through the contact form, and I'll look into it.
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!
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.
Siempre oí hablar del infierno de las DLL pero cuando hablamos de desarrollos web no nos podemos olvidar
Iframe + AjaxControlToolkit v1 + IE = Access Denied Cross Domain Siempre oí hablar del infierno de las
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'>
@Brock: I don't think that's handled in 2008, no.
I'm also getting the same error as Ev.
Any progress on that one? This is the only Google result for that error message.
I want to change background color of thumbnail. I changed the following code:
However, the color remains blank.
Please help. Thanks.
@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!
Pablo, your fix works like a champ!
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.
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
ASP.NET AJAX Documentation Update, Videos and Cool Articles
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.
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.
Cathy: that's this issue:
The bug is not fixed in the current release but the discussion on it contains a fix.
what about:
if (!someObject)
is this true when someObject is null OR undefined, or just null?
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
@cis: sure, !someObject will be true for undefined and null.
I am really happy with how Json.NET 2.0 and LINQ to JSON is turning out. This release offers big improvements
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?
Lou
@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.
I've said some time ago that I personally would have preferred if IE8 was in standard mode by default
Passing a JSON object to a WCF service with jQuery
i tnink who all said these are all goat....its nothing seems me to be funny
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
@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
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.
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
@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).
@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.
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
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.
@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.
The page that the updates links to points you to another download for a completely different feature, not for sitemaps.
Wow, thanks a lot it really works!
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
@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.
Something called "degradable" AJAX?
@Andrei: yes. There are many ways you can achieve that, but UpdatePanel is an easy one.
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)???
@JA: UpdatePanel (as should be clear from the first sentence in the post ;)
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.
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.
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.
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.
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?
Bertrand Le Roy has an interesting post called " a case for partial rendering ." I started to comment
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.
@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.
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..
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();
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.
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...
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 )
@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...
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.
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.
@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.
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.
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?
sridhar.
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 :)
Stefan
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.
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.
Pingback from Construct Web » IE, the Hell That Thou Hast Wrought
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();
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).
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 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!
@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.
@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.
Given this simple Employee class: public class Employee { public int ID...
Given this simple Employee class: public class Employee { public int ID { get ; set ; } public string
Could it be that this doesn't work in IE8 beta? Thanks!
@rudgr: can you be a little more specific? What problem are you experiencing?
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
@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.
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
@Michael: I have no idea. You should check that with your hoster. Let me know what you find.
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
@Michael: are the broken images consistently the same images? Are they jpeg images? Is there a public url where I could have a look?
Has this been fixed with 3.5?
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.
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
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.
@Naor: err, sure, as does the ASP.NET menu, the popup control in the Ajax Control Toolkit and many, many other similar components.
@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.
@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.
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
So after using IE8 for a while now, there are a few things that are useful for people to keep in mind. 
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
I was alo facing the same issue with Redirection but Bertrand Le Roy's article solved it. Works fine now.
Thanks, very helpfull.
@Raghavendra: you should contact support.
It's Time for a Change -- We need Immutable Types
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.
This is awesome!
Seems pretty neat to me, I mean I always thought php was born to be with apache, I guess thats gonna change very soon
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."
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.
@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?
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.
@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".
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
Check that you configured the directory where the handler is as a web application.
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
@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.
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
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.
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
Excellent article and the update section helped here with regard to maximum number of worker processes with a value above 1
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)
Venkatesan J
Prince of Pammal
Is possible to change the backcolor to a thumb image?
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.
@Kid: www.codeplex.com/.../View.aspx
Where can i download this song?!
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
I'll try to insert the propose fix but doesn't resolve the problem!
create comments by php
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!
Hi egainey,
Can you give us more information ? :)
You can mail me at : fabien.molinet[you know what]gmail.com
I'll help you.
beware that if your PST file is over 2GB, this may not work.
So I tend to describe a lot of issues here, but we had some really great conversation in our blog chat. 
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.
Thanks This was very useful to me
CHECK YOUR RECIEVER IS IN FRONT OF THE TV!
YOU KNOW? THE LONG BLACK RECTANGLE THING THAT RECIVES THE WII REMOTE SIGNALS?
YEAH THAT.
Nice. I learned a great thing today.
Thanx
@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.
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?
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.
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.
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
How common is it for script code to do different things based on the type of the exception anyway?
@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?
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.
@Suman: what's your point? Are you saying that it's not useful to handle exceptions??
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.
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
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?
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.
@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.
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
@Wil: check that the server has ASP.NET 2.0 or higher installed, then check the web.config file.
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.
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.
i have tried that i even put new batteries in and nothing seems to work but my brothers mote still works
I think we are findign the browsers a big hurdle for our ajax developments. we will check it out. Thanks!
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.
Earlier today we shipped a public beta of our upcoming .NET 3.5 SP1 and VS 2008 SP1 releases.  These
Pingback from NZEYIMANA Emery Fabrice » Invalid JSON from NET - DateTime
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?
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.
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?
Deepak V
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.
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...
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.....
Excellent Article,
Note:The Path should be relative
I have the following errors in release mode :
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 ?
I'm facing the exact same problem as Hiruma...
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")
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.
@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.
@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.
@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.
@Hiruma: Thomas had incorrectly patched his file if I remember correctly. Please double-check.
@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.
@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.
@Jeff: difficult to say without looking at the server. Drop me a mail through the contact form and I'll have a look.
@linukalex: difficult to say without seeing the code. Feel free to drop me e-mail through the contact form.
From the hint to Lindsey on calculating the angle of the wake: Why is the wave_speed/duck_speed = 1/3? Thanks.
Den senaste tiden har en mängd sajter blivit infekterade av en SQL Injection-attack som använder SQL
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 ...
Give me the url of your page and I'll take a look.
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.
If I replace my ScriptPath by the ScriptReference it works !
so the files downloaded are corrupted ?
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"?
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!
与当今构建的绝大多数Web应用程序所采用的开发模式相比,AJAX对Web解决方案架构师而言意味着一种模式转变。它立足于一些新的原则和规则来解释基于Web的系统的行为,并要求采用一些新的算...
Having talked about the pain of capturing image snapshots , someone mentioned Cropper and its plug-in
It works like a charm...Dude your a genious. Thanks alot.
The motion detection is fine, it's the games that can't use it properly.
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.
ASP.NET Ajax 3.5 SP1 contains a new feature that enables the application developer to combine scripts
Awesome control...
your all stupid
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?
@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).
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?
@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.
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.
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:
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
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?
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.
@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.
@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.
@Brian: I don't know much about how this works in classic ASP. You should probably contact support on this one.
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);
@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].
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.
@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.
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.
Expensive indeed. There are quite a few free ones out there.
It would be a great help if you can comment on my issues.
Ashish
Hello Bertrand !
Any idea of a CTP release date ??? ;)
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!!
i checked it once again and MetaDataExtractr.dl is in this directory;/
@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.
@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.
@Bartek: is the bin directory in a directory that is configured in IIS as a web application?
I assured that I put MetaDataExtractr.dll into the appropriate directory.;/
@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.
yeah - this is a crap post - what about the free ones?
@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.
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.
Kevin
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.
Very nice article: it is more and more requested to work with image re-sizing.
Thanks and regards,
Davide
hi i am trainee programmer in comm-it india(p) Ltd at new Delhi-110017.your articles is very helpfullto me about postback event.
nice article.
You could also generate thumbnails using the GD-Sharp .NET wrapper for the GD Library.
@skhan : Tell me more about the free ones. I am interested in at least one.
@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).
my wiimote isnt working even though i adjust the "sensor" and the hand wont even show . the games are working fine though!
There's a great jquery plugin that automates this.
plugins.jquery.com/.../bgiframe
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?
@Dan: I updated the link. Thanks for the heads up.
excellent utility
Has anyone been able to get this into a DNN Module? Can I use this in DNN?
@Ty: I never tried, but if you use it as a user control, I don't see why not.
Ha, the SEO rapper, very funny.
After setting session varibales, I am redirecting page. Its working on local host but its not working on server.
sweet!!
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
@Stif: if you've tried all the workarounds in the post and it still doesn't work, I would advise that you contact support.
Show some realtime Example of This Roadmap implementation. so, that it can be easy to analyse how it is
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">
<asp:ScriptReference Name="MicrosoftAjax.js"S criptMode="Auto" Path="../JavaScript/System.Web.Extensions/1.0.61025.0/MicrosoftAjax.js"/>
</asp:ScriptManager>
@Oleg: check the path in the renedered HTML against the real location of the script and adjust your Path attribute accordingly.
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.
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!
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.
@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).
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?
@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.
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 ?
@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?
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
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.
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?
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?
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.
@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).
@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.
@Ray: please contact me offline (bleroy at microsoft).
@Rick: Jeff tells me this is fixed in SP1. Couldn't get it to work on SP1 Beta 1 though. Still investigating.
forget about the pcs and macs just see iphone. microsoft sucks at everything...
@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. :)
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.
@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.
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,
@Peter: feel free to contact me at bleroy at microsoft to tell me what needs to be cleaned.
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).
@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.
Not exactly the same league, but it's free:
teethgrinder.co.uk/open-flash-chart
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?
@Richard: Yes :)
Thanks Bertrand, I forgot that the fix was only for IE.
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
@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.
@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.
@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?
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.
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!
Max - thank you for your comment! works great :)
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!
but since a Menu control doesn't understand the imageURL property, how do you get it to display the image?
@Omego2K: err, the menu item does: msdn.microsoft.com/.../system.web.ui.webcontrols.menuitem.imageurl.aspx
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....
@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.
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
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.
Good point Richard.
how can i get microsoft.samples.Alert?
Is there any way to display the folders in date order and not alphabetically
@arunpulikkan: follow one of the two links in the post to the CodePlex project. http://www.codeplex.com/alerts
@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.
Any plans of sample website?
Eventually, yes, but we wanted to get the bits into your hands as early as possible.
Microsoft ASP.NET Ajax is Spam.
jQuery is Good.
Can't wait to start playing with this!!
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!
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!
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.
Will it be compatible with ASP.NET MVC?
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.
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.
@NirvanaViper - Apparently you have no clue what spam is. For a good example, see your last comment...LMAO.
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?
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
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.
@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?
@Andrey: There's a typo in the ReadMe.txt file. The actual class name is Sys.Preview.UI.DataView.
@Bertrand Le Roy: yes, I add ScriptManager on the page and add reference to script:
<asp:ScriptManager ID="scriptManager" runat="server">
<asp:ScriptReference Path="MicrosoftAjaxTemplates.debug.js" NotifyScriptLoaded="true" />
@Jason: good catch, thanks. I'm updating the readme.
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.
Sys.ApplicationLoadEventArgs.cast = function(obj)
{///<returns type="Sys.ApplicationLoadEventArgs"/>
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.
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.
@Jason: Thanks! The error is not occurs again.
But I get only {{name}} and {{description}} titles on the page, not data from someArray.
@Andrey: you can send me your code at bleroy at microsoft, and I'll have a look.
@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.
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.
@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.
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>
else
<span>Nothing :(</span>
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. :)
Drew
great idea!
wow..i think it's a great way.more simple and less code:-)
@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.
thanks, just what I was looking for.
Great tip! Simple and effective.
Yeah. Thanx, really cool.
Wow.
Very good idea we can implement that in othere areas also like gridview e.t.c
#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.
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,
@Attila: right, thanks, I fixed the post.
@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.
I wrote a post about how to do Master-Datails view with the DataView. I thought I'd put in a manual trackback.
-Phani
thanks for the javascript opera tick trick :)
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.
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...
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.
@Steve: yes on both accounts.
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...
@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.
cool! reminds me of those techniques from the classic asp style. =)
Mine problem is all on godaddy when the default.aspx hit this line of code it stops
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.
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.
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...)
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 !!
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.
@rblaettler: you should probably ask that question on the Live forums: forums.microsoft.com/.../default.aspx
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.
That's if you use regions...
Duh...
@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...)
I never heard of it.
But looks like its ALT-I and not CTRL-I for my configuration (vb key mapping).
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??
@Alex: The scenario you describe can be achieved by maintaining a simple queue of tasks.
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.
@Alex: what are you seeing when you try it? How does it fail? Are you getting an error message?
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;
FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, true);
reader.Close();
Default.MessageBox(this, "Your username have not been registered", "key1");
//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);
cmd.ExecuteScalar();
catch
{ }
finally
kon.Close();
Session.Remove("CALLEDFROM_SB");
Session["CALLEDFROM_SB"] = null;
Response.Redirect("Shopping_Bag.aspx", false);
Response.Redirect("Welcome.aspx", false);
catch (Exception ex)
Default.MessageBox(this, ex.Message + " : Failed to get data", "key1");
kon.Dispose();
The code look great!
Thanks, this little insight helped me solve a tough problem in ASP.NET when I was using a TypeConverter.
Brian
"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 }}" />
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!!
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.
I can try again and let you know shortly. Thanks for your help.
Microsoft ajax is spam!!!
jQuery is best!!!!!!!!
@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.
@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.
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.
@Alex: send me your repro at bleroy at microsoft and I'll have a look.
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!
I sent a zipped VB.NET sample project. Thanks a ton!
@gt1329a: yes, we are working on server integration of those features. Thanks for the feedback, this is very helpful.
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
@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.
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.
{ FormsAuthentication.RedirectFromLoginPage(txtEmail.Text, true);
}else
@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.
Good idea indeed!
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
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.
@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.
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?
@Bertrand: Awesome! Very very handy now that I understand how to use it. Thanks.
@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.
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.
@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.
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.
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
Or just install ColdFusion 8 FFS! Dropkick!
Hmmm... this page (dotnetslackers.com/.../Default.aspx) doesn't seem to load...
Thank you very much
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.
How about:
{ if some-expression }
{ /if }
or
{{ if some-expression }}
{{ /if }}
Thanks for the info. This is going right into my toolbox!
Great! Thanks for the mention. I am proud to say, I am part of the devilish team.
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.
@jgd12345: text nodes like those are not allowed anywhere in XHTML so that doesn't work.
yesterday when i go to open my mails from microsoft outlook express it giving error *.pst file is not personal pst file.
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 :)
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.
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 :)
@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.
Actually the above solution is working for Firefox not in IE.Please advice us.
@Cathrine: it was never broken on Firefox. Chances are you improperly patched the files.
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.
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.
FUCK NUMLOCK! Thank you for this post.
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 :)
This is going to be a nice feature. When can we see this ship?
@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.
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?
Dave OS
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...
^_^
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
Um yeah, i use the final version of safari, and i love it. its great.
@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.
@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."
Thanks. I've tried but to no avail. My skill set dos'nt include C# :(. Any idea where i can start?
@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;
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.
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?
It is interesting.
@JeffEsp: Are you using ListView or another data control?
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)...
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?
Robin
@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.
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...
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?
@Jimmy: sorry, I know nothing about XPIDL.
@Raj: Do you mean the browser's status bar? Is the browser version the same in both cases?
Thanks for your quick response..
Yes, Roy its the browser's status bar. The browser version is also same in both the cases.
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.
Can we download Visual Studio Express completely wihout paying.
@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...
@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?
@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
Very cool. Is this the feature described in Omars book?
I don't know. I haven't read this one.
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.
@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.
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
@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.
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.
Shail
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.
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.
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.
@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.
Hi, Could we have a static "parse" method added to all classes, in order for clients to be able to cast to type?
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?
you should try overlord. that's evil in a funny way.
Most of my projects are running using vs2005, so i really wish that it still can provide update on this version too.
@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.
@Raj: you could try to use www.asp.net/.../ConfirmButton.aspx instead.
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.
Hi, i am not supposed to use AJAX, any other way to solve this problem other than using ajax?
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?
@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?
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.
@mike: maybe do a global search on your whole hard drive for *.pst files?
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.
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?
@VR2: we're looking at ways to enable type hint comments in the next version of Visual Studio.
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!
@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).
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.
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.
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?
Oh dear God, thank you! :D
@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.
@Ryan: you're welcome, but please, you may call me Bertrand.
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!
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.
@Daniel: they want the template as a string, we want it as a DOM fragment. This leads to very different constraints and ideal solutions.
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 :-).
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.
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.
Khurram.
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.
@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.
@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.
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.
@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}.
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?
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.
@Bertrand: That being said then, what exactly is the difference between using this new composite script combining versus the toolkitscriptmanager?
@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.
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.
@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.
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?
@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.
Make it a string and use your own converter (or parser).
@iron9light: that's assuming you know what is supposed to be dates in the data structure. That is sometimes true but not always.
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...
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.
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.
The *best* place to get facts is fox news................................. LOL! i'm sorry, i couldn't help myself with that joke.
factcheck.org rocks.