asp:menu requires Page.Header to be non-null
am 14.01.2008 20:02:40 von xkeops
I want to include a simple menu in a usercontrol on a page. The page
inherits a BaseClass that overrides Render method, including header
control. Header is dynamically generated.
......
writer.RenderBeginTag(HtmlTextWriterTag.Head)
.......
If I want to use DynamicHoverStyle for the menu I am getting the error
"Using Menu.DynamicHoverStyle requires Page.Header to be non-null".
Any ideas how to fix this problem?
RE: asp:menu requires Page.Header to be non-null
am 14.01.2008 21:31:03 von pbromberg
Have you tried having a Page header with say, one element that has no
content? Would that not solve the requirement?
-- Peter
Site: http://www.eggheadcafe.com
UnBlog: http://petesbloggerama.blogspot.com
MetaFinder: http://www.blogmetafinder.com
"michael" wrote:
> I want to include a simple menu in a usercontrol on a page. The page
> inherits a BaseClass that overrides Render method, including header
> control. Header is dynamically generated.
>
> ......
> writer.RenderBeginTag(HtmlTextWriterTag.Head)
> .......
>
> If I want to use DynamicHoverStyle for the menu I am getting the error
> "Using Menu.DynamicHoverStyle requires Page.Header to be non-null".
>
> Any ideas how to fix this problem?
>
Re: asp:menu requires Page.Header to be non-null
am 14.01.2008 21:51:32 von xkeops
Hi Peter,
Thanks for your answer.
I am not sure I understand what you're saying.
I have tried though something like:
writer.AddAttribute("id", "myheader")
writer.RenderBeginTag(HtmlTextWriterTag.Head)
with no success.
The generated code would be:
...............
On Jan 14, 3:31=A0pm, Peter Bromberg [C# MVP]
wrote:
> Have you tried having a Page header with say, one element that has no
> content? Would that not solve the requirement?
> -- Peter
> Site:http://www.eggheadcafe.com
> UnBlog:http://petesbloggerama.blogspot.com
> MetaFinder:http://www.blogmetafinder.com
>
>
>
> "michael" wrote:
> > I want to include a simple menu in a usercontrol on a page. The page
> > inherits a BaseClass that overrides Render method, including header
> > control. Header is dynamically generated.
>
> > ......
> > =A0 =A0 =A0 =A0 writer.RenderBeginTag(HtmlTextWriterTag.Head)
> > .......
>
> > If I want to use DynamicHoverStyle for the menu I am getting the error
> > "Using Menu.DynamicHoverStyle requires Page.Header to be non-null".
>
> > Any ideas how to fix this problem?- Hide quoted text -
>
> - Show quoted text -