asp:menu requires Page.Header to be non-null

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:



<br /> ...............<br /> <br /> <br /> <br /> On Jan 14, 3:31=A0pm, Peter Bromberg [C# MVP]<br /> <pbromb...@yahoo.NoSpamMaam.com> wrote:<br /> > Have you tried having a Page header with say, one element that has no<br /> > content? Would that not solve the requirement?<br /> > -- Peter<br /> > Site:http://www.eggheadcafe.com<br /> > UnBlog:http://petesbloggerama.blogspot.com<br /> > MetaFinder:http://www.blogmetafinder.com<br /> ><br /> ><br /> ><br /> > "michael" wrote:<br /> > > I want to include a simple menu in a usercontrol on a page. The page<br /> > > inherits a BaseClass that overrides Render method, including header<br /> > > control. Header is dynamically generated.<br /> ><br /> > > ......<br /> > > =A0 =A0 =A0 =A0 writer.RenderBeginTag(HtmlTextWriterTag.Head)<br /> > > .......<br /> ><br /> > > If I want to use DynamicHoverStyle for the menu I am getting the error<br /> > > "Using Menu.DynamicHoverStyle requires Page.Header to be non-null".<br /> ><br /> > > Any ideas how to fix this problem?- Hide quoted text -<br /> ><br /> > - Show quoted text -</p> </article> <footer> <a href="/">Index</a> | <a href="/impressum.php">Impressum</a> | <a href="/datenschutz.php">Datenschutz</a> | <a href="https://www.xodox.de/">XODOX</a> </footer> </main> </body> </html>