Telerik blogs

Latest

  • Web

    Encode and Decode URI(Uniform Resource Identifier) using JavaScript

    The current article is taken from https://developer.mozilla.org/ In some scenarios it is useful to encode and decode the URI. For example: To avoid unexpected requests to the server, you should call encodeURIComponent on any user-entered parameters that will be passed as part of a URI. For example, a user could type "Thyme &time=again" for a variable comment. Not using encodeURIComponent on this variable will give comment=Thyme%20&time=again. Note that the ampersand and the equal sign mark a new key and value pair. So instead of having a POST comment key equal to "Thyme &time=again", you have two POST keys, one equal to "Thyme " and another...
    January 08, 2009
  • Web

    Passing parameters to a UserControl inside RadWindow for Silverlight

    I just wrote a simple application that demonstrates how to databind a treeview to a dummy data source and edit its items in a UserControl, placed in a RadWindow. You could see my other blog posts for examples with web service binding and upgrade the application to suit your needs. To accomplish the requirements, we need to add a property that will contain the edited data item on the UserControl. When the selection in the TreeView changes, we will update that property with the new selection and then open the RadWindow. The UserControl will create a copy of the data item...
    January 07, 2009
  • Web

    Marketing and Silverlight, configuring cross-domain banners

    I have been part of Telerik’s Silverlight team for almost a year now, and I too well know that our marketing team is just two floors away to say anything bad about marketing.  So I will just say that now having Silverlight 2 in its official version out, marketing mix should adopt one more P in its four P’s concept, Ptechnology. That is why, I will try to explain this topic step by step, so that all marketing guys attracted by the name of this topic can delete the first paragraph and give it to their development teams for consideration....
    December 30, 2008
  • Web

    A Tip to Play with RadControls for Silverlight Themes

    There are several built-in themes in RadControls for Silverlight that I’m sure the SL developers are pretty interested in. You can easily see how the themed controls look like after building a simple Silverlight application and setting any of the predefined themes. You shouldn’t miss the themes demo that allows applying a theme of the controls by a single button click. I’d like to give you another tip and at the same time to share something from the Telerik Silverlight kitchen. The tip gives you a chance to get quickly all the controls themed in a complex application containing tens ...
    December 23, 2008
  • 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