Frage

In my Default.Master file I added the Menu Control. All seems good. But I got the error "Control 'Menu1' of type 'Menu' must be placed inside a form tag with runat=server. " at run time. What does this mean in plain English??

Thanks

"Stack Trace: [HttpException (0x80004005): Control 'Menu1' of type 'Menu' must be placed inside a form tag with runat=server.]

War es hilfreich?

Lösung

My ASP.net is a little rusty, but it sounds as if your menu control uses some sort of server-side processing.

On your .aspx page or .master file, these need to be inside a form tag with runat="server" in order to operate the way they need to. Like so:

<form id="...." (...other form attributes...) runat="server" />
  (...your control's markup...)
</form>

If you're not too familiar with .aspx, you could post some more code so that others who know more about .net than me can help (my experience is about 10% asp.net and 90% php).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top