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

M

michael

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?
 
M

michael

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:

<html>
<head id="myheader">
<title>
................
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top