RadInput for ASP.NET AJAX

RadControls for ASP.NET AJAX

Since Q3 2011 RadInput introduces a new rendering mode for its controls, where only one input element of type text is used.

Since Q1 2012 this mode is enabled by default for the RadInput controls. It could be disables by setting the EnableSingleInputRendering property to "false".

The main idea of this feature is to optimize the input rendering and Client-Side API. By using the single input rendering mode only two main HTML elements are rendered on the page, instead of two or three (depending on the specific RadInput) which are rendered in the non-single mode of the RadInput controls.

The two main HTML elements of the RadInput in single input rendering mode are:

  • The input element in which the user types and submits.

  • Span element over the input that holds formatted and empty messages when needed.

Getting a reference to the input area DOM element when SingleInputRendering is enabled

Due to the rendering difference when the SingleInputRendering mode is enabled the input DOM element could be accessed on the client directly with the control's server ID. Therefore, it is no longer needed to use "_text" to access the DOM element on the client.

Copy[JavaScript] Getting a reference to the input area DOM element
<script type="text/javascript">
    function getElement(sender, eventArgs)
    {
        var inputElement = $get('<%=RadInput1.ClientID%>');

    }
</script>

Focus input element when SingleInputRendering is enabled

In order to properly focus the input element, you should directy pass the client ID of the RadInput control to the specific Focus() method, instead of using "_text".

Caution

With Single input rendering turned on, if you disable the RadInput control, its value will not be posted to the server, even in scenarios where you set it through the set_value() function.