#AdHocMenuControl
##Properties
| Datatype | Property name | Property description | Default Value |
|---|---|---|---|
| String | AccessKey | Gets or sets the access key that allows you to quickly navigate to the Web server control. | String.Empty |
| String | AppRelativeTemplateSourceDirectory | Gets or sets the application-relative virtual directory of the System.Web.UI.Page or System.Web.UI.UserControl object that contains this control. | String.Empty |
| AttributeCollection | Attributes | Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control. | null |
| Color | BackColor | Gets or sets the background color of the Web server control. | Color [A=255, R=0, G=51, B=102] |
| Control | BindingContainer | Gets the control that contains this control's data binding. | null |
| Color | BorderColor | Gets or sets the border color of the Web control. | Color [Empty] |
| BorderStyle | BorderStyle | Gets or sets the border style of the Web server control. | NotSet |
| Unit | BorderWidth | Gets or sets the border width of the Web server control. | String.Empty |
| String | ClientID | Gets the server control identifier generated by ASP.NET. | String.Empty |
| ClientIDMode | ClientIDMode | Inherit | |
| ControlCollection | Controls | Gets a System.Web.UI.ControlCollection that contains the child controls of the System.Web.UI.WebControls.Menu control. | Depends on the controls added to the page |
| Style | ControlStyle | Gets the style of the Web server control. This property is used primarily by control developers. | null |
| Boolean | ControlStyleCreated | Gets a value indicating whether a System.Web.UI.WebControls.Style object has been created for the ControlStyle property. This property is primarily used by control developers. | True |
| String | CssClass | Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. | String.Empty |
| MenuItemBindingCollection | DataBindings | Gets a collection of System.Web.UI.WebControls.MenuItemBinding objects that define the relationship between a data item and the menu item it is binding to. | null |
| Control | DataItemContainer | null | |
| Control | DataKeysContainer | null | |
| Object | DataSource | Gets or sets the object from which the data-bound control retrieves its list of data items. | null |
| String | DataSourceID | The ID of a control that represents the data source from which the data-bound control retrieves its data. The default is System.Empty. | String.Empty |
| Int32 | DisappearAfter | Gets or sets the duration for which a dynamic menu is displayed after the mouse pointer is no longer positioned over the menu. | 500 |
| String | DynamicBottomSeparatorImageUrl | Gets or sets the URL to an image to display at the bottom of each dynamic menu item to separate it from other menu items. | String.Empty |
| Boolean | DynamicEnableDefaultPopOutImage | Gets or sets a value indicating whether the built-in image that indicates that a dynamic menu item has a submenu is displayed. | True |
| Int32 | DynamicHorizontalOffset | Gets or sets the number of pixels to shift a dynamic menu horizontally relative to its parent menu item. | 2 |
| Style | DynamicHoverStyle | Gets a reference to the System.Web.UI.WebControls.Style object that allows you to set the appearance of a dynamic menu item when the mouse pointer is positioned over it. | null |
| String | DynamicItemFormatString | Gets or sets additional text shown with all menu items that are dynamically displayed. | String.Empty |
| ITemplate | DynamicItemTemplate | Gets or sets the template that contains the custom content to render for a dynamic menu. | null |
| MenuItemStyle | DynamicMenuItemStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of the menu items within a dynamic menu. | {Fore Color: 0 Back Color: 0 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| SubMenuStyle | DynamicMenuStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of a dynamic menu. | {Fore Color: 0 Back Color: ff003366 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| String | DynamicPopOutImageTextFormatString | Gets or sets the alternate text for the image used to indicate that a dynamic menu item has a submenu. | Expand {0} |
| String | DynamicPopOutImageUrl | Gets or sets the URL to a custom image that is displayed in a dynamic menu item when the dynamic menu item has a submenu. | String.Empty |
| MenuItemStyle | DynamicSelectedStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of the dynamic menu item selected by the user. | {Fore Color: 0 Back Color: 0 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| String | DynamicTopSeparatorImageUrl | Gets or sets the URL to an image to display at the top of each dynamic menu item to separate it from other menu items. | String.Empty |
| Int32 | DynamicVerticalOffset | Gets or sets the number of pixels to shift a dynamic menu vertically relative to its parent menu item. | 0 |
| Boolean | Enabled | Gets or sets a value indicating whether the Web server control is enabled. | True |
| Boolean | EnableTheming | Gets or sets a value indicating whether themes apply to this control. | True |
| Boolean | EnableViewState | Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client. | True |
| FontInfo | Font | Gets the font properties associated with the Web server control. | null |
| Color | ForeColor | Gets or sets the foreground color (typically the color of the text) of the Web server control. | Color [White] |
| Boolean | HasAttributes | Gets a value indicating whether the control has attributes set. | False |
| Unit | Height | Gets or sets the height of the Web server control. | String.Empty |
| String | ID | Gets or sets the programmatic identifier assigned to the server control. | null |
| Boolean | IncludeStyleBlock | True | |
| MenuItemCollection | Items | Gets a System.Web.UI.WebControls.MenuItemCollection object that contains all menu items in the System.Web.UI.WebControls.Menu control. | null |
| Boolean | ItemWrap | Gets or sets a value indicating whether the text for menu items should wrap. | False |
| MenuItemStyleCollection | LevelMenuItemStyles | Gets a System.Web.UI.WebControls.MenuItemStyleCollection object that contains the style settings that are applied to menu items based on their level in a System.Web.UI.WebControls.Menu control. | null |
| MenuItemStyleCollection | LevelSelectedStyles | Gets a System.Web.UI.WebControls.MenuItemStyleCollection object that contains the style settings that are applied to the selected menu item based on its level in a System.Web.UI.WebControls.Menu control. | null |
| SubMenuStyleCollection | LevelSubMenuStyles | Gets a System.Web.UI.WebControls.MenuItemStyleCollection object that contains the style settings that are applied to the submenu items in the static menu based on their level in a System.Web.UI.WebControls.Menu control. | null |
| Int32 | MaximumDynamicDisplayLevels | Gets or sets the number of menu levels to render for a dynamic menu. | 3 |
| Control | NamingContainer | Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value. | null |
| Orientation | Orientation | Gets or sets the direction in which to render the System.Web.UI.WebControls.Menu control. | Horizontal |
| Page | Page | Gets a reference to the System.Web.UI.Page instance that contains the server control. | null |
| Control | Parent | Gets a reference to the server control's parent control in the page control hierarchy. | null |
| Char | PathSeparator | Gets or sets the character used to delimit the path of a menu item in a System.Web.UI.WebControls.Menu control. | null |
| Version | RenderingCompatibility | 4.0 | |
| MenuRenderingMode | RenderingMode | Default | |
| String | ReportUrlTemplate | Gets or sets the template used for building the URL to navigate to different reports from the menu. | javascript:AdHoc.Utility.NavigateReport("ReportViewer.aspx?rn={0}", 1, 'rs.aspx?'); |
| String | ScrollDownImageUrl | Gets or sets the URL to an image displayed in a dynamic menu to indicate that the user can scroll down for additional menu items. | String.Empty |
| String | ScrollDownText | Gets or sets the alternate text for the image specified in the ScrollDownImageUrl property. | Scroll down |
| String | ScrollUpImageUrl | Gets or sets the URL to an image displayed in a dynamic menu to indicate that the user can scroll up for additional menu items. | String.Empty |
| String | ScrollUpText | Gets or sets the alternate text for the image specified in the ScrollUpImageUrl property. | Scroll up |
| MenuItem | SelectedItem | Gets the selected menu item. | null |
| String | SelectedValue | Gets the value of the selected menu item. | String.Empty |
| ISite | Site | Gets information about the container that hosts the current control when rendered on a design surface. | null |
| String | SkinID | Gets or sets the skin to apply to the control. | String.Empty |
| String | SkipLinkText | Gets or sets the alternate text for a hidden image read by screen readers to provide the ability to skip the list of links. | Skip Navigation Links |
| String | StaticBottomSeparatorImageUrl | Gets or sets the URL to an image displayed as the separator at the bottom of each static menu item. | String.Empty |
| Int32 | StaticDisplayLevels | Gets or sets the number of menu levels to display in a static menu. | 1 |
| Boolean | StaticEnableDefaultPopOutImage | Gets or sets a value indicating whether the built-in image is displayed to indicate that a static menu item has a submenu. | False |
| Style | StaticHoverStyle | Gets a reference to the System.Web.UI.WebControls.Style object that allows you to set the appearance of a static menu item when the mouse pointer is positioned over it. | null |
| String | StaticItemFormatString | Gets or sets additional text shown with all menu items that are statically displayed. | String.Empty |
| ITemplate | StaticItemTemplate | Gets or sets the template that contains the custom content to render for a static menu. | null |
| MenuItemStyle | StaticMenuItemStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of the menu items in a static menu. | {Fore Color: 0 Back Color: 0 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| SubMenuStyle | StaticMenuStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of a static menu. | {Fore Color: 0 Back Color: 0 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| String | StaticPopOutImageTextFormatString | Gets or sets the alternate text for the pop-out image used to indicate that a static menu item has a submenu. | Expand {0} |
| String | StaticPopOutImageUrl | Gets or sets the URL to an image displayed to indicate that a static menu item has a submenu. | String.Empty |
| MenuItemStyle | StaticSelectedStyle | Gets a reference to the System.Web.UI.WebControls.MenuItemStyle object that allows you to set the appearance of the menu item selected by the user in a static menu. | {Fore Color: 0 Back Color: 0 Border Color: 0 Border Style: NotSet Font: { Name: null, Size: }} |
| Unit | StaticSubMenuIndent | Gets or sets the amount of space, in pixels, to indent submenus within a static menu. | 5px |
| String | StaticTopSeparatorImageUrl | Gets or sets the URL to an image displayed as the separator at the top of each static menu item. | String.Empty |
| CssStyleCollection | Style | Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control. | null |
| Boolean | SupportsDisabledAttribute | False | |
| Int16 | TabIndex | Gets or sets the tab index of the Web server control. | null |
| String | Target | Gets or sets the target window or frame in which to display the Web page content associated with a menu item. | String.Empty |
| TemplateControl | TemplateControl | Gets or sets a reference to the template that contains this control. | null |
| String | TemplateSourceDirectory | Gets the virtual directory of the System.Web.UI.Page or System.Web.UI.UserControl that contains the current server control. | String.Empty |
| String | ToolTip | Gets or sets the text displayed when the mouse pointer hovers over the Web server control. | String.Empty |
| String | UniqueID | Gets the unique, hierarchically qualified identifier for the server control. | null |
| ValidateRequestMode | ValidateRequestMode | Inherit | |
| ViewStateMode | ViewStateMode | Inherit | |
| Boolean | Visible | Gets or sets a value that indicates whether a server control is rendered as UI on the page. | True |
| Unit | Width | Gets or sets the width of the Web server control. | String.Empty |
##Methods
###ApplyStyle(System.Web.UI.WebControls.Style) Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers.
Parameters:
- System.Web.UI.WebControls.Style s - A System.Web.UI.WebControls.Style that represents the style to be copied.
###ApplyStyleSheetSkin(System.Web.UI.Page) Applies the style properties defined in the page style sheet to the control.
Parameters:
- System.Web.UI.Page page - The System.Web.UI.Page containing the control.
###CopyBaseAttributes(System.Web.UI.WebControls.WebControl) Copies the properties not encapsulated by the System.Web.UI.WebControls.Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers.
Parameters:
- System.Web.UI.WebControls.WebControl controlSrc - A System.Web.UI.WebControls.WebControl that represents the source control with properties to be copied to the Web server control that this method is called from.
###DataBind() Binds the data source to the System.Web.UI.WebControls.Menu control. This method cannot be inherited.
###Dispose() Enables a server control to perform final clean up before it is released from memory.
###Equals(System.Object) Determines whether the specified System.Object is equal to the current System.Object.
Parameters:
- System.Object obj - The System.Object to compare with the current System.Object.
Returns:
true if the specified System.Object is equal to the current System.Object; otherwise, false.
###FindControl(System.String) Searches the current naming container for a server control with the specified <paramref name="id parameter.
Parameters:
- System.String id - The identifier for the control to be found.
Returns:
The specified control, or null if the specified control does not exist.
###FindItem(System.String) Retrieves the menu item at the specified value path.
Parameters:
- System.String valuePath - The value path to the menu item to retrieve.
Returns:
A System.Web.UI.WebControls.MenuItem that represents the menu item at the specified value path.
###Focus() Sets input focus to a control.
###GetHashCode() Serves as a hash function for a particular type.
Returns:
A hash code for the current System.Object.
###GetRouteUrl(System.Object)
Parameters:
- System.Object routeParameters
###GetRouteUrl(System.String,System.Object)
Parameters:
- System.String routeName
- System.Object routeParameters
###GetRouteUrl(System.Web.Routing.RouteValueDictionary)
Parameters:
- System.Web.Routing.RouteValueDictionary routeParameters
###GetRouteUrl(System.String,System.Web.Routing.RouteValueDictionary)
Parameters:
- System.String routeName
- System.Web.Routing.RouteValueDictionary routeParameters
###GetType() Gets the System.Type of the current instance.
Returns:
The System.Type instance that represents the exact runtime type of the current instance.
###GetUniqueIDRelativeTo(System.Web.UI.Control)
Parameters:
- System.Web.UI.Control control
###HasControls() Determines if the server control contains any child controls.
Returns:
true if the control contains other controls; otherwise, false.
###MergeStyle(System.Web.UI.WebControls.Style) Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers.
Parameters:
- System.Web.UI.WebControls.Style s - A System.Web.UI.WebControls.Style that represents the style to be copied.
###RenderBeginTag(System.Web.UI.HtmlTextWriter) Adds tag attributes and writes the markup for the opening tag of the control to the output stream emitted to the browser or device.
Parameters:
- System.Web.UI.HtmlTextWriter writer - The System.Web.UI.HtmlTextWriter containing methods to build and render the device-specific output.
###RenderControl(System.Web.UI.HtmlTextWriter) Outputs server control content to a provided System.Web.UI.HtmlTextWriter object and stores tracing information about the control if tracing is enabled.
Parameters:
- System.Web.UI.HtmlTextWriter writer - The System.Web.UI.HTmlTextWriter object that receives the control content.
###RenderEndTag(System.Web.UI.HtmlTextWriter) Performs final markup and writes the HTML closing tag of the control to the output stream emitted to the browser or device.
Parameters:
- System.Web.UI.HtmlTextWriter writer - The System.Web.UI.HtmlTextWriter containing methods to build and render the device-specific output.
###ResolveClientUrl(System.String) Gets a URL that can be used by the browser.
Parameters:
- System.String relativeUrl - A URL relative to the current page.
Returns:
A fully qualified URL to the specified resource suitable for use on the browser.
###ResolveUrl(System.String) Converts a URL into one that is usable on the requesting client.
Parameters:
- System.String relativeUrl - The URL associated with the TemplateSourceDirectory property.
Returns:
The converted URL.
###SetRenderMethodDelegate(System.Web.UI.RenderMethod) Assigns an event handler delegate to render the server control and its content into its parent control.
Parameters:
- System.Web.UI.RenderMethod renderMethod - The information necessary to pass to the delegate so that it can render the server control.
###SetTraceData(System.Object,System.Object)
Parameters:
- System.Object traceDataKey
- System.Object traceDataValue
###SetTraceData(System.Object,System.Object,System.Object)
Parameters:
- System.Object tracedObject
- System.Object traceDataKey
- System.Object traceDataValue
###ToString() Returns a System.String that represents the current System.Object.
Returns:
A System.String that represents the current System.Object.
