$99 VS $1000+. UI Control for ASP.NET AJAX(contains chart and gridview).
ComboBox Feature Render Mode in ASP.NET
Home > How to > ComboBox Render Modes

Introductions for ComboBox Render Modes

There are four render modes that are supported by the asp.net ComboBox Control, which are Classic, Lightweight, Native and Auto. Here in this section, we will briefly introduce each of these four combobox render modes.
  • Classic: this render mode is the default value of the asp.net ComboBox Control' RenderMode property. With this Classic render mode, the comboBox Control allows table and nested elements to be used for keeping the layout of combobox.
  • Lightweight: this render mode is widely used in mobile browsing environment. In this render mode, the web ComboBox Control will make maximum use of CSS and semantic html. Thus, table element and image gradients will be unavailable in the Lightweight render mode.
  • Native: after the Native render mode is activated, you can not use any skin style in the combobox because the Native render mode will output the combobox into a simple native html format.
  • Auto: after you set the Render Mode to Auto, the asp.net ComboBox Control will select proper rendering mode (Classic or Lightweight) for you automatically, based on the browser you are using.

How to Set Render Mode

The asp.net ComboBox Control offers two ways for users to define the Render Mode, which are listed below.

Set the RenderMode Property

You are allowed to set the value of the RenderMode property to one of above four render modes using programming code. Following example will show you how to define the render mode in aspx web page.
<kettic:PerComboBox ID="PerComboBox1" RenderMode="Classic" runat="server" >
And the render mode of combobox can be also set using C#.NET code.
PerComboBox1.RenderMode = RenderMode.Classic;

Configure the Content of Web.config File

You can also set the Render Mode of web ComboBox Control by configuring the content of web.config file. Open the web.config file and add following content to it.
<add key="kettic.Web.UI.ComboBox.RenderMode" value=" Lightweight" />
Now the configuration of the combobox render mode is finished. If you have any other questions about the combobox mode rendering issue, please feel free to contact us via E-mail.

Other Recommended ComboBox Features