• Embedding YouTube video in RadListView for ASP.NET AJAX

    Have you ever thought of embedding a YouTube video in the context of a data-bound control? Recently, a client of ours asked for such a demo and this inspired me to create a code-library project that features this scenario and uses RadListView for ASP.NET AJAX as ‘videos host’. Depending on your goal, you can control the player via JavaScript code or you can just embed a static object. In the latter case you will need something like this:

       1:  <object  width="425"  height="344">
       2:  <param  name="movie"  value="http://www.youtube.com/v/QT0e5XqNZdo&hl=en_US&fs=1&rel=0&color1=0x5d1719&color2=0xcd311b"></param>
       3:  <param  name...
  • Choose your preferred data layout with RadListView for ASP.NET AJAX

    Did you hear the bells and whistles which accompanied the public Q3 2009 Beta release of RadControls for ASP.NET AJAX? If not, I think it is time to explore it and get acquainted with the new controls/features that we will be introducing for the official Q3 2009 release expected in the first week of November.

    One of the new controls that I encourage you to play with is RadListView for ASP.NET AJAX. If you allow me to quote one of our clients who already gave the Q3 2009 Beta a spin, it is "something like a rotator on steroids" ...

  • Using jQuery to customize RadScheduler

    Telerik RadControls' for ASP.NET AJAX rendering is quite jQuery friendly. This is because almost all important html elements are tagged by a css class and therefore can be easily accessed using jQuery. In this blog post I have collected various cases from our forums and ticketing system on using jQuery to customize RadScheduler.  Special thanks to all customers or visitors who raised those questions.

    Q:  “I have a scheduler in timeline view showing six weeks of information.  Is it possible to change the header row background for the first two weeks?”

    highlight first two weeks in timeline view

    A: The first step in finding a solution ...

  • Common RadWindow issues and their solution

    The RadWindow control is part of the Telerik’s RadControls for ASP.NET AJAX suite and is intended to replace the standard browser’s popup (window.open()). Since the control is based on an IFRAME, it behaves just like one – basically, whatever can be done with an IFRAME, can be achieved with RadWindow as well. This fact is useful when you investigate a reason for some problem related to the RadWindow control. Just replace the RadWindow with a standard IFRAME or browser’s popup and see how your application will behave in this case. If the problem still exists, then it is not related ...

  • Executing JavaScript function from server-side code

    This is a pretty common scenario when working with WebForms. There are many ways to achieve the desired result, but they have one thing in common – you should make sure that the controls are fully loaded in the page before trying to get a reference to them and use them in your JavaScript code.

    In ASP.NET it is pretty straightforward to do that. For example you could use a label:
    ASPX
    <head runat="server">
       
    <title>Untitled Page</title>
       
    <script type="text/javascript">
       
    function calledFn()
       
    {
           
    alert("code ...

  • XML Syntax Rules

    All XML Elements Must Have a Closing Tag

    In HTML, you will often see elements that don't have a closing tag: 

    <p>This is a paragraph 
    <p>This is another paragraph 
     

    In XML, it is illegal to omit the closing tag. All elements must have a closing tag:
    <p>This is a paragraph</p> 
    <p>This is another paragraph</p>  
     

     

     Note: You might have noticed from the previous example that the XML declaration did not have a closing tag. This is not an error. The declaration is not a part of the XML ...

  • XML DataSource - General information

    The XmlDataSource control is a data source control that presents XML data to data-bound controls. The XmlDataSource control can be used by data-bound controls to display both hierarchical and tabular data. The XmlDataSource control is typically used to display hierarchical XML data in read-only scenarios. Because the XmlDataSource control extends the HierarchicalDataSourceControl class, it works with hierarchical data. The XmlDataSource control also implements the IDataSource interface and works with tabular, or list-style, data. 

    Page developers use the XmlDataSource control to display XML data using data-bound controls.

    The XmlDataSource typically loads XML data from an XML file, which is specified by ...

  • JavaScript - Variables and Types Basics

    This article is taken from JavaScript @ Wikibooks.

    JavaScript is a loosely typed language, this means that you don’t have to worry about setting the type of variable and you can change at will in runtime. But when you code, you have to make sure that you are getting the right type at the right time.

    Variable declaration

    Variables are commonly explicitly declared the var statement, as shown below:

    var c;
  • Client - side events in JavaScript

    Below is a table of the most common client side events in JavaScript. The Table is divided into three columns – the first lists the name of the event. The second contains a short description of the event, and the third lists all page objects, which support the given event.                                         

    Event Name                Description  Supported by objects

     onabort

    The onabort event occurs when loading of an image is aborted.

    image

    onblur

    The onblur event occurs when an object loses focus.

    button, checkbox, fileUpload, layer, frame, password, radio, reset, submit, text, textarea, window

    onchange

    The onchange event occurs when the content ...

  • Hiding JavaScript code from old browsers

    Sometimes we need to hide the JavaScript code from the old browsers that do not support it.

    To prevent old browsers from displaying your JS code, do the following:

     

    Immediately after the opening <script> tag, put a one-line HTML-style comment without the closing characters, so that the first two lines of your script would look like this:

    <script language="JavaScript">
    <!--
      
    At the end of your script, put the following two lines:
    //-->
    </script>
      

    Thus, your HTML file will contain the following fragment:

    <script language="JavaScript">
    <!--

        Put your JS code here. Old

        browsers will treat it as regular

        ...

  1. 1
  2. 2
  3. »