Hi,
Recently we started using the ToolBar control, however, there are several problems with it.
1) ToolBar control crashes when trying to set NormalStyle property declaratively or in constructor of inherited class.
It's reproducible with this page:
Code: HTML/ASPX
<%@ Page %>
<%@ Register Assembly="EO.Web" Namespace="EO.Web" TagPrefix="eo" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ToolBar test </title>
<meta http-equiv="X-UA-Compatible" content="IE=8" />
<link href="/Resources/toolbar.css" rel="Stylesheet" />
</head>
<body>
<form runat="server">
<eo:ToolBar runat="server" CssClass="toolbar">
<NormalStyle CssClass="toolbarDefault" />
<HoverStyle CssClass="toolbarHover" />
<DisabledStyle CssClass="toolbarDisabled" />
</eo:ToolBar>
</form>
</body>
</html>
This is the exception I get:
Code:
[NullReferenceException: Object reference not set to an instance of an object.]
EO.Web.Internal.e5.a(Object A_0, d0 A_1, Int32 A_2) +26
EO.Web.ToolBar.set_NormalStyle(ElementStyle value) +23
ASP.toolbar_aspx.__BuildControl__control4() +56
ASP.toolbar_aspx.__BuildControl__control3() +89
ASP.toolbar_aspx.__BuildControl__control2() +95
ASP.toolbar_aspx.__BuildControlTree(toolbar_aspx __ctrl) +52
ASP.toolbar_aspx.FrameworkInitialize() +37
System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +56
System.Web.UI.Page.ProcessRequest() +80
System.Web.UI.Page.ProcessRequestWithNoAssert(HttpContext context) +21
System.Web.UI.Page.ProcessRequest(HttpContext context) +49
ASP.toolbar_aspx.ProcessRequest(HttpContext context) +4
System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +181
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +75
2) Another problem is that if I create a control inherited from EO.Web.ToolBar and override OnPreRender method (and, of course, call base.OnPreRender in it), at least hover and disabled styles do not work at all. Default style is rendered but removed immediately after the page has loaded.
Thanks in advance