@inherits AComponent
@{try{
<div @attributes=@Attributes id=@ContainerId class=@ContainerClasses style="@ContainerStyle_0; @ContainerStyle">
<!--=============================================================================================-->
<table class="a_dropdown_list_LayoutTABLE">
   <tbody>
      <tr>
         <td class="a_dropdown_list_SelectTD">
            <AErrorFrame @ref=@ErrorFrame InitialMessage=@InitialErrorMessage>
               <select @ref=@SelectElement id=@SelectId
                       class="@SelectElement_EDClass @SelectClasses_0 @SelectClasses"
                       title=@(ErrorMessage ?? Title) accesskey=@AccessKey
                       style="@SelectStyle_0; @SelectStyle" tabindex=@TabIndex
                       disabled=@(Enabled ? null : "true")
                       onblur="setTimeout(()=>{ WASM.Invoke_1('wasm_ADropDownList_OnBlur','@UniqueId') })"
                       @onchange=@SelectElement_OnChange
                       @onkeydown=@SelectElement_OnKeyDown
                       @onfocus=@SelectElement_OnFocus>
                  <option style="display: none"></option>
                  @for (int i=0; i<ItemCount; i++)
                  {
                     if (i==SelectedIndexValue) {
                        <option class=@(SelectedOptionClasses ?? OptionClasses)
                                style=@(SelectedOptionStyle ?? OptionStyle) selected>@GetItemCaption(i)</option>
                     } else {
                        <option class=@OptionClasses style=@OptionStyle>@GetItemCaption(i)</option>
                     }
                  }
               </select>
            </AErrorFrame>
         </td>
         @if (ResetPresence != ElementPresence.None)
         {
         <td class="a_dropdown_list_ResetHRefTD">
            @if (ResetControlType == ResetControlType.Reset)
            {
            <AResetControl @ref=@ResetControl HRefId=@ResetHRefId HRef=@ResetHRefValue
                           HRefClasses=@ResetHRefClasses HRefStyle=@ResetControlStyle
                           Title=@ResetHRefTitle Enabled=@Enabled />
            }
            @if (ResetControlType == ResetControlType.UpReset)
            {
            <AUpResetControl @ref=@UpResetControl HRefId=@ResetHRefId HRef=@ResetHRefValue
                             HRefClasses=@ResetHRefClasses HRefStyle=@ResetControlStyle
                             Title=@ResetHRefTitle Enabled=@Enabled />
            }
         </td>
         <td />
         }
      </tr>
   </tbody>
</table><!--a_dropdown_list_LayoutTABLE-->
<!--=============================================================================================-->
</div>
}catch(Exception e){ProcessRenderingError(GetType(),e);}}
