• .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

    Showing RadToolTip on RadInput input error

    December 12, 2008 Share
    One of the tools in the RadControls for ASP.NET AJAX suite that is getting a lot of attention these days is the RadInput control. More specifically, the RadInputManager. With this "Manager" control, you can easily add validation to any textbox on your page without littering your markup with ASP.NET validator controls. Plus, you'll get a much more dynamic validation experience when you use RadInput instead of the OTB (Out of The Box) ASP.NET validation controls and better page performance (since the manager enables you to save a lot of HTML and JavaScript). One of the other features of the RadInput textboxes, including textboxes...
  • .NET

    Easily persist RadTabStrip Selected Tab using client-side API

    December 05, 2008 Share
    While working on a recent "real" project for Telerik, I used the RadTabStrip for ASP.NET AJAX to provide users with a list of content they could navigate. It was simple enough. A RadTabStrip with a few tabs, a RadMultiPage holding each tab's content, and content on each pageview that linked to new pages in the website. With very little effort, I had a rich, tabbed interface that worked completely cross browser. But then during beta testing, a tester reported a bug: if they navigated to a new page by clicking on content in the TabStrip, then clicked their browser's back button,...