• .NET Mobile

    A new series of blog posts coming up

    December 19, 2008 Share
    Hi all,   Telerik’s support is always focused at satisfying customer needs – if you have used our controls for some time now, I guess you have already found that out. If you have just started getting familiar with our products – give us a try ;)   Our support services however, being targeted on our products only, cannot provide you with custom solutions, although we try to help as much as possible. That is why we decided to start a new series of blog posts aimed at different aspects of ASP.NET development. The content is gathered from various newsgroups, blog posts, tutorials in...
  • .NET Mobile

    Don't Use BODY ONLOAD in ASP.NET AJAX Websites

    December 13, 2008 Share
    In the past developers used <body onload="..."> to execute some script as soon as the page is loaded. Nowadays this is rather old-fashioned, no matter how you look at it. What's more, it doesn't work as expected in ASP.NET AJAX websites. Consider the following example:   <body onload="MyFunction()">    <script type="text/javascript">       function MyFunction()     {        var myAjaxControl = $find("myAjaxControlClientID");        myAjaxControl.doSomething();     }    </script>    </body>    The client-side page load event is fired by the browser as soon as all HTML and scripts have been loaded. However, this happens before the controls' client-side instances have been created. As a result, myAjaxControl will be null and the doSomething() method will trigger a Javascript error. So, a lot better approach...
  • .NET Mobile

    Internet Explorer JavaScript Performance Tip - use the "children" property

    August 14, 2008 Share
    Today I was profiling the initialization time of RadTreeView for ASP.NET Ajax and found out that the biggest bottleneck was traversing the DOM tree. The code looks something like this: //get_childListElement() returns an HTML element  var childNodes = parent.get_childListElement().childNodes;  for (var i = 0, length = childNodes.length; i < length; i++)  {       var childNode = childNodes[i];         //Perform additional initialization  }  I tested with 10000 elements and in IE7 I got about 25000ms whilst in FireFox the total time was around 33ms (Core 2 Duo @ 2.33GHz). Quite a difference if you ask me. I thought that there may be some IE specific method/property which could perform better and I dug into MSDN. And a few minutes later I found the children property!!! Apparently the children collection contains only HTML elements (whilst childNodes is full of...