Telerik blogs

Latest

  • Web

    How To: Strongly typed values for your TextBoxes

    Very often you need to parse/convert TextBox Text property value to some other type however I’ve never seen any universal approach for this so far… and I’m offering you one :) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI.WebControls; public static class TextBoxExtensions { public static T Value<T>(this TextBox textBox) { return (!String.IsNullOrEmpty(textBox.Text))? ChangeType<T>(textBox.Text) : default(T); } public static T ChangeType<T>(object value) { return (T)Convert.ChangeType(value, Nullable.GetUnderlyingType(typeof(T)) ?? typeof(T)); } } It's simple, isn't it? :)...
    December 20, 2008
  • Web

    RadNavigation deep linking

    Deep linking is an unique feature of RadNavigation allowing you to use page navigation by simply changing the URL in the browser address bar. Now you can provide a link directly to every page from your application. Implementing this RadNavigation feature is just as easy as using the other navigation classes all you have to do is just follow the next steps:   1. Create Silverlight application. In order to use deep linking in page navigation scenario you have to make sure that any changes in the state the page is reflected to the browser’s address (bookmark). To do this you have two...
    December 20, 2008
  • Web

    RadControls for Silverlight Futures

    RadDocking With the SP2 release of RadControls for Silverlight Q3 2008 we are introducing a community preview edition of the RadDocking control for Silverlight. You can find the build under your account at telerik.com. The download files containing the build are called Futures (RadControls_for_Silverlight_2008_3_1217_TRIAL/DEV_Futures.zip and RadControls_for_Silverlight_2008_3_1217_TRIAL/DEV_Futures.msi).     You can check the online demos at: RadDocking First Look RadGridView First Look The features that are currently supported by this CTP edition of the RadDocking tool are listed below: Dockable Layouts Percentage or Absolute Height of the containers MinWidth/Width/MaxWidth constraints MinHeight/Height/MaxHeight constraints Resizable Bars AutoHideAreas DocumentHost DockingPanel SplitContainers Nested split containers Horizontal/Vertical Orientation Initial Position PaneGroups AutoHide per group Close per group Title Panes Pinnable Closable     RadGridView Beta The previously released community...
    December 19, 2008
  • Web

    How do I pause execution in JavaScript?

    The current article is taken from javascript.faqts Contributors: ha mo, Daniel LaLiberte, Brent Boyer, Martin Honnen, mercury rising,   There is no true wait, sleep, or similar function in either the core JavaScript language or in client side JavaScript. Client side JavaScript however provides     setTimeout('js code here', delayInMilliseconds) which allows you to schedule execution of piece of script and setInterval('js code here', intervalInMilliseconds) which allows you to periodically execute a piece of script. So if you wanted (pseudo code) statement1;  wait (someDelay);  statement2;  you would stuff the code into functions: function statement1 () {      // your code here  }  function statement2 () {      // your code here  }    and call statement1();  setTimeout('statement2()', someDelay);      If you wanted (pseudo...
    December 19, 2008
  • Web ASP.NET AJAX

    HTTP Compression for your ASP.NET AJAX applications

    With our next service pack you will be able to compress your entire AJAX traffic completely codeless with a single web.config setting: ... <httpModules>    <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />  </httpModules>  ...   <!--         The system.webServer section is required for running ASP.NET AJAX under Internet         Information Services 7.0.  It is not necessary for previous version of IIS.     -->    <system.webServer>      <modules>         <add name="RadCompression" type="Telerik.Web.UI.RadCompression" />      </modules>  ... Features: Support for all traditional ajax requests including RadAjaxManager,...
    December 16, 2008