Home / Community & Support / Knowledge Base / RadControls for ASP.NET and ASP.NET AJAX / Input / Use RadInput with a global theme in ASP.NET 2.0 or later

Use RadInput with a global theme in ASP.NET 2.0 or later

Article Info

Rating: 4

 

Article information

Article relates to

RadInput v1.x

Created by

Paul, Telerik

Last modified by

Iana, Telerik

 
HOW-TO
Use RadInput with a global theme in ASP.NET 2.0

 

DESCRIPTION
Radinput is designed with control-level skinning in mind. Nonetheless, the control could take full advantage of the native ASP.NET 2.0 theming mechanism, if you are familiar with it.


SOLUTION
In order to achieve the desired look and feel of RadInput with global ASP.NET 2.0 theme, please follow the instructions below:

 

  1. Make your own global theme under App_Themes folder in your project.
  2. Create a skin file for the new theme
  3. Add reference to the Telerik.Web.UI controls in theme’s skin file.

    <%@ Register Assembly="Telerik.Web.UI" Namespace="Telerik.Web.UI" TagPrefix="telerik" %>

  4. Define the RadMaskedTextbox or RadDateInput’s Skin property in the theme's skin file.

        <telerik:RadMaskedTextBox runat="server" Skin="Mac" />
      
<telerik:RadDateInput runat="server" Skin="Mac" />

    5.   Set the Theme property in your ascx/aspx file.
    6.  Run your application.

 

 

 

 

 

 

 

Note: There is no need to add any images or CSS files in the Theme folder. Now the skins are embedded in the Telerik.Web.UI.Skins assembly as web resources.




SOLUTION
In order to achieve the desired look and feel of RadInput with global ASP.NET 2.0 theme, please follow the instructions below:

 

  1. Make your own global theme under App_Themes folder in your project.
  2. Create a skin file for the new theme
     

     
  3. If you want to use one of the skins that come with RadInput, please copy the corresponding skin folder from ~/RadControls/Input/Skins/[Skin name] to your application’s App_Themes folder.

     

       
     
  4. Add an input reference in the theme’s skin file
    <%@ Register Assembly="RadInput.Net2" Namespace="Telerik.WebControls" TagPrefix="radI" %>
     
  5. Define the RadMaskedTextbox or RadDateInput’s Skin property in the in the theme’s skin file.
    <radI:RadMaskedTextBox runat="server" Skin="MacOS" />
    <
    radI:RadDateInput runat="server" Skin="MacOS" />

  6. Set the Theme property in your ascx/aspx file.

  7. Run your application.

 

Comments

  • praetorion , Dec 21, 2008

    Theme is not able to work if the ASPX page is inherit from a custom base class.

If you'd like to comment on this KB article, please, send us a Support Ticket.
Thank you!

Please Sign In to rate this article.