Ramblings about C#, .NET and Programming
PingBack from http://msmvps.com/blogs/luisabreu/archive/2006/07/26/105828.aspx
In the previous posts, I’ve spoken about classes and namespaces. Today I’m writing about interfaces....
Nilsson not Wilson
oopss...thanks.
boys in swim suitwhen does puberty start in boys*** fox s golden boysboys dont cry curecute handsome boys
Here are the URLs for two nice Atlas articles about the UpdatePanel: Luis Abreu will show you how to
This is cool content, thanks!
Thanks for the kind words :)
Dear Mr.Luis
My name is Ramzy N.Ebeid
first of all sorry for interruption.
i am using ASP.NET 2.0 C#
i have a question related to the part of Atlas:AutoCompleteExtender.
i want to pass more that 2 parm., i am also asking if there is a way to make this issue manully, if yes then can you tell me how to do it.
i saw in your posts that you said
"the scriptmanager controls get's the js file that is embedded in the atlas.dll. when you install atlas, you'll also get the js files on the installation dir. if you weren't using the scriptmanager control, you could get it working by adding the atlas.js file to your web app and then you could change it so that it would let ou pass more that 2 parameters..."
1 - so please can you tell me which file exactly is responsible for this part.
2 - this list that opens in the AutoCompleteExtender can you please tell me also from where it run in that fille too.
i am thinking and i want to know how the filling of this list is done, so that i can make it manully.
i am sorry again, but i am really stuck in this part.
thank you.
Ramzy N. Ebeid
Team Leader – Development Division
USBC
Telephone:(720)212-0810
email:zonzone@hotmail.com
Most guys that have been using ATLAS till now haven’t had the time (or patience) for understanding
Hi
Great post, thx for help.
I think you should change CSS code from
<style type="text/css">
#test div
{
text-decoration: underline;
}
</style>
to
#<%=test.ClientID %> div
because if you add runat server attribute to the div element ASP.NET will rename it using containers name also.
It was work working ok for IE 6, SP2.
Luis Abreu posted an interesting article about the xml-script, that is the base of the declarative programming
The xmlns:tagprefix="some string that nobody really cares what it is as long as it's unique" declares to the xml parser that you intend to use tagprefix inside of this tag. So if you change it, you must also update all tags inside of that so that it uses your new prefix. "script" happens to be the default prefix for the Atlas classes, so you can not specify it or specify it, it doesn't matter. We still declare the namespace in case someone wants to use the namespaced tags and still have valid XML.
Now the tag prefix can't be arbitrarily changed in the CTPs because it's also being declared by the components themselves when they register their tag.
This is the thing that kinda sucks and that we're changing.
In Atlas 1.0, the page developer is responsible for mapping the tag prefixes to namespaces, like this:
xmlns:tagPrefix="My.NameSpace"
Once you've done that, we're going to use that information to parse the tags. For example, <tagPrefix:somecontrol/> will instantiate My.NameSpace.SomeControl.
glad to know that it's going to be fixed in the release. btw, i've never heard of default prefix in xml...i've heard about default namespaces which is what you get when you simply use the xmlns="...". regarding the current behavior, it's really wrong since what's important is the uri, not the prefix. I can't really understand why the behavior you describe as being used in the final release isn't available in current and previous versions of the CTPs.
btw, and judging by your words and by what other members of the team have said in the atlas forums, it really looks like there are a lot of changes prepared for v1.0. should you guys start sharing with us?
I mean, there are already lots of guys that are using atlas in their apps and if you ask me, seeing that v1.0 is completly different from
what we've been working for months now isn't really what you expect, is it???
thanks.
Congrats!
Your posts on MS AJAX are fantastic.
I'm not sure about your first paragraph, it feels a little like being asked why our pre-beta CTPs aren't perfect ;)
Yes, there's going to be a lot of changes in 1.0, the design of which we've started getting feedback on through ASP Insiders and dev labs a while ago, and we're preparing a new CTP, but it's just not ready yet. I think we've been pretty clear from the start that even though there's a go-live license that enables you to publicly experiment with the technology, the CTPs are pre-beta and are subject to change. Actually, that's the point of CTPs: getting feedback as soon as possible so that we can make changes based on that feedback.
Hope that helps.
hello again.
well, you're right about ctp: they aren't prefect...btw, i was not asking why the ctp had bugs. i was just curious on why you guys decided to use xml validation based on the prefix name when everyone else does it according to the standard (ie, based in uri). if everyone follows a specific rule, why re-invent the wheel?
at least this has been corrected for v1.0 :)
It's been a long time since the last time i've posted here...However, i'll try to compensate the days
Luis: you might want to retry the download. The Array problem you mention has been fixed and the build that's online now has the right bits.
Hello Bertrand. yes, garbin has tol me about that and it seems like it's working now (though I've still got several things to test :) )
In my previous post , I've presented an alternative to using the old page instance methods that existed
Luis,
Nice post.
One thing I'll add in favor of the instance based page methods is that with the .NET control hierarchy and the way that clientIds end up being concatenations of parent Ids and so forth, it can be difficult and a bit unruly to know the exact id of the DOM element you're trying to access when you're on the client. If I have a control that's three levels deep, MyPanel1_ctl0_ctl_0_1_MyLabel I have to emit the exact Client ID of MyLabel to the client in order to access it through JavaScript. This can be quite a pain in the ass. (Something like Script# could definitely help.) On the other hand, if I'm back on the server I can probably access the label's value through MyLabel or at least in a simpler way. The control tree is a *** to work with when you're solely working with it through JavaScript.
However, I definetly agree with your suggestion at the end of the post recommending that MSFT end the debate by supplying both static and instance based page methods. Let us make the decision, but don't take away our capabilities. Especially for us early adopters who may have relied upon them. Ahh-HEM! We don't need to be saved from ourselves.
(BTW, I'm writing this using FF2.0 and the inline spell checker rocks!)
hello Joel.
well, i understand your point of view (that's why i proposed getting back page methods). I still think that page methods don't give us any additional value and I do think that we would be better without them.
the main problem i see with them is that they send a lot of data back to the server and you can only use that info as read-only info (which is was i still think that the proper thing to do in a ajax page is to use javascript to get the values from the dom).
i agree that sometimes it's hard to get the reference to the html element, but let's face it: you can easily inject global variables which point to the controls from the server side page (at least, that what i do and it really simplifies my client code)
Hi Really nice post.
I wanted to know one more thing. NOW you do not get the Microsoft.Web.Ajax dll. This is installed in the GAC. but the hosting provider might not be good enough. What Can i do about that.
http://www.vikramlakhotia.com/New_Beta_version_of_the_ASPNET_AJAX_released.aspx
Good writing. I liked the article
"you can easily inject global variables which point to the controls from the server side page (at least, that what i do and it really simplifies my client code)"
-- Something like "var myLabel = new Sys.UI.Label('myPanel_ctrl0_myLabel');", right being emitted through server code? That's normally what I've been doing too.
I guess I'm also a bit frustrated that MSFT used the Beta release to make this change. It's not so much an under-the-hood change as say switching from closures to prototypes, but a feature change. I guess I'm just not sure why they didn't make this a CTP change previously so it wouldn't feel like such a big change at the Beta release point.
Hi guys.
vikram: though it may not be full proof, you can try to put the atlas dll in the bin folder and set the trust level of your web app to full trust. i haven't tested it yet.
Joel: i agree with you on the breaking change thing. however, i do really think that nobody should be using them due to the performance problems associated with them.
It seems like Dino Esposito isn't happy with the changes made to the AJAX extensions . I certainly agree
Believe me, we all wish it could be case-sensitive (it's actually a lot easier to implement). Unfortunately, Safari doesn't let us.
One thing to note is that xml specs require the namespace to be a uri. We don't enforce that but we recommend that you use the javascript protocol: xmlns:test="BLOCKED SCRIPTLA".
didn't know that, but then i'm not a mac user and the last time i looked safari only run in mac (and it was a long time ago :) )
so, regarding the javascript protocol, that means that i'd have to register the namespace with: xmlns:test="BLOCKED SCRIPTLA". is this correct or did i got it completly wrong? if i got it correct, i'm curious on the need to do this since it looks like the method strips the javascript prefix when it finds it...
btw, and since you've mentioned it, why don't you guys add a method that would let us associated a xmln namespace to a code namespace instead of trying to get that automatically?
i've just noticed that there's a mistake in my previous comment. i meant: xmlns:test="BLOCKED SCRIPTBLOCKED SPRIPTLA"
The xml-script don't work for me in add-on CTP.
Can you post please full simple solution, that I see what I do wrong.
Thanks.
PingBack from http://www.centplus.com/episode6-360-wired-weekly-news-recap-and-xbox-mvp-apperanceweekly-recap/
I get an exception when I use the samle code.
At the point where the program tries to divide by 0 I get the a pop-up in the IDE that says:
"DivideByZeroException" was not handled by user code."
To try the code I created a new VS 2005 ASP.NET Ajax Beta 1 project and pasted your code into a web page.
I have been having the same issues when I try to use the new error handling based on the "How to: Customize Error Handling in Partial-Page Updates" tutorial at:
http://ajax.asp.net/docs/tutorials/usingMsAjaxLibrary/displayErrorMessage.aspx
And, when I run the example at that URL it doesn't appear to work either. It returns a page that says the Ajax web site is down everytime and yet the site is not down.
Have you been able to get your code to work?
If so, do you have any thoughts on why it would not work for me?
Thanks,
Mike McIntyre
Hi.
I'm assuming that you're hitting the start debugging option in the VS IDE (a full green arrow head). if that is the case, you'll always have the exception popup in the IDE. hitting that button again should make you go throught the exception and you should get the expected results.
btw, if you right click the page and choose view in browser, you should get the normal behavior without the IDE popup.
Hi Luis,
Does the ScriptManager AsyncPostBackError fire HttpApplication Error event?
The reason I am asking is because I have a web site that uses ELMAH(Error Logging Modules And Handlers) module from GotDotNet to log all ASP.NET errors to a database. It works by hooking in to HttpApplication Error event. Previous CTP versions of Ajax (Atlas) did not log any errors to the database when and Ajax related error occured.
Do you have any information on this?
Thanks for a great article.
Mike
Won't this cause a "memory leak" on the application?
You're keeping the pages "live" by having a event hook up but by never removing it.
Why not use PreRequestHandlerExecute to hookup and PostRequestHandlerExecute to remove the hook?
Luis Abreu是ASP.NET MVP,在 http://msmvps.com 博客站上拥有一个精彩的博客。今天早些时候,他贴了一篇精彩的教程帖子,描述如何使用ASP.NET AJAX Beta1版中的一些新特性,来给你的应用添加更健壮(robust)的出错处理。我强烈推荐你去阅读以及为将来之用而收藏它。
今天在 LA.NET的blog 看见一个有趣的东西
This is an important change from beta1. In the new beta2 release, scripts added through the ScriptManager
Fox nous a TRES brievement annoncer la mis en ligne de la beta 2 de Microsoft Ajax Extension : ASP.NET
Luis, great post. I asked this question on the ASP.NET forums yesterday, but perhaps you'll have an answer as well. I've noticed that SetFocus() only seems to work on the first async postback, and fails thereafter. Can you tell if I'm correct in what I'm seeing? Thanks. Jason
To be honest, i just tested it in firefox and it worked. in fact, even in opera it works without a problem...i'll try to run it with IE to see if it works...
hi.
you're right...i'm seeing this too...i'll try to find more info on what's going on...
This sounds a lot like an issue we're having. Feel free to contribute, or follow along our forum thread:
http://forums.asp.net/thread/1458862.aspx
Thanks for the informative post. I posted the following question to your response on the asp.net forum:
Very interesting... how did you override it? The BridgeHander is generated at compile time, right? Are you editing the generated class in Temporary ASP.NET Files, or doing it some other way?
hello.
sorry, i've lost the frame id so i can't reply on the forums. well, simple add the method on the partial class maintained in the asbx.cs file
Hmm. We are using the Website Application Project rather than the Atlas Website Project. I do not see an an accompanying .cs file for our .asbx files at all... I was only able to find this file by getting the stack trace from javascript, and finding the generated class in our Temporary ASP.NET Files folder. Is this something you could/should manually add? BTW, forum link here: http://forums.asp.net/2/1459049/ShowThread.aspx#1459049
when you create the asbx file you can also add a codebehind file. can't you do that in the web app project?
Trying your example produces an odd error error in IE 7. After the alert displays with the message and I hit ok, I drop into test.js in VS 2005 with the breakpoint at Sys.Application.notifyScriptLoaded() - runtime error: object doesn't support this property or method.
I check off Disable script debugging in IE and get the Error on page after I dismiss the alert that says: Sys.ScriptLoadFailedException: The script "test.js' could not be loaded or does not contain the Sys.Application.notifyScriptLoaded() callback.
Do I have something configured incorrectly? Or? Thanks in advance.
Mitch
Thank you very much for this post!
Because of lack of AJAX documentation, it was really helpful!
This is a bug in IE6 and IE7. I just checked in a fix to ASP.NET AJAX a couple hours ago for this issue.
Eilon
Thanks for the post. I follow why this is happening, but I added the controls to the page from the control panel in VS 2005. Would you mind posting a possible solution. I do not know how to carry the Init event. I'm fairly new to coding so, please elaborate.
I added a manual ScriptReference to an embedded resource but was receiving a client side error: Error:
Hi and thanks for this useful post.
While fully digesting it I was wondering ... would you mind to elaborate a bit on: "....if you use extenders (which is not a problem to me since i'm a firm believer in client behaviors ;) )"
well, you could say that i'm a believer in the client side approach and do prefer to use client behaviors instead of extenders (though i must say that i do like the new model where you have a mapping from one to one between extenders and behaviors)
That's something I like about the extenders as well (even though I didn't get to look deep enough to learn if that still works if you encrypt the viewstate). But in the idea of using just client behaviours instead of extenders, how would you manage them (associate to given server control)?
several options here, though in that case, i'd say that you should go on using extenders (i still think that an ajax page should be client based and not server based, though i agree that this is not allways possible)
Ok. Thanks for sharing your thoughts
Congratulations!
And thanks!
Luis, do you know of anywhere that xml-script is documented ?
It's really hard to know how to get started, especially as lots of the examples out there don't seem to work in the November CTP...
Thanks for any suggestions
Chris
well, the best way i know is to read the source files. all the objects that can be used from xml-script have a descriptor property applied to the class and there you'll be able to see the properties, methods and events which you can use from xml-script.
Seriously, take a week off and let the rest of us catch up :-)
So this leads to the question: If I have custom JavaScript that executes a web service method and then loads a dropdown with the results and I want to then post this page back, I would need to turn Event Validation off, correct? Otherwise, the dropdown values would be invalid and throw the EventValidation exception that complains that I'm attempting to postback an invalid value. EventValidation is protecting me against JavaScript injection attacks, but that's exactly what I'm doing on purpose to my own site.
That being said. What do I do? Do I leave EventValidation on be able to use Extenders or do I turn it off so I can on demand load bits of information using web services that affect my dropdown's values?
Also, doesn't the cascading dropdown execute a webservice and load up the dropdown's values on the fly? If so, how does it get around the problem if its put into an UpdatePanel? I haven't looked at it in a long time, so maybe the implementation changed.
Joel, there's already a post on the toolkit forum (i think) where a guy from the team explains that there is a new intermediate release which fixed the problem i've described. with that version, there shouldn't be any problems with turning off event validation
Cool. I'll take a look at the toolkit forum and find the post.
Thx.
As someone who benefitted recently from your contributions to the forum, THANKS!
Hello Luis,
I am bumping into the same problem that Joel described. I have searched quite a bit on ajax.asp.net. I did find one link that you recommed he look at. Can you suggest some buzz works to help me find the link you described? Here is what I used "ClientScriptManager.RegisterForEventValidation Webservice"
Just in case people are looking for the post that describes the work around...
http://forums.asp.net/thread/1471011.aspx
Luis, excellent job as usual.
Avec les anciennes versions d'Atlas la gestion des erreurs avec les UpdatePanels n'étaient pas des plus
Je me suis retrouv lors d'un dev d'une application Web dans une petite galre avec l'ASP.NET AJAX Extention ! La situation est simple, j'ai une page ASPX contenant une gridview dans un UpdatePanel qui est protge par un formulaire...
You'll be glad to know that in the RC release, you can't redefine a class at all. So in this case you'd get an error message telling you that the class is already defined.
that's is good, though we still need to solve the double insertion issue which happens when you register a file on a script control (IScriptControl) and also in the scriptmanager control (currently, you get both files inserted on the page and even though i'll get an exception in rc1, what i need is to download only a file).
just to be more explicit: can you tell me why the scripts registered by script controls aren't "persisted" in the same list as the ones you add through the scripts property of the scriptmanager control? though i may be wrong, i think that not doing this will let me add two times the same file (as happened in the link i've provided above).
I receive this error
Assembly 'Microsoft.Web.Preview, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' does not contain a Web resource with name 'Microsoft.Web.Resource.ScriptLibrary.PreviewScript.js'.
If i try to open Microsoft.Web.Preview with reflector i can see in the resources folder the Preview.js file but when i try to load it into my ScriptManager i receive this strange error.
Do you solved the rpblem?
Any specific section of the video? Its 75 minute I believe....
Hello.
well, if you watch the first 20 mins, you'll see Jeff saying that updatepanels are good, but aren't great if you really want to have a performant ajax web app (which is why i don't like the updatepanel very much; i mean, it's really cool to see that they've managed to build a control which "ajaxes" a page in seconds, but when you're building ajax pages, you should really need to learn javascript and do most things on the client).
Thanks for the good explanation. Unfortunately, i am droping a user control into a custom Panel control that frames the user control in some common HTML plumbing - a bit like a webpart does for a user control. Anyhow, the user control has an embedded update panel. The custom Panel control overrides the CreateChildControls() method and takes any nested controls (the user control in this instance) and inserts them into the correct HTML container control. This is obviously where the UpdatePanel unregisters itself. How would I force the control tree construction to occur after the PreInit phase? I cant see how i can effect he timing of the control construction.
I'm having the same problem as David.
I found a kludge that works for some very specific cases. Here it is:
I'm no longer inheriting from Panel. I inherit from WebControl.
I added an ITemplate property to my my Control.
I created ANOTHER control that implements INamingContainer. Within the constructor of this container I create all my framing controls except for user controls (keep reading). For those, I have private properties for their containers once they're instantiated.
My CreateChildControls method instantiates a new sub-container control. Then I call MyTemplate.InstantiateIn(mySubContainer.MyExposedContentContainer) THEN I add this sub-container to this.Controls.
The problem is that I have to instantiate the user controls in preRender and disable their viewstate otherwise my viewstate gets out of whack. It works for me since those controls are stateless. Is there another way around this? Am I doing something out of order?
I would like to be able to instantiate those user controls much earlier than prerender, since I know down the line I, or someone else will need to have programmatic access to them.
PingBack from http://acdelemos.wordpress.com/2006/12/15/ajax-extender-upload-de-arquivos-sem-postback/
I'm not sure that my previous comment was OK
this.save.apply(this, parameters); and this.save(parameters) is not equivalent
I will take an example
var foo = function(a,b,c){}
We can call it like this foo.apply(this, [1,2,3]) and this is not the same thing as foo([1,2,3]). There is also the call method : foo.call(this, 1, 2, 3)
But this is not the first bug I find this one : http://forums.asp.net/thread/1499508.aspx and I have some other issue more difficult to explain (i can send you a mail if you want)
相信很多使用过GMail的读者都会觉得它的文件上传功能作得好,首先它支持无刷新上传,其次它能够隐去丑陋的文件上传框。本期的RandomClipping重点推荐两篇与上传有关的英语技术文章,希望对大家...
相信很多使用过 GMail 的读者都会觉得它的文件上传功能作得好,首先它支持无刷新上传,其次它能够隐去丑陋的文件上传框。本期的 Random Clipping 重点推荐两篇与上传有关的英语技术文章,希望对大家制作一个GMail那样的上传界面有所帮助。
How Skype & Co. get round firewalls Skype是如何穿越防火墙的 (tags: security p2p ) 解决IE7以下版本不支持无A状态伪类的几种方法
hello Cyril.
Yes, i know they're different. there's a difference between making a call and performing a call and "applying" it to another object (which, btw, is the base of inheritance in the ajax client script type). what i was trying to say was that the apply doesn't make sense in that case since it's trying to perform a call and apply it to the method that it's calling. thus, in this case (and this is my opinion), the correct call should be the one i've written since the save method is being called from another member method (hope this time i've managed to explin it correctly).
btw, regarding the bug, i do recall having seen it. i'm not sure that it's a bug on the platform (i though that parsing was based on localization, but i'm not sure since in the last weeks i've been busy working on non-ASP.NET projects). if you want, you can write me a mail with that bug (and maybe others you've found?) and i promise to take a look. i don't know if i'll be able to help, but i'm really interested in finding out more about those problems.
oh, and merry christmas to you too! :)
We have aspx pages with ajax beta and updatepanels.
When session ends it shows
Sys.WebForms.PageRequestManager message received from server could not be parsed
I tried scriptmanager endrequest but it still shows the same error
How to handle this error when session ends.
amit.lohogaonkar@comdaq.net
Here's another generics post (yes, i know I've promised to start writing about WF, but the truth is that
Thanks for the useful tip and code. However, I would like to add one caveat to people who are using the scriptmanager on a Master page, as I am.
If you wire up the client-side endrequest handler, either in a global script file or in a master page script block, it will error if the content page does not contain an update panel (possibly other Ajax controls will do).
It seems that the script include for the WebForms lib is only generated in this instance, which means that when the event handler is assigned you get the error: 'Sys.WebForms.PageRequestManager is null or not an object'. If you step into the debugger at this point and look at the Script Explorer, you will see that there is only one ScriptResource.axd file showing.
If you make the assignation conditional, it will avoid the error: if (Sys.WebForms != null) Sys.WebForms.PageRequestManager.getInstance().add_endRequest( endRequest );
Gute Sites & Blogs Alex on Asp.nethttp://blogs.dotnetgerman.com/alexonasp.net/Nikhilik.netExtrem...
Great news Luis, congratulations! I'm sure it will be a very accurate book. Let us know when the book is out :)
i think i'll hold off until there's a "go live" license.
Hi,
I hope the book also comes available in English. I speak several languages but Portugese isn't one of them.
Grz, Kris.
How dp i upload pdf files only??
How is it? Is it viable to use instead of VS2005?
Please comment a bit this scenario: I want AllowCustomErrors="false" in ScriptManage and <customErrors mode="Off"/> in web.config because I lilke to custom handle the errors in global.asax (or in a http module class) based on a custom exception class I built on top of ApplicationException.
Made a few tests on current MS AJAX RTM and it looks like there is no way to make ScriptManager to skip its verifications. Is there something I should know, or this scenario is just not possible yet?
Thanks in advance,
Lucian
Even with AJAX capabilities - there are times that a multi-frame page must be generated. Some reasons
Based mail from one of the developer on web parts project in MS we used web parts in developing site like pageflakes or netvibs, however, at the end we did not get what we wanted drag/drop web parts w/o postback... any solution/alternative from any one one urgent basis... please post it here
It IS out... yesterday, actually (Jan 30th)
http://www.microsoft.com/downloads/details.aspx?familyid=C6EF4735-C7DE-46A2-997A-EA58FDFCBA63&displaylang=en
http://www.thundermain.com/rss
follow that feed and you'll know when stuff is out.
Susan: yes, I could do that. But i think that updating the main page of PowerShell is the way to go...
I need your help -- I believe both of your hands :).
Please comment this scenario: I want AllowCustomErrors="false" in ScriptManage and <customErrors mode="Off"/> in web.config because I lilke to custom handle the errors in global.asax (or in a http module class) based on a custom exception class I built on top of ApplicationException.
Lucian N
Does this help (it's old an i haven't tried it in the final release...):
http://msmvps.com/blogs/luisabreu/archive/2006/10/31/Handling-errors-globally.aspx
Thanks for replying.
I took Joao's approach and is working fine.
There is a problem with Server.Transfer(...) who cannot stop current page processing and ends with a javascript alert window. Still Request.Redirect(...) to error page saved the day, but with some downsides (and I'm not sure I like that :)).
The idea is -- as you pointed out -- to move the error handling scope from application to page. Global.asax or a http module is a good place to do that.
Great help!
Thx for pointed it out.
Hello again.
Lucian, you'll never be able to use Server.Transfer because doing that will return the HTML from the destination page and the client side is expecting a predefined message format (that's why you can't use server.transfer). on the other hand, when you do a response.redirect, the response is "intercepted" in the server side by the scriptmodule and it'll transform the response so that the client side object understands the response. that's why response.redirect rowks and server.transfer doesn't.
Hi !!
I don't believe this ! 10 mins back I had been sitting for about 2 hours trying to understand about what is the Always, Conditional, PostBack Trigger etc and had reached my own conclusions of how certain things are just not possible in AJAX, cursing Microsoft.
Your blog has cleared it up all. I am amazed at how visiting ths single page when I began my search, I have got my understanding just 'right'. Your analysis,, findings and expalnation is simply 'clear-cut'. Thanks a lot. Will look forward to seeing more 'gyaan' from u. Do let me know, if possible, when u write ur next blog. You already have a student.
Keep the good work going.
TB失礼します。ブログ記事とても参考になりました。ID Manager で検索していてこちらにたどり着きました。またお邪魔させて頂きますね。今後とも宜しくお願いします。
Cumprimentos!
Hi luisabreu,
Very good post.I referred lot of posts but this one worked.Thanks a lot.
Can you place the MultiView inside an UpdatePanel instead?
hello. yes, you can. in fact, in the previous example, that's what you should do if you want to change the view shown to the user without a full postback.
Why don't you use the AsyncPostBackSourceElementID property of the ScriptManager ?
howdy!
you're not going to believe it but I've looked at the ScriptManager API and didn't see that! thanks Cyril!
PingBack from http://www.shinstudio.com/sh.kim/?p=237
hi, i'm developing an application and yesterday i receive the nice zebra tlp 2844... :S
i have ti print label on it, only text and i am working in visual studio 2005 in C#,,, muy question... do i need some dll to make the printer work, or i should do like your example, writing a text file o sending to the printer... i'm confused and afraid... thankz
i've tried your code, but it give's me this
{"Identificador no válido.\r\nNombre del parámetro: handle"}
not valid identifier. parameter name: handle
:(
After posting about the new release of reflector , I've just noticed that there's a ppt file that gives
i have a page whcih uses partial post backs ,i have some server side validations in the page, if validation fails i used throw an application exception to get the message to the client tha validation has failed. All this is working fine when i am setting the Cutom errors mode "Off" in web.config ,but when i set it to "on" the exception raised is gettign habled some where and i am able to get the exception but with the exception message cleared message.
Does any body have any suggestions on this problem?
Thanks in advance
Kitu
I am facing the same problem as Amit stated above....
When Session ends and i try to do a partial postback i get the same error popup.
Have you managed to get the draggableListItem behavior to work w/o using xml-script? If so, do you have a code sample? I've been beating my head against it for a while now, and it's getting more than frustrating. THe problem seems to be that I can't figure out how to create the templates correctly.
Thanks in advance!
paul (from ajax.asp.net forums)
paul.vencill@velocitydatasolutions.com
the code I've written won't work if you try to print to the usb port. on the other hand, if you have the printer on the usb port, you can share it and then you can pass the name of the shared printer to the printing code (ex.:\\machinename\sharedprintername).
btw, note that the sample writes to a file only for tests. you can remove that line and send it directly to the printer by using the interop code.
why not use other js library, like prototype, mootools or scriptaculus? all of them support OO development. As I call, none have support for namespaces, but this is a simple function to implement. Mootools is the most flexible, allowing you to choose the packages it contains.
Yes, i could do that too. but why must i use yet another framework when AJAX extensions already has what i need?
Why don't you just use a scriptpath and customize the file to remove everything you don't need?
We're also thinking about that problem for future releases.
Hello Bertrand.
yes, i thought about that but i really have some trouble with understanding everything those licenses say...since you've mentioned it, i'm assuming that's ok to do just that and copy/paste only the OO part that i need for this current project. thanks for the tip.
Why don't you use Nikhil's Script# to generate your code? It will let you develop in c# and it's type system is compatible to the Microsoft AJAX one.
Hello Manuel.
To be honest, i don't know Nikhil's script# framework. the problem is not with AJAX OO. it's that by default, if i want to use it, i get to include lots of things which i don't need...
i got problems now printing several labels
what sort of prpblems? I had some problems until i got the size of the label right. after that, i'm able to print several labels at a time...
Very nice site! Good work.
ASP.NET AJAX: How to call client-side Javascript once an UpdatePanel request is over
Yes, funny. The Mac will prompt you for pretty much the same stuff, only it will ask for your password every time...
You should declare _deferred, or you'll get a warning in Firefox strict mode.
howdy.
you're right. I did declare it, but it got deleted when i was tabbing the content. thanks.
I have Added a control In udatePanel through loadcontrol() but ehrn I cause some postback from the control then I lost the data of the control. How can I load a control in UpdatePanel and work as any other control.
新一期的RandomClippings又来了,这次介绍的两篇文章都很容易读,单词不会太难,语法也简单。在AJAX中制作自定义验证服务(Buildingacustomauthenticati...
新一期的 Random Clippings 又来了,这次介绍的两篇文章都很容易读,单词不会太难,语法也简单。 在AJAX中制作自定义验证服务 ( Building a custom authentication
How do I reduce the size of the file to less than 64 k?
I send in 21 to 54 k and the label size baloons to megabytes and the printer would just ignore it.
Well, note that in the previous example I always load a control during a postback, ie, that's necessary to make things work out.
I think that a CS degree is a lot easier to get than some years ago.
IMHO, using a language like Java in most CS courses isn't a bad thing. If the course is about implementing an AI algorithm and the student feels more comfortable and productive doing it in Java, it's fine for me.
However, a CS degree needs to teach how to use pointers, recursion, assembly, algorithm complexity and other important things to the students.
If after 5 years of studies you don't know to program in assembler for at least one CPU I think something is failing. I know that assembler is very little used nowadays, that's why there doesn't need to be more than one or two subjects about it, but it is required IMHO.
I have seen people without a CS degree who only know how to use a language and not much more. They don't know how to measure the complexity of an algorithm or what caching is and the implications of iterating through a matrix by rows or by columns... Of course there are always brilliant individuals who don't have a CS degree and are better than people who does have it.
Yeah, right, and real men code in assembly.
Seriously, when I interview candidates, I don't care if they have a degree in CS (I don't have one myself) or what language they prefer (I used C# when I interviewed for MS). What I care about is their problem solving abilities and coding skills. C or Java does not make a difference to see those.
Bertrand, that's not what I mean. What I'm trying to say is that CS courses should give you the basics about computer science. I do think that knowing something about C, C++ and assembly is a must after completing a CS degree. Do note that I'm not against using Java on CS courses. What I'm saying is that concepts like pointers are needed and when you need to explain it, you do really need C (or other language that supports it)
Hi, i'm using ajax 1.0 and after postback the validators desappear. i saw your post but the link to download the project for the dll is no longer available, can you post a new link?
Tks,
Pedro Costa,
Aveiro
Portugal
Congratulations Luis! That's great! I'm sure that it took a lot of hard work to put this book together and hope that an English translation comes out in the near future. Your contributions to the community have been extremely valuable and I hope that you continue to be active even now as your book is complete.
Hello Joel.
thanks for your kind words. Even though I'm not currently monitoring the AJAX forums, I'll try to compensate by adding more entries in my blog :)
Does not work for me (I need the full postback!).
Maybe it's do to the fact this control is nested in two usecontrols?
Please help!
Thanks!
Jim *AT* Cheseborough.com
Congratulations Luis! One more reason for learning Portuguese (I don't speak it, but it's not difficult for Italians to understand it - and I love its sound) :)
thanks :)
btw, italian does sound really better than portuguese!
Some time ago, I've written a small sample that abstracts some of the details associated with printing
So basically this means that I can't add an updatepanel in createchildcontrols, since this occurs after OnInit? Hmm...
Du musst ein Fachmann sein - wirklich guter Aufstellungsort, den du hast!
I am dynamically loading control in UPDATEPANEL and once the post back on control takes place, the control disappears. I could not find the script managers AsyncPostBackSourceElementID property.
What can I do to solve this problem?
Please help me out.
Thanks
Ashish
I tried your approach and it works very nicely.. my only issue is how do I get information back from the printer.. some commands return values from the printer.. any ideas?
Husain
It seems to be sending the data to the printer but all i'm getting is a flashing data light. Its a ZebraZ4M Plus.
Thx for your article, works great with my Zebra S4M
I see the same things with Reflector, .net 2.0 controls manage their own viewstate, they don't use childs controls' viewstate. I found this pattern very stupid, I prefer the "proxy" method.
But with the proxy method, where do we have to call the EnsureChildControls() method ? we have 2 solutions on the constructor or on each properties accessor which is very boring. If we call the EnsureChildControls() on the constructor the designer is firing an error because we can't modifiy the controls collection on the constructor. The DesignMode property isn't yet set so we have to test the validity of HttpContext.Current in our control constructor.
If you have an another solution i'm listening to you :-)
Well, I'm following the ASP.NET 1.X recommendations: i'm calling ensurechildcontrols on all the properties. Since I'm inheriting from compositecontrol, the controls property is already implemented correctly by that base class (ie, it already calls ensurechildcontrols before calling the base class property).
All references that I found in a Google's search, go to this link: http://atlas.asp.net/docs/atlas/doc/wcf/default.aspx, but it isn't avaliable.
Hello Israel. I think those are the old docs...unfortunately, those features were removed during the final betas and rc versions :(
I'm hoping that they add it again during the next version...which, btw, I don't know when it'll be releases
The support for ASP.NET AJAX with WCF is in the "Orcas" release of ASP.NET and ASP.NET AJAX.
Hope this helps,
Scott
Hello Scott!
that's great. btw, is it already there (ie, does the current beta already has WCF support)? thanks again.
http://www.9cicerone.info/piccole
http://www.jazrson51.org/sondaggio
Silverlight doesn't support triggers like other than 'loaded'. To get that behavior your have to listen to the events in code and fire the animations that way.
Hello Dave.
thanks for the info. If you're reading this, 2 other questions:
1. are there any plans for supporting them in the final release?
2. maybe you should put that info in the docs because I didn't find anything out there that says what you've just confirmer (in fact, the link i've provided shows the exact opposite behavior)
1. I don't know one way or the other so I can't really comment on this, sorry.
2. Its definitely an error in the docs, only the Loaded event can be a routed event in Silverlight. I'm also not familiar with what docs there may be out there, but I'm sure docs will be improving with the next iteration.
So in short I'm not all that helpful :)
on trhe contrary! You've confirmed the most important thing: there is only a routed event in the current Silverlight version: the Loaded event.
thanks again.
I'm doing exactly this work as well right now. One thing I haven't figured out is how to get a good design time experience. I can't get a wpfe control to render using a ControlDesigner. Any ideas?
iam doing programming. I want javascript codes
Hello Mike.
i'm developing only client side components (ie, javascript wrappers). if you're goingo from the server side, then i think that designers are the way to go. i think that you have several approaches here, though i haven'tr tried any. for instance, you can use the designer to inject the top control? i think that the strategy depends on the way you're generating your controls (for instance, how do you insert the silverlight control on the page...)
in order to register event handlers, one approach is to assign the handler to a global-scoped variable. In this way, you have created a global method that can be referenced in XAML.
Btw, this is the approach used in the "WPFE-Pad" sample to create a Button control.
Hello Garbin.
yeas, you can do that...by using something like that, you should end up with less code that the sample i've wrote. but it still sucks because of the fact that you'll have to "translate" all the events to unique method names which are mapped back to instance methods. that's why i don't like having events exposed as strings...
Your know end news! What is this? Discounts!
<a href= ></a>
Thanks guys! You just saved me a day of trying to figure out why the Triggers collection was there...
dev.cmwa.eu/.../Default.aspx
Here some sample that can make it ... The idea is to load your customcontrols only on the prerender.
I made some test pages with some PanelManagement class. That can handle this easily.
Can you imagine a whole new breed of Silverlight ads that go fullscreen on load? Ugh, I'm glad they don't allow it. :-)
yeah...i can agree that it might not make sense for most cases (if not all). However, i don't agree that you can only make it in response to an event fired by a silverlight control...
This is actually in response to only user initiated events. It is more of a safety/security feature. The intent is to disallow apps that take over the desktop and give the perception of being the computer screen.
well, i understand that, even though i still think that it should be possible to do that from an html control event...
Unfortunately the link stopped working: This video is no longer available due to a copyright claim by NetResult
Hi luisabreu For the current CTP bits you need to do a little more work to get diagnostics to log on the server 1) add a DiagnosticsService.asmx to your web application that points to the DiagnosticsService class 2) add entries to your web.config to enable Diagnostics and 3) write a small amount of app code to log the diagnostics to a store (file, memory, database, etc) of your choice You can find a QuickStart at http://quickstarts.asp.net/Futures/services/doc/diagnostics.aspx that describes the steps. You can find sample code at: http://quickstarts.asp.net/Futures/util/srcview.aspx?path=~/services/samples/diagnostics/default.src Please email me on my blog at http://blogs.msdn.com/jhawk with feedback on the diagnostics service. jhawk
Hello Jonathan. yes, you're correct. As you can see by the update, I've discovered it some time after posting the article. Unfortunately, i didn't had the time to write it right away :( After looking at the sample code, i think that my biggest question is why don't you follow the patterns you're using with the authentication and profile services?
hello Manuel.
you're right...and I can'find the video anywhere. damn...
cmwalolo.... can't seem to find the link to download your sample. I'm getting the dreaded "Cannot unregister UpdatePanel " error too. Help a brother out.
I believe that doing that might work since you're loading your control. It wont work, however, if you load you control (that has your panel) and then remove it from the current hierarchy and add it as a child control of another control.
ja krevetko! Vsem sasat'!
sry to bother you guys...
but i'm trying to use the fullscreen option with C#..
Could you tell me where I can find the "BrowserHost" object ?
Thx in advance
it's in the system.silverlight dll, on the System.Windows.Hosting namespace.
Now, there's a coach I'd love to have again in my Benfica! :) We had him there, but we sent him away ...
Hi Luis The Diagnostics work is still in preview stage, so I thought we should get what we have out to customers and listen to the feedback. Yes, one of the areas for the future is to enable a similar model for exposing the diagnostics service as we currently do today for the authentication and profile service. A question for you: You currently have to write app code to log the diagnostics information. If we did something automatic what options you like and what should be the default? integrated with IIS health monitoring (Web Events) or log to text file or log to a database or integrated with System.Diagnostics trace listeners etc or ? I look forward to your feeedback. jhawk
Hello Jonathan!
yeah, i'd really love that it would behave like the current services (authentication and profiles) provided by the current version of ASP.NET AJAX.
regarding your second question, it's a tricky one. I've played with the health monitoring system during the betas of ASP.NET (i'm assuming that we're talking about the health monitoring services introduced by ASP.NET 2.0?). I really loved it. Not sure if many use it in their apps though. for instance, even though i really like the health monitoring services, the truth is that I've only used it in production code once (in the other cases, logging is performed through the logging application block or log4net). If you ask me, i think that in my case, i've been using text files and databases for diagnostics purposes.
The auto.axd handler is a cool handler that lets you navigate through all the data maintained on a database
higuys!What yourblog powered by?
Hi. Great site.
The DynamicFilter control is a special kind of control: it will let you use ListControl to filter the
you don't need to instantiate it -- use the silverlight.js file and the createSilverlight() functions to create the correct <object> tag for you --
I stumbled onto this one myself, well, at least, when I was complaining to my buddy about the mouse events seeming inconsistent he asked "maybe the canvas isn't firing mouse events?" Doh!
That is waht i'm doing. the problem is that, during the version testing, the silverlight.js code tries to creatre a new Activex AgControl and it throws that error.
I've tested on another 32 bits machine and it worked. not sure on why it's not working on the 64 bits machine.
sender.Content.Managed.SomethingHappened = myMethod;
The above code makes me think that the event handling does not do multicasting. Can we have several event handlers attached there?
--
Hristo Deshev
yeah, i believe that in this version you can only hook up one method.
no it isnt,
using System.Windows.Interop
<then>
BrowserHost.isFullScreen = true/false
Yeah, you«'re right....the other is internal.
The DynamicNavigator control does what its name tell you: it'll build you a list that lets you navigate
well, almost, that is. And what a ride it was, letting me get some important info on several aspects
Dave has a nice post showing how to call JS methods from C#. As I've also said in the past , it's
As we've seen, by default pages must have the same name as the table from which it gets the data
The DynamicRssLink control generates a link that you can put in your page and that is responsible for
Interesting...
I'm just putting this here for the sake of completeness (since I'm trying to run through all
interesting
I love cats, and yours are beautiful!
Btw, "Ravanelli" comes from the name of the soccer player?
yeah, that is correct. btw, at the time i think he played for Juve and they had eliminated benfica from uefa's cup quarter final. since the cat loved to play with a paper ball and, at the time, was white, i though: "what the heck...lets call him Ravanelli" :)
wow exactly what i need, ive been struggling w/python & GW for 2 hours trying to setup a nice backend fedex label printing thingy.
ps. typo in your first example, should be 'A20,20,0,1,1,1,N,"Testing"' (only 7 args)
(or maybe its only a typo if you're using an LP2844? dunno if TLP's have different syntax)
I was wondering if you could tell me what path to use if I'm hosting the service in an outside application, like a windows service, or console app. There's no .svc file in this instance, but I thought that putting in the service's address would work. When I do, I get: "The server method '[METHOD_NAME]' failed with the following error:... HTTP Error 404..."
Any suggestions? Thank you.
Husain:
hum...can you give me an example of command that works like that? I'm not a zebra guru, so i thought that when a command returned info, it would do that by priting it in a label.
ladyada:
i wrote the code for the EPL2 programming language, which means that if your zevra understands it, it should work without any problems. i've jus topened the EPL2 manual and this is what's shown there for the A command:
Syntax Ap1,p2,p3,p4,p5,p6,p7,"DATA"
Are you saying that your zebra understands epl2 but this command doesn't work?
hello jeff.
i believe that the same restrictions you had for asmx web services still hold true, ie, you can't make xdomains calls. if i recall correctly, this happens because, by default, browsers won't let you use the xmlhttprequest object to perform xdomain calls.
to solve this, normally we just create a local web service which works as a proxy for the remote service:
dotnetslackers.com/.../MashitUpwithASPNETAJAX.aspx
Good to know, thanks Luis.
I use "\\machinename\sharedprintername" in the code, but the exception is also throw. why?
Can you explain the "_printerPath" para of CreateFile method. I am also confused with the port of printer, how can I user the remote printer?
I am a chinese student, my english is not well.
Thank you!
sherwinzhu@buaa.edu.cn
hum...i think that when i've written the code, it worked without any problems with shared printers. the _printerPath field is supposed to indicate the path to the printer (for instance, you can use LPT1 if you have the printer attached to your pc and you normally instantiate it through the constructor of the class). the _port is used to keep the safe file handle used by the code.
btw, do note that this class will not print if the printer is connected through the usb port (in that case, you can simply share the printer and use the printer's shared name to make it work).
I am using the Atlas beta version. I have textbox focus problem. The Solution suggested by you is not available in that version. Is there any way,to transfer the textbox focus?
Please help?
i think that you should really migrate to the most recent version since there were some problems with focus on the previous version.
anyway, you can try to handle the endrequest event on the client side and then set the focus on a control.
Pingback from » Future bits: enabling sitemaps search
【原文地址】Tip/Trick:HandlingErrorswiththeUpdatePanelcontrolusingASP.NETAJAX【原文发表日期】Sunday,Oc...
I'm the same except that I'm Solo instead of Team.
DLSB
Another great .NET 3.0 - WPF learning resource for developers here:
www.innerworkings.com/.../Catalog.aspx
i am using detailview in update panel, infact inside nested update panel
but it is not working
If any one can help me to sort it out
do mail me at
ismail.majid@gmail.com
If you know any link that can help me
Regard majid
Hi there
well i am getting the same error which you have discussed about, and i am not able to understand what / how to get a fix round of it.
my scenario is that i have a user control, UC1. i will drop it in an UpdatePanel UP1 on a wizard control WC1 step page, on the Main .aspx page. like
WC1 contains UP1; UP1 contains UC1
i have the script manager declared rite under the form tag on the master page, and all seems good / smooth to me, but still I WILL GET THIS ERROR :(.
please help me over this error. Waiting for your reply.
- Bassam
Hello Luis, thanks for your help !!!!
I'm trying filtering, and works well. But I want to sort ( alphabetic ) the DropDownList content, and I don't know how to do it. It's possible ?
<asp:Content runat="server" ContentPlaceHolderID="ContentPlaceHolder1">
<asp:DropDownList runat="server" ID="DropDownList1"
BackColor="LemonChiffon" Font-Italic="true" />
<asp:DynamicFilter runat="server" ColumnName="id_cli"
ControlID="DropDownList1" />
<asp:DynamicList runat="server" />
</asp:Content>
Thank you a lot, and "saludos from Barcelona"
Well, guess what: i had just finished posting this and I'm already seeing a bug on the maximize behavior
That's cool, thanks mate!
Currently, you'll only get tool support for ASMX web services that render JSON. This doesn't
Pingback from Sebastien.warin.fr» Blog Archive » FormAuthentication, Session et UpdatePanel : PageRequestManagerParserErrorException
Just to clarify, it's the concept of encapsulating Silverlight content in a control with embedded .xaml and .js resources that appeals to me. I also find the use of the <embed> tag slightly annoying in the asp:Xaml and asp:Media controls. The potential is there to build controls that create Silverlight content with the traditional script and then instrument it through properties, events, and methods - that's what's so compelling (in fact I just built one as a proof of concept).
-Fritz
Hello Fritz.
yeah, i agree that the concept is good but, as i've said, the implementation sucks. Again, I'm not sure on why they simply didn't embed the silverlight.js file and generated the inserted a call to the createSilverlight method...oh well, I believe that you're in a better place than me to get an answer to this question :)
Luis, Great write-up! If you're interested, please have a look at my blog for a little more detail on how ToolkitScriptManager works - and why. :) * http://blogs.msdn.com/delay/archive/2007/06/11/script-combining-made-easy-overview-of-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx. I've just created a work item for the WebResourceAttribute issue you mention - thanks for pointing that out. * http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=11023 Your comment about notifyScriptLoaded is good - though you'll notice that none of the AJAX Control Toolkit scripts called that method because ScriptResource.axd adds it automatically for any scripts it serves. Thanks!
Minor remark: if you use the regular script manager, you don't need to add the notification line either.
yeah, you're right about extenders and scriptresource. and if i'm not mistaken, you can also add that line automatically when loading a script by using the notifyscriptloaded property of the scriptreference object.
however, i thought it was best to mention this because there's always the chance of having a dll with embedded js files and you might be using a scriptelement to add a reference to that js file.
maybe there should be a recommendation for not adding the notifyScriptLoaded method to the end of the file (making us use the notifyscriptloaded property of the scriptreference element).
btw, a question: isn't there a possibility of running out of chars on the query string when you have several js files and several assemblies?
Yes, Bertrand. As always, you're correct. :)
Luis, Yes, the length of the combined script URL is something we'd like to decrease. I mention it briefly in my blog, but hadn't gotten around to opening a work item until earlier today. (Just a bit before you asked, in fact!) http://www.codeplex.com/AtlasControlToolkit/WorkItem/View.aspx?WorkItemId=11025
Delay: the query string length was something i forgot to mention in my initial post. compressing it looks good to me :)
.NET Tips & Tricks Michael Nemtsev, Microsoft MVP Last update: June 13 , 2007 Document version 0
Drag-n-drop on Silverlight alpha 3D in Silverlight Download DinnerNow.NET Sample Application Silverlight
HM2irD Hey, there is what you need.
Thank you very much
You can use the initParams property of the Siverlight control to pass aditional infomation during the
FYI, as of the 10618 release of the AJAX Control Toolkit, WebResourceAttribute is now required and the combined script URLs are much shorter. Additionally, there's a new CombinedScriptsHandlerUrl property that's pretty handy:
blogs.msdn.com/.../script-combining-made-better-overview-of-improvements-to-the-ajax-control-toolkit-s-toolkitscriptmanager.aspx
I have a page that has a scriptmanager, updatepanel, and timer in it. This page is iframed by another
yes, I've been told that there are improvements, but still wasn't able to download and test the latest version.
And it seems like it solves some of the issues i've mentioned before and brings improves to other
I'm very interessed to try Partial rendering a my own risk, but how do I do... ? I cannot find the "EnableLegacyRendering" porperty (and the "SupportsPartialRendering" by the way...)
ManyThanks
DG
well, EnableLegacyRendering is a private property of the internal PageRequestManager class. What i was trying to say was that you can bypass the3 default logic by explicitly setting the supportspartialrendering of the scriptmanager control class.
Pingback from » More tutorials on Silverlight and blend
Pingback from links for 2007-06-22
Great site and pretty colors!
Pingback from » Working from home
Agreed.
My experience is the exact opposite. Too many distractions and occasions for procrastination at home. Much easier to focus at the office.
Bertrand: i think that it all depends on "how you work". when you think about the time you need just to get to the office (which in my case is not much, maybe about an hour), the stress you endure during that time (most of the times, i'm driving), the ammount of times you get disturbed by a phone ringing or a co-worker that is talking with another guy about the soccer game during the weekend...oh well, sometimes i really think that doing anything at the office is really a miracle :)
From my experience, if you're a key employee you'll get a lot of distractions @ your workplace, since most people are not self reliant and you have the means to help them.
But there are a lot of employees (most) that are not self reliant, nor independent, and in these cases they'll slack or thrash a significant amount of time if they won't get a nudge in the right direction.
Well, I can be at the office in less than ten minutes, and everyone there is self-reliant, but I guess I'm super-lucky :)
Thank you.
I hope you had a happy birthday.
So does this mean that we won't have a Portuguese book (written by you, of course) about Silverlight? :(
You mentioned on your post, LINQ, it's a really good new technology, do you have any future plans to start on posting about this subject? (I think you didn't talk about LINQ very often, at least I used the search and only retrieved one post, if not, than sorry :))
yeah, it was fun (that is, if you forget about the age thing :) ).
silvelright book: not sure. still thinking about that.
LINQ: i haven't really talked much about it. why? well because time is always short :) but i do intend to study it and discuss it here :)
Hey, there is what you need.
URL expired ;(
How many pics can you stich with the camera?
Take a look at this:
www.manuelabadia.com/.../london.html
It takes a while to load because it's 8 MB. Initially is displayed in black and white and in low res, and then it starts to load it in its full glory from left to right.
about 30 pics stitched together but using the computer. It isn't perfect as I skipped some parts without shooting as many pics as needed but after some hand tunning the result isn't as bad as before :P
Laurent: i'm sorry but it seems like i can't approve your comment (i'll try again tomorrow since it looks like msmvps.com is always getting intro trouble when i approve it)
Manuel: it looks like you had lots of fun on your trip to England. i still didn't manage to see the pic because i'm getting some nasty problems with quick time. ragarding my s3, it can take up to 26 photos and it really has a cool layout which lets you get the previous pic while taking the next (and it lets you go from left-to-right, right-to-left, top-to-bottom, bottom-to-top and clockwise :) )
Yeah, it was a cool trip.
When I compared some cameras two years ago they were able to stich only 3 or 4 pics. 26 pics... I'm impressed! And that previous pic feature that you mention sounds cool too. Nice purchase ;-)
Regarding your quicktime problems, I haven't installed quicktime since I a few months. There is a codec package called "Quicktime alternative" that install all the necessary quicktime stuff without the bloated apple stuff. Maybe that can help you.
Manuel, the picture is pretty cool and impressive! I'm almost thinking about making an effort to go there...
Thank you Luis. It's a nice place to visit but it seems that now it isn't the best moment to do it.
yeah...the last couple of days have not been very good...
Thanks for your work. I've tried to duplicate a WCP service call at my end. Unfortunately, I get an "Operation is not valid due to the current state of the object." error. Forgive me for being a WCF newb. I'm hoping that you can provide an answer to my dilema. Here are some code snippets:
<Web.config>
<system.serviceModel>
<services>
<service name="TestService">
<endpoint contract="ITestService"
binding="webHttpBinding" address=""
behaviorConfiguration="jsonBehavior" bindingConfiguration="jsonBinding" />
<endpoint address="mex" binding="mexHttpBinding" contract="IMetadataExchange"/>
</service>
</services>
<bindings>
<webHttpBinding>
<binding name="jsonBinding" messageEncoding="Json"/>
</webHttpBinding>
</bindings>
<behaviors>
<serviceBehaviors>
<behavior name="metadataSuport">
<serviceMetadata httpGetEnabled="true" httpGetUrl=""/>
</behavior>
</serviceBehaviors>
<endpointBehaviors>
<behavior name="jsonBehavior">
<enableWebScript />
</endpointBehaviors>
</behaviors>
</system.serviceModel>
<TestService.svc>
<%@ ServiceHost Language="C#" Debug="true" Service="TestService" CodeBehind="~/App_Code/TestService.cs" %>
<app_code/ITestService.cs>
[ServiceContract]
public interface ITestService
[OperationContract]
string GetDataRows(string serviceName);
string HelloWorld();
<app_code/TestService.cs>
public class TestService : ITestService
public string GetDataRows(string serviceName)
return "Dummy result";
public string HelloWorld()
return "Hi world!";
<Default.xaml.cs>
public class Proxy : SoapHttpClientProtocol
public Proxy(string url)
this.Url = url;
try
ServiceParameter[] parameters = new ServiceParameter[]
new ServiceParameter("serviceName", serviceName)
};
object[] obj = this.Invoke("GetDataRows", parameters, typeof(string));
return (string)obj[0];
catch (System.Exception error)
return error.Message;
object[] obj = this.Invoke("HelloWorld", new ServiceParameter[0], typeof(string));
...
Proxy proxy = new Proxy("localhost/.../TestService.svc");
proxy.HelloWorld();
I'm sorry about posting all this code to your forum. I'm stumped and didn't know where else to turn. It's probably not the best way to introduce myself.
I've followed your code examples as closely as possible. I've tried the proxy url without the ".svc" extension as well and come up with the same issue.
Any help you can lend is greatly appreciated.
W James
send me a running sample to labreu at gmail.com and i'll try to take a look at it
Great help for me. Lots of QA bugs solved.
Sure, as a developer I think working from home is far more productive, as long as you have enough self-discipline.
Luisabreu,
I spent all day search on google and test to printing to my Zerbra 888-TT, you just save my bacon, thank you.
agreed. and if you can't, your employer can always fire you. what i don't get is why is so hard to get that chance (maybe that's because i've always been an employee and never an employer)
Finally, a nice Alfa. Must drop by a dealer when it comes out and give it a spin. Although the right place for a engine on a sports car is on the rear, not the front!
I think you won't be that lucky. I've heard they're only producing 500 units and they're all sold. so, i'm guessing that you'll have to keep using that cool rx8 or maybe the gallardo, right?
technet2.microsoft.com/.../d3e3edb9-2d32-4089-949c-5f215c9787771033.mspx
("CTRL+ALT+DEL always goes to the local desktop. If you need to send CTRL+ALT+DEL to the remote computer, you must use CTRL+ALT+END.
")
yeah, and i've just discovered that link after publishing the previous post. there are other cool keys too...
Oh well... I'm betting that I'll be able to find one eventually. And if it's second hand, it's even better. Alfas loose value here in the UK faster than a sinking rock!
Not only there :) but if there are only 500 units, i think you'll have a hard time finding one.
Those are fighting words, they are!!!
lol...well, i guess that you can prove i'm wrong by buying one and then inviting me to take a ride :)
Your Brilliant... Saved me hours of trying to get this fixed. Thanks
Thank you. It's really a very good article.
I'd like to extend this with using of master page.
In my case, the script manager is on the master page, and I'd like to have a handler for each page. Its a big project, end in my reality I am developing webparts for a sharepoint project where the script manager is not under my hands. My solution was to make a pattern with the sharepoint team to have the ID of the script manager control, so, I can find the control with the findcontrol method in my webpart and add my especific handler to the "AsyncPostBackError" event. I dont like this kind of thing. I couldnt even use the scriptmanager proxy to do this. So, does anyone have a better solution ? thanks in advance. André Luiz Sobreiro
If yes, then don't forget that it need to run in full trust, so adding it to the GAC is something
You are a life saver! This is exaclty what i was looking for here:
silverlight.net/.../2832.aspx
I have been faffing about with custom event handlers trying to do exactly this!
Your a champion!
David Lawton
Hyperion Technologies Ltd (UK)
Electric Hornet Design Studios
I send these command to printer,
but it doesn't work.
The printer can't start to print, unless i send another bar code command which can work.
Can you help me?
I want to print text only on a label using Zebra 888.
command code
N
Q880,30
q800
I2
A260,10,0,8,1,1,N,"整 机 配 置 列 表"
A70,50,0,8,1,1,N,"种类"
A300,50,0,8,1,1,N,"名称"
A500,50,0,8,1,1,N,"数量"
A620,50,0,8,1,1,N,"物料编号"
A20,84,0,8,1,1,N,"奈奈奈奈奈奈"
A188,84,0,8,1,1,N,"奈奈奈奈奈奈奈奈奈奈"
A532,91,0,3,1,1,N,"1"
A556,91,0,3,1,1,N,"8888888888888888"
A188,118,0,8,1,1,N,"奈奈奈奈奈奈奈"
A20,152,0,8,1,1,N,"ABCDEFG"
A188,152,0,8,1,1,N,"abcdefgabcdefg"
A532,159,0,3,1,1,N,"1"
A556,159,0,3,1,1,N,"8888888888888888"
A188,186,0,8,1,1,N,"abcdef"
A20,220,0,8,1,1,N,"abcdefg"
A188,220,0,8,1,1,N,"ABCDEFGABCDEFG"
A532,227,0,3,1,1,N,"1"
A556,227,0,3,1,1,N,"8888888888888888"
A188,254,0,8,1,1,N,"ABCDEF"
A20,288,0,8,1,1,N,"abc奈奈奈"
A188,288,0,8,1,1,N,"ABCDEFGabcdefg"
A532,295,0,3,1,1,N,"1"
A556,295,0,3,1,1,N,"8888888888888888"
A188,322,0,8,1,1,N,"奈奈奈奈奈"
A20,356,0,8,1,1,N,"奈奈奈奈奈奈"
A188,356,0,8,1,1,N,"奈奈奈奈奈奈奈奈奈奈"
A532,363,0,3,1,1,N,"1"
A556,363,0,3,1,1,N,"8888888888888888"
A188,390,0,8,1,1,N,"奈奈奈奈奈奈奈"
A20,424,0,8,1,1,N,"ABCDEFG"
A188,424,0,8,1,1,N,"abcdefgabcdefg"
A532,431,0,3,1,1,N,"1"
A556,431,0,3,1,1,N,"8888888888888888"
A188,458,0,8,1,1,N,"abcdef"
A20,492,0,8,1,1,N,"abcdefg"
A188,492,0,8,1,1,N,"ABCDEFGABCDEFG"
A532,499,0,3,1,1,N,"1"
A556,499,0,3,1,1,N,"8888888888888888"
A188,526,0,8,1,1,N,"ABCDEF"
A20,560,0,8,1,1,N,"abc奈奈奈"
A188,560,0,8,1,1,N,"ABCDEFGabcdefg"
A532,567,0,3,1,1,N,"1"
A556,567,0,3,1,1,N,"8888888888888888"
A188,594,0,8,1,1,N,"奈奈奈奈奈"
A20,628,0,8,1,1,N,"奈奈奈奈奈奈"
A188,628,0,8,1,1,N,"奈奈奈奈奈奈奈奈奈奈"
A532,635,0,3,1,1,N,"1"
A556,635,0,3,1,1,N,"8888888888888888"
A188,662,0,8,1,1,N,"奈奈奈奈奈奈奈"
A20,696,0,8,1,1,N,"ABCDEFG"
A188,696,0,8,1,1,N,"abcdefgabcdefg"
A532,703,0,3,1,1,N,"1"
A556,703,0,3,1,1,N,"8888888888888888"
A188,730,0,8,1,1,N,"abcdef"
A20,764,0,8,1,1,N,"abcdefg"
A188,764,0,8,1,1,N,"ABCDEFGABCDEFG"
A532,771,0,3,1,1,N,"1"
A556,771,0,3,1,1,N,"8888888888888888"
A188,798,0,8,1,1,N,"ABCDEF"
P1,1
Saudações,
Eu segui os passos acima e tudo correu bem. Você teria algum exemplo de como usar o serviço afinal? Vejo o código JavaScript gerado, mas não estou certo sobre como utilizá-lo.
obrigado - Gustavo
HI
I AM TRYING TO USE the project but this send problem with
Error 1 Could not load file or assembly 'Microsoft.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified. C:\Documents and Settings\msam\Desktop\atlassites\fileupload\web.config 39
i have the last version ajax
some one can help me
i need implementar upload without postback
thansk for the time
Claro, sem problema. quando quiseres chamar o servico numa pagina js, basta fazeres algo do genero:
ITest.MyOperation1( "Luis", succeddedCallback);
function succeededCallback(res){
//res tem o objecto retornado do servidor
Hi2all! Can me anyone give a little help?
How could I debug atlas to find out where the exception is thrown?
I've got a gridview in updatepanel and there is a linkbutton, when I click it, atlas alerts with exception message, but I can't determine why..
The exception is thrown only in IE6
Thanks for this useful information:
Actually i am trying to call a WCF Service from a SilverLight application. Silverlight provides add webreference but i cann't get the object of reference and hence can not call the WCF service..
Would you please highlight more upon your writeup.
Have you tried this in Firefox? (hint: remove the DOCTYPE...)
honestly: no :) as always, you're right.
Managed Hosting, Colocation and Data Center Services by victoryushchenkonashpresudent ...
Hi, Can you upload your sample code here?
Pingback from Internet Broker WebLog » Blog Archive » Da Chronic NewsBoard -
I tried to save .pcx graphic into printer with GM command. But it looks no working. Could you pls tell me how to save graphic?
HI!
can you use AutoCompleteExtender in a Master page?
I can't seem to get it to work...
not sure on what's your problem, but you should be able to do that.if you're strying to set the style, then use max's tip
I noticed Nikhil's does not leave the address bar looking so ugly/scary , will microsoft address this?
Cause if they dont I'm to horrified to use it.
MSN I NIIPET
<a href= http://msn.com >MSN</a>
eye and easy to You excellent very on navigate. an have site the ,
Heya,
Any idea why this would be an issue only in some browsers? I have an application that works fine in IE, but throws this error in Firefox. I've double checked the assembly path and it looks good.
Hello, nice site look this:
+1 Interesting theme I can place it with myself on blog?
End ^) See you
If you want to see some C# pushed to the limits check out what my C# syntactic macro system can achieve:
www.aboutcode.net/.../Tier+Splitting+C+Screencast.aspx
Hello Andrew.
yeah, it seems promising and i'll check it out later. thanks for the link.
Hello! Good Site! Thanks you! gegisbiuwfcwwk
Por acaso o de AJAX ainda não comprei, mas tenho o de ASP .NET 2.0 e acho que me ajudou a perceber algumas coisas do ASP .NET.
Ainda sou novato (1 ano) nisto do desenvolvimento Web), mas já fiz um portal aqui para a empresa que trabalho e acho que ficou bem catita.
O de AJAX ainda não olhei para o rapaz, mas numa das minhas idas à FNAC eu vou dar uma espreitadela a ver se me interessa.
Uma coisa à parte, estou fartinho de procurar um emprego como informático aí na Madeira(sim sou do Continente e quero ir viver para a ilha da Madeira), mas não consigo achar nada, se souberes de alguma coisa diz-me.
A continuação do excelente trabalho.
oki, mas previno ja q o mercado aqui n e la muito (especialmente a nivel de desenvolvimento)
Yeah I've heard those explainations... never really thought of it any other way.
If I'm not mistaken, in music "C Sharp" is the same as "D Flat". Good thing it isn't called D Flat.. yuck.
As for why its called "C", thats a bit more interesting. There were languages A and B, too... someone wasnt very creative with their naming.
I shall call it, A!
Shrug :) Somewhere out there there's a big diagram of all the languages and what they were influenced by. Too lazy to fish it out of the cloud right now...
D flat: lol
yes, i've seen it too. someting along these lines
people.mandriva.com/.../diagram.pdf
though this isn't really one of the best i've seen.
as i've said, if there's any more theories on this, please share it with us :)
Nice post, I didn't know about the behavior with rsp files
I also like that it's pronounced "See sharp". I guess proper grammar would be "See sharply".
Here's the skinny on why the original was called C: "It was named "C" because many of its features were derived from an earlier language called "B", which according to Ken Thompson was a stripped down version of the BCPL programming language."
en.wikipedia.org/.../C_programming_language
Its all about your style of coding. It depends on individual. I prefer int i=10;
Well, yes it's a matter of style. Nothingwrong with using it if you really know what you're doing. however, you cannot deny that using the correct type name will make your code more readable and less error prone.
I'd really prefer that the c# compiler wouldn't have defined those keywords for the FCL type.
I suppose you also use System.String instead of string, right?
And you plan to use:
collection.Select()
instead of:
from collecction select
:D
>msmvps.com/.../c-should-you-use-the-simple-type-aliases.aspx
wrong, wrong. you see, I only need to use String since we have the using directive. I'm not saying that we should use the complete name of the type. only that we should be specific about it.
> collection.Select()
not sure. you won't believe me, but i've installed vs 2008 beta 2 in 2 different machines and i still haven't managed to have intellisense for the linq expressions :D btw, and since you're mockering the extended methods, must i remind you that you can't really access all the available funcionality with linq syntax?
small adenda to the previous comment:
should be
>I suppose you also use System.String instead of string, right?
Hello! Good Site! Thanks you! niyorrasggsxb
trust me it will come to some use :)
great examples
Thanks That was helpful
If you mo-fo's don't know the answer, just say so..!
Some of us would actually appreciate the help.
Hi! It`s no bad.
See my site too!<br>
<a href=" car-detail.infocatalogs.info/car-detail-undefined-used.html ">car detail undefined used</a><br>
Bay, bay.
<a href=" ford-tractor.infocatalogs.info/ford-9n-tractor.html ">ford 9n tractor</a><br>
Bay.
I had this problem and it was because i had a space in my project name "Silverlight Overview". It was creating a "Silverlight Overview" dll file but the dll being referenced in the Page.xaml was "Silverlight_Overview" (notice the underscore?).
If I changed the dll file to use an underscore instead of a space it worked but of course screwed up my Visual Studio 2006 project files. So I recreated the Project as "SilverlightOverview" and it worked fine.
It's alpha software for a reason I guess :)
Good one.....
Could you extend your solution? Mainly the public scriptable method in your canvas. That would be great for me.
TIA
Deza
Thanks a lot luisabreu!
For more then 2 weeks i was searching a way to add usercontrol on a page dynamically, where the main page and the user control both have update pannels (sort of nested update pannel). What was happeing in my case is that as soon as i call the submitt of my user control the entire user control was disappearing. Now with your solution it is working fine. Thanks a lot once again.
Hi ,
I'm not a Nhibernate jedi, but in order to save the object you should commit the transaction or flush the session.
calling session.save is like telling nhibernate : persist the data when you think is right . flushing the session (or committing the transaction) forces Nhibernate to persist. p.s. transaction.rollback in the middle is making a big mess there...
p.p.s an automatic way to create the database schema via code is :
Configuration cfg = new Configuration();
cfg.Configure(DB_PATH);
NHibernate.Tool.hbm2ddl.SchemaExport se = new NHibernate.Tool.hbm2ddl.SchemaExport(cfg);
se.Create(false,true);
Hello Daniel.
Yes, i know what you're saying...however, do notice that even though the code might not make lots of sense, but it still doesn't explain how the cascading isn't being performed on the inner component collection as it should. in fact, that's why i get the inner collection elements persisted even though the mian element isn't.
I only have experience with Java Hibernate, but I am assuming the APIs are the same. If you want to change the default behavior of how that works, then you can just change the FlushMode on the Session. I believe in your case it sounds like you want FlushMode.ALWAYS, so that the SQL is executed when you make the call to save.
Hello Eric.
I'm not sure if i'm esplaining myself correctly, but to me the problem is that I have an entity which is saved to the db by using an existing transaction. the main problem is that a save operation on this entity should affect 2 tables, and so i expected to find all the necessary insert statements inside the same transaction. unfortunately, i'm not seing this. for instance, in my scenario (it was a simple test), i had something like this:
begin tran
session.save(myentity)
roll back tran
ok, for this simple scenario, the logs showed something like this:
begining ado.net transaction
generating insert command for main table
rollback
what's the problem? well, in my opinion, the logs should have something like this:
generating insert command for secondary table
in fact, that is what happens when you have an entity has a collection of other entities. but it does not happen when an entity has a collection of components! to get the behavior i want, i need to do something like this:
session.flush() ---> this generates the sql for the secondary table
again. i really know little about nhibernate, but if i'm wrong about this behavior, then i'm really ready to drop it and go back to writing sql...
Without defining a flush strategy, it is not guaranteed to work like the way you want it to. If you look at Section 10.9 of the Hibernate docs (www.hibernate.org/.../objectstate.html- again I am assuming that NHibernate works the same) it states:
"Except when you explicity flush(), there are absolutely no guarantees about when the Session executes the JDBC calls, only the order in which they are executed."
You pretty much have to call Session.flush() or commit the transaction to guarantee that any SQL will get called. It is not even guaranteed that the SQL for your entity gets executed when you call save(), it gets happens to work like that.
Hibernate takes a little getting used to, but my experiences by far have been more positive than negative. Especially when you are working with an existing schema and generate your mappings and validations from it. Good luck =).
i totally agree.. Why have a non-standard dialogue box that is so confusing? I love the new functionality but the presentation needs work
Hello again Eric.
hum...yeah, i understand what you're saying. now, the problem is that something like this (even though it's completly wrong):
session.save
rollback tran
session.flush
should never never persist the items of the collection maintained by the entity in the db table (and in nhibernate - not sure if that is the case with hibernate) it happens. that's why i'm so pissed with it. as i've said before, if you have a collection of entities (instead of components) it works as it should...but again, maybe next wekk i'm feeling alittle better :)
thanks again for helping me!
I think the problem is really more one of sematics. It was confusing to me at first to call 'save' and then not actually have a persisted object. What is important to remember with NHibernate is its concept of a Unit of Work, so that when you call 'save' you are actually saving it to the current Unit of Work, which will be flushed (synched with the db state) either transparently or manually by your application. Once you start to work within the context of a Unit of Work/Identity Map things with NHibernate start to clear up.
I found this one based on Wıkıpedia: <a href="bluebones.net/.../a>
<br>
and this has the dates: <a href="www.levenez.com/.../">Computer Languages History</a>
I still think that i'm not explaining myself correctly here...if you run the sample i'm talking about and perform the session.flush after the rollback, you'll end up with the wrong result. to me the problem is that if you're generating the insert instruction for the main entity, then you must also generate the other inserts since you must garantee that they are all commited or aborted. this isn't really the case when you're using nhibernate.
Great, but I have an another problem.
I have been trying to set programatically visible and unvisible of some Controls in my WebPage. On this Controls there are UpdatePanels.
On each control - one UpdatePanel.
I have to set visible = true/false in "Page_PreInit" method, it works on single test site, but...
In my project I have a MasterPage, and in method Page_PreInit a reference to my control is null, so I can't change visible, and masterpage has no PreInit method.
How to solve it ? Maybe you know some other solution to dynamic hide controls with updatePanel in it.
Can you print this character on y our Zebra?
The division sign ÷
Is it possible to pass parameters to the js function from managed code and get any returns?
I'm trying to get/set some cookies from my silverlight app - but have not figured out a way to do this as of yet...
I get the following error Unrecognized attribute 'messageEncoding'
I was wondering how would you apply this drag-n-drop but instead of it object sundenly snapping to the top left hand corner of the element have it remember where within them element was clicked and keep that as the point at which the object is moved
Emm not sure if i made any sense just imagine you clicked 2/3 at the top of the rectangle how would you keep that point as the point of movement?
I'm sure that a chance to drive a 8C would be enough to put Luís on a plane!!!
yeah! btw, if it could be arranged, I'd prefer that we'd all go to the Canarias Island since the flight time from here (Madeira) to there is around 55 minutes :) (and it has some nice hotels that work on the everything included model ;) )
Congratulations Luis!
I'm curious, can you please give me a brief explanation (or maybe point a link) on how this MVP thing works? You have to apply or Microsoft contacts you ? (not that I want to be a MVP, I don't have all that knowledge :), just curiosity)
Best Regards!
you can get all the info about it here: mvp.support.microsoft.com
I have had this problem too. Here is my workaround:
1. Maximize Safari on second monitor
2. Press ALT+SPACE to drop down context menu
3. Press M to select Move
4. Use LEFT key to move Safari into position
5. Press ENTER to set position
Hope this will sort you out for now: it is a little better than having to fumble with that grip in the bottom-right corner of the window!
Interesting stuff.
I believe this is something which some of the .NET obfiscators seize upon. Because overloading on return type is fine in MSIL but not in practically everything else, changing a method name so that it creates an a new overload on return type means it can't be dissasembled back into something like C#.
Easy to follow the concept. Thank you
Good writeup, Luis. I'll probably post more info about TransferRequest in the near future, as its not very well documented at all at this point.
The most interesting area is TransferRequest as general replacement for RewritePath, as there are some very interesting scenarios where RewritePath does not give you what you want, even in the Integrated pipeline.
yeah, that would be great. btw, one question about the iis.net site: can we trust its docs section?
I believe that my test worked well because I hadn't Global.asax file in my sample application.
Hello Israel.
Yes, you're right...It took me several hours to be able to reproduce the bug. In fact, I had to start removing everything from my app until I stop getting the error. Unfortunately, the global.asax was the last thing I removed :)
In Fiddler settings, disable IPv6 support.
Hello Dave,
yes, that is the best option (and that's what the link says). Another option is to disable IPv6 on vista (which would envolve removing the checkbox on the network settings and fiddling around with a registry key)
The articles on IIS.NET are the best source of information on IIS7 so far, but some of them are outdated. Be mindful of the article update date and the tested with build to know how up to date the article is.
Also be mindful of the differences between Vista and Windows Server 2008, which will be there until Vista SP1. Until RTM, the server release is also in flux so at times the product is ahead of the articles.
I also try to cover special topics of interest on my blog, http://mvolo.com. If there are certain topics you'd liket to hear more about, let me know.
Thank you. GREAT STUFF
hi! I'm looking for compiling of rsp files.How can I write that files and how can ı run that that files?
Can you help me,please?
My e-mail is bsertugrul@gmail.com
rsp files are simple text files where you put the options you want to pass to the csc compiler (one per line) . I'm not sure on what you want to know...
Also, if you're creating a component, you should consider yourself responsible for disposing of it. True, if you added the component to the application (which is not an obligation for nested components), the app is going to do the disposing eventually, but as a component developer, how do you know when this is going to happen? So as a responsible component developer, you should dispose of everything you created from your own dispose method.
I agree with you. however, in that case, I think that adding the component to the component collection is really optional, rigth?
Could you post your config files to use them as an example?
any chance of working source code. COuld you send it to me at sachabarber@hotmail.com
This still postbacks . Am I doing something wrong ?
I can still see the progress bar in the IE bottom right corner.
Actually, the format of either the request or the response is already defined on the contract by leveraging RequestFormat and ResponseFormat properties.
The webScript behavior is just there for compatibility reasons with ASP.NET AJAX and is not needed if you want to have plain JSON support (which is defined on the contract, as said).
Why is it on the contract and not on the binding? Well, the semantics of XML and JSON differ significantly and it is really a decision of the contract modeler - JSON (the infoset, if you like ;)) does not support the full feature set of XML, and this is by design as we all know.
Hello Christian.
Thanks for the clarification. btw, any comments on the response being "wrapped" on an anonymous objecto which has only one property that points to the returned object? here's an example. suppose i had a class called person which was returned from the method. it has only 2 proeprties: Name and Address. in beta 1, i used to get somethjign like this on the client side:
{ "Name" : "Luis", "Address": "Fx" }
which is the exact representation of my object in JSON.
In the current release, I'm getting something like this:
{ "d":{ "Name" : "Luis", "Address": "Fx" } }
maybe I might be failing to see the obvious, but i'm still not sure on why this is being done...
Hm, this doesn't happen for me. Pls send me the code cw __AT_ thinktecture.com
hum...not sure on why but it seems like i was having a problem with my old project which was created with previous beta version of vs. i've copied the files to the a new web site project created with 2008 beta2 and everything is working smoothly (ie, it still receives the the anonymous object with the d property i was talking about but in this version the callback js method gets the correct object). thanks again.
[1]PHPonIIS7w/FastCGI(IIS7中的PHP和FastCGI模块)
最新版本的IIS7.0即将随着WindowsVista一同发布,在极大增强了其主要支持的ASP.NET...
Pingback from Silverlight and JSON « Tales from a Trading Desk
Pingback from dashda » Blog Archiv » Deployment problems with ASP.NET AJAX applications
hello i'l wanna study ajax.. and i'l to know where i can find some example and book !
tnx !
Pingback from Ghillie Suits » Calling a WCF service from your Silverlight application - LA.NET [EN]
Pingback from ASP.NET AJAX: some ideas on how to export the contents of a …
While you can easily use XML web services in your Silverlight applications, working with WCF is much
Pingback from software configuration management » Changes on the configuration of WCF to use JSON
I don't quite get everything that you say. Can I get a full sample?
My email address is CheeSiang.Sim@acs-inc.com
I spent a few days stuggling with this as well. If you are still having issues, I put together an end to end example on getting it working:
http://erichauser.net/?p=33
It would be nice to see some documentation on the serialization model though. Lots of trial and error in getting that hacked out.
Great post Eric.
thanks for sharing it...
I think a really important point about var is that it is made necessary by anonymous types, which themselves are necessary for Linq. So it's not just random syntactic sugar to make C# look more dynamic, it's an essential part of a very nicely thought out puzzle.
hello Bertrand.
yes, i agree with you. that why i said that i still haven't build any LINQ aware applications :)
So a postbacktrigger is there just to make sure controls within an update panel can do a full postback? Is that what I'm understanding?
what is PrintingRotation and PrintingMultiplier ?
how to print chinese font?
I believe you can use /// <field> xml-documentation in your prototype (no matter where the field actually is initialized).
forums.asp.net/.../1946825.aspx
You posted to me and helped me on that thread. Now I read your blog all of the time. Thanks!
Yes, that really seems like a better option. I've noticed several /// entries on the asp.ent ajax client libs, so i thought that those entries should be used. Anyway, I was jus complaining about the approach that was offered in the JScript blog :) if i'd had to do that for getting intellisense, i'd really prefer not to have it...
I don't know if you'll check this, But I have an interesting one for you:
I have nested datalists (master-detail) set up to appear like an explorer window and when you click the master it shows the div that was hiding the detail items. I am trying to get the detail to do a partial page update when it gets shown.
my update panels are named dynamically and so are the triggers. how do I assign the triggers to specific panels through javascript or in the code behind?
thanks,
--bart
yes, i do read the comments, but sometimes i do take some time to answer.
regarding your question, if you're adding trigers from the code behind, then maks sure you add them until the init event (if i recall it correctly, doing it after won't work correctly).
from jscript, it's really simple, you just need to submit the form by using the good old __doPostback methof and passing the client id of the update panel:
encosia.com/.../easily-refresh-an-updatepanel-using-javascript
hope this helps.
Hurray! Pete has just announced this on his blog . Good news for the SL ASP.NET controls I've kept
Pingback from RodeoFive » Deployment problems with ASP.NET AJAX applications
Recently, along with a few others , I've received the honor of joining the ASPInsiders . It has been
The ASP.NET AJAX platform has some client services which you can use from your client Javascript code
I am trying to use a duplex service in Silverlight. Is that possible? If it is may I know how?
Hello! Good Site! Thanks you! iqombeemhsohd
Hello! Good Site! Thanks you! vovafkhfpbr
Hello! Good Site! Thanks you! tkodfwiwrih
Luís,
Muito obrigado, seu código foi de grande ajuda.
Abraços,
Alessandro
Pingback from MSDN Blog Postings » SoCal MSDN events for Web Developers - slide deck and links
Presentations given in Irvine and Riverside, CA - here's the deck and links for more information about
Pingback from Thoughts on Silverlight » BIT-101 Blog
it sucks. See how easy is to drag stuff in Flash.
energosnabzhenie kvartiry blagoveschensk arenda kvartir 2 aya kvartira kupit kvartiru predlozheniya <a href="betaflat.com/">arenda kvartir peterburg bystro</a> kuplyu 1komnatnuyu kvartiru oformit pokupka kvartir ekaterinburg sdat kvartiru marksistskaya rynok kvartir sankt peterburg
nedvizhimost sdayu tomsk nedvizhimost sdayu tomsk <a href="omegaflat.com/">nedvizhimost sdayu tomsk</a> nedvizhimost sdayu tomsk nedvizhimost sdayu tomsk nedvizhimost sdayu tomsk
Thanks for identifying the cause of the problem, but I don't understand how to fix. Using VS2005, what do I need to do in property pages? I used to have my app running but since i installed VS2008 it doesn't work when I publish to server.
in this case the problem was that the web app is configured to user .net 2.0 but the ajax toolkit dll taht was copied into the bin folder was compiled against the 3.5 version....
Really Good Post.......Cheers!!!
[Update: this will only happen if you don't set up the web.config properly. You don't need to
Just put a panel in the UpdatePanel and add the user control to it. Works fine :)
But, 'panel' can't be found in javascript while runing in IE. Why?
The command on JS such as :
onload: onLoaded
// to hook up a function
my JavaScript engine alway throw out a message like:
"c.charCodeAt is not a function"
How do I solve it ???
BS
Hi. Thanks for the post. But unfortunately I cannot make this code work. I can see that the SetAuthCookie method does set the cookie but afterwards no access is allows to the secure items. I mean, the forms authentication ignores the cookie set... or misses something else... I don't know... Even after successful authentication I am stuck to the login page no matter what I do. Any ideas ?
Unable to make the SilverLight application transparent while seeing its content over my HTML web page.
As you can see
I did use your properties above
chipl,
onload: onLoaded -> onLoad: onLoaded
notice 'l' and 'L'. ^^;
Kevin: try to add width and height attribute, I have the same problem and i notice that firefox dosn't display canvas without height atribute.
Hello there, I am currently writing my thesis on rich web apps with silverlight... the 4th point( calling cross domain..) is actually burning me up... i tried to test to download an image from another server, not hosted on my machine and silverlight complained about runtime error...How can i pass through this..?
samuelbalcha@hotmail.com
I am using Visual Studio Express 2008 when I save to a .cs I get 2 other files (3 Total) Example.cs Example.Designer.cs Example.resx. Which one am I compiling? Everytime I try to compile Example.cs I get some error The name or namespace "Linq" does not exist in the name space 'System' (Are you missing an assembly reference?)
Jon, you're probably adding a new form item. that's why you get 3 items. you're supposed to compile the cs files and you do need to pass a reference to the dll that has the linq namespace. btw, if you're using VS express, you can build your project from within the environment. You should use it whenever possible. I only wrote this post to show some basic concepts which many still don't know...
I used to do it all the time, it's even part of the code standard I developed for a company I worked for. One of the reasons for using "this" is that it immediately opens the intellisense dialog, another is that it's easier to see what are member fields and what are method variables. However I've recently started to move away from this habit because it makes refactoring a method from being an instance method making it static a tad harder since all calls to the method has to be updated.
However as I think of it now, I think that's a silly argument and that the arguments for outweighs the arguments against, so my answer is simply. I use it.
Pingback from AJAX coding school » Blog Archive » AJAX Code [2008-01-06 10:28:33]
Pingback from AJAX coding school » Blog Archive » AJAX Code [2008-01-07 08:18:00]
This is a nice explanation.
I was stuck for 3 days finding a way to add a user control dynamically to an update panel. I used the notation "new Control1" instead of LoadControl("Control1.ascx"). That was my trouble. I found no explanation to this behavior but finally am happy to find a solution.
Thank you Luis!
Pingback from AJAX coding school » Blog Archive » AJAX Code [2008-01-08 03:19:38]
<a href= http://index1.sdsob.com >curtis w lassiter</a>
Thank you for this example!
Something interesting happens when I change the size (fontSelection) from 4 to 5, it jumps in size to gigantic. I'm trying to understand how to get a little bigger than size 4.
I figured it out. I set the size to 2 and both PrintingMultipliers to two.
Thank you again for the wonderful example!
<a href= http://index1.sdsay.com >breast nodularity at a posterior depth</a>
<a href= http://rpz3zmr75a.com >Google</a>
I found this post after running into similar issues with the CompositeControlDesigner.
I found a simple solution in the Microsoft's Composite Web Control example (msdn2.microsoft.com/.../3257x3ea.aspx). The solution is to override the CompositeControl's RecreateChildControls() function. The function should look like:
protected override void RecreateChildControls()
EnsureChildControls();
To understand why this fixes the issue, take a look at the CompositeControlDesigner's CreateChildControl() function.
<a href= http://index1.gofjf.com >frederick douglass biography</a>
<a href= http:// >Google</a>
<a href= http://ezgwa.com/ugtytgty.html >Google</a>
need silverlight for vs 2005
This is great as the LinqDataSource is a wonderful RAD tool but useless in a Tiered application. Now we can return List from the DAL and still use the LinqDataSource.
ASPInsiders commented that you need to set up web.config properly. What specifically is wrong or needs to be done with it?
Has anybody noticed the increased PreRenderComplete times when using this control? My best guess is that there is some expensive operation during this method when trying to combine scripts. The implications were significant within our app. Script combination only saved a *fraction* of total download size, where I gained .7 seconds on the server for rendering this script. Definetly a deal breaker.
Welcome back, we forgive you!
I don't. You left. Now, keep out.
I think anyone who acts negative towards a blogger is ridiculous... Bloggers like this take time out of their professional lives to help everyone with problems they encounter. It's very rude to say negative things to people who help you, would you be rude to a calculus teacher who shared what they did last weekend? (Keep in mind the teacher is teaching for FREE)
Welcome back, Luis!
im getting cross domain calls are not supported byHttpWebrequest error.how to resolve this error
Hello,
Thank you for this beautiful solution! I have a question though:
I'm trying to raise an event from the ASCX and capture it on the ASPX.
The event is raised properly (I can see it on the debugger) but for some reason the ASPX does not capture it.
My code on the ASPX page is:
Protected objAscx As New ascx1
on page_load:
AddHandler objAscx.SaveForm, AddressOf SaveForm
Protected Sub SaveForm()
'Some code here
End Sub
Luis, tudo bem? Eis a solução:
www.brunokenj.net/.../utilizando-servertransfer-e-aspnet-ajax-10
abraços!
Boas Luís. Parabéns pelo lançamento. Tenho a versão anterior que já me livrou de muitas horas de pesquisa :)
Tenho uma dúvida: Tendo o livro anterior e além da passagem do 2.0 para 3.5, que mais diferenças o livro apresenta? (por míudos: vale a pena comprar este tendo o outro?)
Cumprimentos,
Bruno Moniz
Ola Bruno.
Uma pergunta de dificil resposta :)
Para ajudar, posso fazer um pequeno resumo com as alteracoes que foram efectuadas. A nivel de conteudos, foram adicionadas paginas aos capitulos existentes com exemplos dos novos controlos e funcionalidades introduzidas pela ultima versao, foram corrigidos alguns bugs do texto e foi tb adicionado um novo capitulo sobre asp.net ajax.
so tu podes decidir se vale a pena investir no livro :) recomendo que passes numa livraria e des uma olhadela ao novo livro.
Obrigado pela resposta Luís. Pois talvez a melhor opção é mesmo passar numa livraria :)
Adquiri os 2 livros anteriores (asp.net e o de ajax), são ambos de fácil leitura e com muitos exemplos, o que ajuda sempre neste tipo de livros, não sendo livros "maçadores".
Tenho de dar um salto àquela loja que começa por "F" acaba em "C" e pelo meio tem as letras "NA" e dou uma vista de olhos.
Quando é que lanças um(ns) livro(s) sobre asp.net mvc, silverlight e linq? ^_^''
Keep up the good work!
Tenho de dar um salto àquela loja que começa por "F" acaba em "C" e pelo meio tem as letras "NA" e dou uma vista de olhos no novo livro.
Thanks a ton dude. :)
You are my hero.
luv u.
Parabens!, gostei muito do livro de Ajax. Espero ler o livro e perceber as maravilhas do LINQ :P.
Em relacao ao LINQ, acho q deves ficar em stand by...podem haver noticias nessa area nos proximos tempos :)
Thank you. I spent two hours on this before I found this post.
I am getting the following error after executing the code
Failed to generate a user instance of SQL Server due to a failure in starting the process for the user instance. The connection will be closed.
If I'm not mistaken, the code uses SQL Express 2005. Do you have it installed in your machine? If you have another version of SQL Server, then it should work too: you just need to change the connection string.
FOR GOD.... WRITE THE DAMN SOLUTION
Well if you know a solution to play local files with silverlight please let me know. Can Silverlight open an XML file from the disk and use it?
I'm getting an error message when trying to view a live baseball game on MLB.TV on the 1.2 MB stream. The message is as follows:
Silverlight error message
Error Code: 2203
Error Type: RuntimeError
Message: AG_E_RUNTME_SETVALUE
MethodName: Source
How do I fix this?
Thanks for the post!
Thanks a lot, I was looking for the Ajax solution for quite a while!
We can use the cross page posting to make similar functionality of Server.Transfer
here is an interesting post
forums.asp.net/.../1391157.aspx
Yet another example of how broken ASP.NET is.
Why design this great component model, yet not actually build in the flexibility to use it properly?
It makes building web applications ultimately take about 100x as long, rather than saving time as it's supposed to - since I seem to spend all my time figuring out how to work around ridiculous inflexibilities like this.
I can't use the Page_PreInit event to insert my user control containing the update panel - because Page_PreInit has fired *way* before my other nested controls are ready to set themselves up.
Microsoft recommend that dynamically-added controls should be added in the Load method. This dynamically added control contains a templated control, which in turn instances a further user control within itself - sometimes this control will also contain an UpdatePanel. I simply can't do this at PreInit - the other page controls that I need to insert into aren't available at this time.
Don't know what to do but somehow I will kludge this mess, then wait for MVC toolkit to drop so I can start building things *properly*.
yeah, the web forms model has some gotchas....
but do notice that you can still add the UpdatePanel during the load event. what you cannot do is add/remove/add again after the event i've mentioned...the problem I'm describing happens because there are some cases where a control (which internally contains an UpdatePanel) is initially added to an existing control, then removed and then added again to another controls's collection. if you do this, then be sure to do it until the preinit event.
If you're just adding a control to the page (and you're nov removing it/adding it to another place later) you should be able to do it until the end of the load event...
HI,
i have tlp 2844 and working with Serbian language, but my printer can't print some serbian characters. č,ć,ž etc.
I've tried the I command (codepage1250) like:
I8,B,001
but it still doesn't print. Can someone help me with this please?
OK. I've been working on this for 2 days, and scouring the forums for answers. I hve found many and
I am getting the same message amd MLB said it was my problem
Well, as som have said, there's a lot of complaining about this issue, but I can't see solutions, plx! if someone has a solution, post it here, I really need it, and well, I'm still lookin' for it, so if I get it, I'll post it here for sure.
My problem is:
aspx-contains the follow:
scriptManager1
updatePanel1
ascx1{updatePanel2[ascx2]}
when I try to update updatePanel2, I got that error...
By the way, my ascx 1 and ascx2 are loaded in the Page_Load cuz they are dynamic too...
PLX! HELP!
But did you actually get this code to build ?
In VS2008, I get two errors :
1. 'Dummy' in explicit interface declaration is not an interface
2. 'CSharpGotchas.Dummy' does not implement interface member 'CSharpGotchas.IDummy.Increment()'
So I guess the correct answer should be that it won't compile !
But if you replace :
void Dummy.Increment()
with
void IDummy.Increment()
then it does compile
Great!, can you document details step by step please. Thank you.
I have migrated to .Net 2.0. There are some custom controls on the page including form and panel. This controls are mandatory for the page and form. Now while I want to implement ad ajax withih the page I get this error. How to deal with ajax and custom control in VS 2005. Any suggestion will be appriciated.
Please help
aspinsiders, please clarify...
I did what you recommended, no luck ('Always' and false visible updatepanel).
Hello guys,
ASPInsiders is the aggregate feed of the asp insiders group. If you follow the link, you'll see that it's another post by me that talks about problems with the authentitcation services that will occur if you don't set up the web. config correctly. In this case (ie, regarding the code example that is presented on this post), you don't need to do anything to the config file.
How does that relate in any way at all to Silverlight? Sorry for my confusion, but I don't see the connection. Have you actually tried Silverlight? I am very pro-FOSS, but its a decent platform to code in/for, whatever.
Hype. that's how it's related to SL. Both technologies are great, but they simply don't justify the current hype around them.
Regarding your question, yes, I have tried SL a long long time ago. I did knew something about it, but I must admit that I haven't really tested the latest beta version. I intend to that in the next days though.
Just to make my point clear, I'm not agains it. only against the hype which tries to push it as the best platform for the web.
need to add mlb.com to you trusted sites (this seems to be a Vista issue, since did not have same problem on my XP computer)
In Internet Explorer --> Tools
Internet Options
Security Tab
click on green check "Trusted Sites"
click SITES button
UNCHECK the box that says "Require servier verification..."
to add ALL the mlb sites, type http://*.mlb.com in the box and click add.
You can get them from here (VS) and here (.NET). I'm reading what's new on Brad Abrams post and
Great! I am glad you like these features... On the Combine scripts, what is cool with the work we did in the platform is that it can combine even the system scripts! It is also nice to have it built in.
I read your page, its really good. I also had the same problem. Mine solved by deleting the line
<%@ Register Assembly="System.Web.Extensions, Version=1.0.61025.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
Namespace="System.Web.UI" TagPrefix="asp" %>
Then I changed it to
<%@ Register Assembly="System.Web.Extensions, Version=2.0.50727.1433, Culture=neutral, PublicKeyToken=31bf3856ad364e35"
But I still receive the same error so finally I deleted this. Now Ajax and the page , both are working fine.
I am doing this in the Global.asx.vb:
Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)
Server.Transfer("Error.aspx")
This works for non ajax errors but it fails for my ajax pages. I need to do a transfer rather than a redirect because I need the context error from the CLR which can not be passed through a querystring that the redirect would need. The other option would be to conditionaly opt out of the Server.Transfer for partial post backs in the global.asx. Anyone know how to tell if we are in a partial post back in the global.asx? There is no page context or script manager there.
Now that we know the basics, it's time to see how we can use this new API with LINQ. In this post
I've thought it would be good to post an entry which aggregates all my LINQ To XML entries for future
Now that we know the basics, it's time to see how we can use this new API with LINQ. In this post,
Depends on your needs, I guess...
myitforum.com/.../xobni-gone.aspx
Well, I'm not sure if I'm going to like in in 3 years, but now I'm really enjoying. It just makes using my inbox really easy...
Thanks! I suspected this, but wasn't sure until I found this post.
She had to play this gig or the American tour was cancelled ... well now it is cancelled for sure. Poor, sad Amy not long for this world now.
They used Abstract Classes for a purpose: to do not create versioning problems on future releases.
Take a look at Phil Haack's posts:
haacked.com/.../versioning-issues-with-abstract-base-classes-and-interfaces.aspx
haacked.com/.../abstract-base-classes-have-versioning-problems-too.aspx
It makes sense, right?
Um abraço,
Giovanni Bassi
Yes and no.
I'm not sure that this model is good. I would prefer interfaces with new functionality being added to a new derived interface.
Even though versioning might have been the main idea behind this approach, I still think that the biggest advantage is in testing...
Another reason for abstract class. Is an interface requires you to override all methods while an abstract class you can choose to just override what you want to mock for unit testing.
undev.spaces.live.com/.../cns!6526A337A687E45D!214.entry
Can use this MVC in ASP.NET2.0?
Pingback from Reflective Perspective - Chris Alcock » The Morning Brew #107
Great post. Your obviously highly accomplished in these areas.
I would only add that one emerging pattern to achieve this with far less pain and 'uncertainty' in regard to future support and maintainability is the pattern of:
'Use Extension Methods with Qualified Interface Type for Multi-inheritance Style Extension'
I have seen this written up by a few and I have used this myself (before really even thinking much about it) since I got mt hands on C# 3.0 beta X whatever that was..
public interface IDomainQueryService {
Sorry I accidently submitted. To continue (one arbitrary example - the pattern not the types I use are the idea):
publlic interface IDomainServiceResolver {
TTypeService Resolve<TTypeServive>(params Predicate<TTypeService>[] resolveConditions) where TTypeService : IServiceProvider
That's it. We extending this using extension and IDomainServiceResolve (or IServiceProvider) as a nice option moving forward.
The idea is create an interface with (typically) 1 core element to the functionality. For file services it could be the path, for XML is could be the Stream for the DOM, for images it could be a SystemDrawing.Image....
So for this to work extensions work off an instance, so we need an instance of any IServiceResolver. Here is a simple example assuming it gives us a nice instance of some IDomainServiceResolver :
Predicate<Customer> predCondition = cus => cust.IsActive;
var customerProjection =
Resolver.For<IQueryService>.Get<CustomerRepository<ByPastDueBalanceProjection>>(predCondition );
Ok fine... What if we have addition needs on the interface? Such as for an ability to see if the service is available?
public static TTypeService IsAvailable<TTypeResolver, TTypeService>(this TTypeResolver providerTarger) where TTypeResolver : IServiceProvider {
return providerTarget.ServiceExists(x => typeof(TTypeService));
then
IQueryService serviceInstance = Resolver.For.IsAvailable();
if (serviceInstance.Equals(Resolver.NullService<IQueryService>))
/// do whatever...
I am writing this from memory so I may have missed a . or a ( somewhere. If you like I can send you a more compelling example we use almost every day using this as a factory (it's cool I think):
var _sb = true.InstanceOf<StringBuilder>(); or:
StringBuilder _sb = true.InstanceOf();
or
var _sb = typeof(StringBuilder).InstanceOf(); (you get the idea...)
as true is an instance of bool this extension (instanceOf) simply extends the 'bool' interface....
Damon Wilder Carr
Good example Damon.
Yeah, if you have a simple example, i'd love to play with it :)
Thanks, you saved my day!
Kevin, panel is the id of a control. The author has used IE only syntax, but also if you're using master pages, or the "panel" is nested, the id will change dynamically.
The default membership provider in aspnet uses the "ApplicationName" combined with username/password to authenticate. How does one set he ApplicationName (i.e.; aspnet_Applications table in the database) using client services?
So-called "expert" commentators on local tv here said that a defender cannot be out of play; its the refs job to stop the play in case of an injury. Whether they actually know what they're talking about I can't really say.. :p Either way, it was an awesome game!
that means that when a guy is down and is outside the pitch getting medical assitance, then if he's behind the goal line, then he's putting everyone else of the other team ok for scoring a goal...the offside rule is really simple: it's just one page! and the 2nd page that has the decisions doesn't mention any case of a player being outside the field. So, that only means one thing: outside the field and injured couldn't really count...
You don't. You do it at the web.config file of your site that is hosting the provider...
I have the samay problem and I don't really get the solution to this:
"...Fixing this was simple: they changed the code so that the active user control was loaded dynamically by the page." - You meen what? The resign from using MultiView and dit it another way or they fixed the MultiView solution?
thx
What I'm saying is that instead of using a multiview control, they changed their code so that only one user control exists on the page. To know which control to load, they check a query string parameter and load the control according to that value. So, if you have several components that do complex stuff during its lifetime in each view, then remove the multiview control and just load the controls dynamically during the initial page processing. If you think about it, you'll just need one control at each time, so using the MultiView control in these scenarios won't really giv you much...
It's called football because the ball is 1 foot long. :)
hi
is there anyway to solve this?
ErrorCode: 2203
ErrorType: RuntimeError
Message: AG_E_RUNTIME_SETVALUE
MethodName: Height
thanks!
I think you are missing the point. The class visibility level is, in this case, separate from the method visibility level. Say you have 2 internal classes, and one of them has public and protected methods. Should the other class be able to access protected methods just because both classes are internal? No, it should not. That's why if you want classes to call each other's methods, you either need to make them public or internal. That's why there is no warning issues by the compiler.
Cheers,
- Filip.
Hello Filip.
That's not the scenario I'm complaining about. I'm not saying that all the methods on an internal class should be internal.
what I'm saying is that there really is no purpose on letting an internal class declare a public method since you can apply internal to a class' member. Ie, the "maximum" visibility any member of an internal class will get is internal, which is "less" than public. That's what I'm complaining about.
Well, you already need to be able to allow public methods if you implement an interface (leaving explicit interface implementation aside for the moment).
Likewise an internal class may derive from a public class and override one of its public methods.
I don't see that there's much benefit to prohibiting public methods where they *aren't* useful... and that's even leaving aside the reflection side of things (something may well want to find all the public properties of a class which is internal - binding, for example; similar uses for methods wouldn't be impossible to think of).
Jon
Pingback from silverlight drag and drop
Happy Birthday!
Ayer fue el último día de Gates como "full time" en Microsoft. Encontré una lista de videos
I get a ASP.Net page "hanging" just like you describe if I define the Session_Start event with no code.
If I remove the even, the entire app works perfectly.
This has been the worst problem switching over to Server 2008.
I wonder if it's related to your issue somehow, even though I'm not using TransferRequest?
Lee,
Do what Jen says. Thanks Jen
Hello Jon.
Well, I guess that some of those scenarios are valid.
Now, my problem with letting you define public methods on internal classes is that it doesn't "flow". Let me explain this better: You can't inherit from a base class that "is less visible" that the derived class. Example:
internal class T{}
public class R:T{}
This does "flow". In my limited brain, this does makes sense and I'm failing to see where internal class + public method is really a valid design approach. Again, I'm known for being slow, so maybe in a week or two it starts to make sense.
I have seen several posts on various forums related to this issue, many of which have said the same thing. It doesn't seem to be all machines, just some of them, making the problem even more troubling. To make matters worse I have applied all of the service packs and I am still having an issue.
Is it possible to make a file upload control inside an update panel with an associated updateprogress control work with AsynPostbackTrigger ??
Well, not likely. What you can do is search my blog for some old code that mimics gmail upload feature. The code was written for an older version of ASP.NET AJAX (I believe it was at CTP at the time I've written), so you'll need to port it to the current release.
Pingback from ASP.NET MVC Archived Blog Posts, Page 1
I’ve have just sent this email to the developers exchange group in my company: I think you all know the
ASP.NET routing is a new feature incorporated in the upcoming .NET 3.5 Service Pack 1 release. While
And I guess you refuse to use phones on mobile phones operators? :p
No, no. What I'm not doing is paying 129 euros + 2 years paying 60 euros month for having that phone. I really prefer to pay 200 euros for htc touch and then switch mobile operator without having to google for how to unblock the phone.
btw, I didn't know that you still had time to read the blog:)
Hey Luis, how are you?
Check this blog post on ZDNet, by Mary-Jo Foley (a professional blogger):
blogs.zdnet.com/microsoft
It looks like Silverlight was designed to be search friendly. I would expect that, after all, it's all a bunch of XML, right?
And also, MS still doesn't index flash.
Are we gonna have to wait for the competition to push them a little more, so they will start indexing other companies' technologies? After all, I'd like my preferred search engine to index Flash and Silverlight. Let's wait and see.
Somehow I have a feeling your holding out for the Microsoft Zune Phone! :)
Nice workaround man!
My problem was a bit different though, but this solution helped me resolve it. I was actually creating hyperlinks at runtime which was being done inside a DynamicPopulateExtender. Needed to show the save as dialogue.
Thanks again! ;o)
Who knows :) I've been happy with my htc till now, so I'd say that I'm curious to check the new HTC diamond...
have the same issue...
Well, despite the fact that the post was extremely helpful (and thanks a lot for that), I have to say that it really frustrated me. I came across the MultiVIew control quite recently and was going to use it in some project but being a performance aware developer I always read about anything before I use it and so I came across this post. I really like the idea of the MutliView control because it helps keep the markup (which usually contains more than server controls) in the .aspx file instead of the code behind file, sure I can use inline code (script block with runat=server) but I'm not a big fan of this, I prefer to keep the code in a code behind file. Now, I can't really find an alternative to MutliView (using the panels approach, ie. placing the controls in multiple panels and show/hide the panels as necessary, suffers from the same problem, all the controls will be loaded with every request), is there a way to keep the markup in the .aspx file without sacrificing performance?
> you simply cannot live without Reflector and C# 3.0!
I agree with the Reflector part but why C# 3.0? I use C# 2.0 and I'm very comfortable with it (planning to upgrade soon though) .. but initially I have read about the new features and I don't find any of them really tempting esp. that it still uses CLR 2.0 (but probably I can't judge correctly as I didn't use it), so, what do you like about C# 3.0? (may be you'll encourage me to upgrade even sooner :))
I love everything about C# 3.0 :) You'll see that after using them, you cannot live without them. Linq To Objects is simply great, but let's forget about it for a minute...let's think about lambda expressions! with it I'm able to write a method in place and let the compiler infer types of parameters and return types. Just by using this expressions, you'll end up with some pretty cool stuff.
Do yourself a favor and start using C# 3.0 and then you'll see what I mean :)
You're right that this rule is very debatable and as a matter of facts, our team (ASP.NET) always prefixes private fields (which pretty much maps to fields 1:1 nowadays) with an underscore.
Now, the hungarian notation or m_, no way.
Well, I'd say no. You'll have serious problems with the multiview control specially if your views have controls that perform several database calls. in this case, it's best to have several user controls and only load the current "view" that is shown to the user.
Personally, I'm sticking with "_". I find that littering code with "this." is very distracting.
Thanks a lot for your prompt reply but actually I'm not sure I get the answer. How can I load the current view only? Could you give more details please? Also, is there a way to keep the markup in the .aspx file without sacrificing performance?
BTW, I know it's completely unrelated to the post, so I'm sorry for asking this, but how do you keep spam out of your blog? I don't see any captcha in here ..
well, you need to break up the views into several user controls. then you'll be able to load only one view (ie, only one user control that has the html for the view you want to render). do notice that it all depends on your objective. for instance, if your views don't go to a database to fecth data, then you probably can keep using the multiview control without any problems.
regarding the spam, I'm using community server which takes care of that for me.
Sorry for spamming your blog :) but actually I wanted to say something about the MultiView control. Well, I say it still can be useful depending on how you use it. In my case (as I referred in my previous post) I was looking for a way to keep the markup in the .aspx file, I very often come across having to return some useful message to the user after some action (have a look on my post on asp.net at forums.asp.net/.../2490577.aspx). So, I say in this case I could put the controls needed for this action in a view and add another view for the success message, and instead of showing/hiding panels I just switch the view, seems good to me and it shouldn't affect performance as the controls will be loaded anyway when getting and posting the page, what do you think?
Again, it depends. suppose you have 2 views. view 1 has some code that hits the db (you've put the db cod on the load event of the page) and view 2 has a simple message. If you don't take care, you'll have a problem: even though you're showing the view 2 with the message, the db code will still be run. that's the problem with the multiview control. This might not be a problem, so, as I've said, it all depends on your scenario :)
I bet you like 'Regions' as well...
no comments on that :)
Another reason I dislike NOT having "_" is that a property and its backing field may only differ by the capitalization of the first letter (e.g. Mode and mode). Then, whether or not you use "this", its quite easy for statement completion to give you the wrong reference without you immediately realizing it, and it gets quite annoying dealing with that.
Just as Le Roy said, I don't like hungarian. I actually used it a lot before, but I have changed my mind, because the code gets less readable (in my opinion).
Regarding "_", I do use it, but I have also been using "this" to prefix the field names, just because it gets clearer. The same thing to point to class names outside the assembly: I use the "usings" directive quite carefully, because I want to know where that class comes from, most of the time. Unless the namespace is just really big, then an alias usually solves the problem.
Now, with this post from StyleCop you pointed, I am considering dropping the "_", because it makes sense if I am already using "this", anyway. The problem is that I might forget to use "this" and end up with the wrong variable... but I think that would be very unlikely.
And I don't particularly like the "m_". Its just ugly and makes the code less readable, just like hungarian (again, in my opinion). Anything that gets it more like human words and less like machine words is worth considering.
I don't use hungarian either (altough I think that the definition of hungarian notation would be another interesting "religious war" post), but I prefer to use the _ convention to the this convention. As I said, it's all about personal style :)
For those who need _ to know that it's a field, how do you know when you are accessing a local varible or a parameter?
I really can't understand the use of "m_" in .NET.
If you need to prefix stuff, why nhot go all the way?
msmvps.com/.../naming-conventions-for-c.aspx
I am also getting the same error Unrecognized attribute 'messageEncoding'. Any update on this.
that question answers itselt. the _ is only applied to fields. parameters and local variables don't have the prefix.
btw, there is a place where some sort "hungarian" pays off: with controls on windows forms.
(just noticed that the previous comment got published before I ended it)
Regarding the parameter vs local variable thing, I haven't found it important to make that distinction in the code I write. It's not as important as seeing if you're working with a field. Since I don't like using the unecessary this prefix (btw, in these scenarios isn't the "this." really a "special" prefix?), I will keep using the _ to indicate a field.
Regarding the m_ prefix, I believe that it exists for historical reasons.
At the end of the day, it's a matter of taste, so everyone is entitled to having his own style.
This is good - I don't agree with the custom error page handling though. I see this a lot in examples and developers do not realize the effect this has on spiders:
<error statusCode="404" redirect ="error.aspx"/>
If a spider gets this, it will punish or more likely remove the page from the search engine index. The default redirect for asp.net custom error pages should be statuscode 500, when spiders see this code they assume an error has occured and will come back later - as opposed to assuming the page is not there anymore. You should have a custom 404 page too, but this should be used automatically by .net when a page is not found or has moved - not for handling errors.
I know this is not an seo asp.net article, but part of good error handling should take into account all kinds of visitors - spiders and humans. If a really important page gets dropped from Googles index due to a simple error, that won't be nice.
How do you name private static fields?
Pingback from Interesting articles(June 14) | devintelligence.com
public static void SettersAndGetters ()
string copyPaste = @"
how-to generate those in textpad F8
how-to Generate member accessors , properties for C# asp.net with textpad
how-to setters and getters
find: ^col(.*)$
replace: private string _\1 ; \n public string \1 { \n \t\t get { return _\1 ; } \n \t\t set { _\1 = value ; } \n } //comm -- eof \1 property \n\n
find:^(.*) (.*)$
private string s\1 ; \n public string \1 { \n \t\t get { return s\1 ; } \n \t\t set { s\1 = value ; } \n } //comm -- eof \1 property \n\n
private \1 _\2 ; \npublic \1 \2 { \n \t\t get { return _\2 ; } \n \t\t set { _\2 = value ; } \n } //eof property \2 \n\n\n
//for the constructor
_\2= this.\2 ;
//for the passing to the constuctor
\1 _\2 ,
";
} //eof method SettersAndGetters
I can't believe Microsoft would release such amateurish controls, oh wait, yeah I can. This is, for a lack of a better word, absolute junk, written so unprofessionally. Why are we paying these people for their products when they do not work right?
Did you actually try that? Don't see why it wouldn't work.
They do work...the idea of having new ones was clearing up the non-used stuff (viewstate, etc) and add some properties which make sense with MVC (for instance, having some sort of specify a route declaratively woudl be really great)
In Italy you can buy iPhone from any Apple retailer with no simlock...
Yep, a bit complicate, but all these extra coding sample will probably turn out in feature that the ASP.NET MVC team will include in the RTW of the framework.
Btw: great blog... subscribed!!
I think this is one of those issues that programmers get all bent out of shape over and waste time bitching about that ultimately do not matter. What matters is consistency within your team. Microsoft is just one vendor among many; why do we care what Microsoft recommends? Microsoft is neither an industry association nor a standards body? Would anyone care if General Motors declared that all right hand turns in GM cars must be preceded by flicking the right hand blinker at least 23.416 seconds before commencing a right hand turn? No. Some might care if the American Automobile Association or the National Highway Traffic Safety Administration (NHTSA) said the same thing and others would not; some states might issue their own right hand turn/blinker protocol and perhaps some counties too. What matters is that we understand what others drivers are doing when they implement their RightTurn methods (and does it really matter if you are driving alone in Death Valley at 4Am anyway?? It seems to me that it only matters when you are driving on the road with others – which happens to be the case with the majority of traffic – just not all.)
Hey Luís :)
Have you tried Prison Break and Heroes?
Greetings Luis,
If I'm allowed I'll give my short list too :)
4 - Prison Break
3 - House MD
2 - Seinfeld (I keep watching the re-runs at Sic Radical and still laughing at it)
1 - Lost
Best Regards and have a nice vacations.
Ouch :(
Where is 24 Hours, Prison Break, Two and Half Man? :P
Pedro: Prison break is just too damn boring. Two series just for getting out? not really my kind of series. Heroes, cool, but still not enough for making into my top :)
Israel: 24H is cool but it's becoming a little repetitive :)
Just for fun, I remembered an old Portuguese series, I saw it when I was a kid (and nowadays when I catch it in RTP Memória, while zapping) Duarte & Companhia :)
I am also facing the same issue. Any idea?