Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.
2007-08-01 17:04
501 查看
hi i am making a web site in VS 05 and when i add a menu i get this message when i rum the site
Stack Trace:
Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.42This is the code i am useing to impliment the menu<asp:Menu ID="Menu1" runat="server" DataSourceID="SiteMapDataSource1" Height="83px" Width="203px"></asp:Menu>
Server Error in '/WNC' Application.
Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.Exception Details: System.Web.HttpException: Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.Source Error:An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. |
[HttpException (0x80004005): Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.]System.Web.UI.Page.VerifyRenderingInServerForm(Control control) +214System.Web.UI.WebControls.Menu.Render(HtmlTextWriter writer) +37System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer) +29System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21System.Web.UI.Control.Render(HtmlTextWriter writer) +7System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children) +199System.Web.UI.Control.RenderChildren(HtmlTextWriter writer) +21System.Web.UI.Page.Render(HtmlTextWriter writer) +27System.Web.UI.Control.RenderControlInternal(HtmlTextWriter writer, ControlAdapter adapter) +53System.Web.UI.Control.RenderControl(HtmlTextWriter writer, ControlAdapter adapter) +280System.Web.UI.Control.RenderControl(HtmlTextWriter writer) +24System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7425 |
|
You will need to place the control inside a <form id="form1" runat="server"> </form>tag. |
|
Thanks |
相关文章推荐
- Control 'ctl00_Menu1' of type 'Menu' must be placed inside a form tag with runat=server.
- Control ‘dg’ of type 'GridView' must be placed inside a form tag with runat=server
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server 錯誤的解決辦法
- Control 'TopHeader_username' of type 'TextBox' must be placed inside a form tag with runat=server.
- Control 'dgList_01' of type 'DataGridLinkButton' must be placed inside a form tag with runat=server.
- Control 'GridView1' of type 'GridView' must be placed inside a form tag with runat=server
- Property with 'retain(or strong) attribute must be of object type
- 『IOS』Property with &#39;retain (or strong)&#39; attribute must be of object type
- The DefaultButton of must be the ID of a control of type IButtonControl
- No enclosing instance of type FormDetailBean is accessible. Must qualify the allocation with an encl
- XCode中互相包含引起的"property with 'retain(or strong)' attribute must be of object type"错误与解决
- Property with 'retain (or strong)' attribute must be of object type
- [问题记录]Property with 'retain (or strong)' attribute must be of object type
- Bean named '*' must be of type [*], but was actually of type [*] with root case
- The DefaultButton of must be the ID of a control of type IButtonControl
- AFNetworking 2.0 ERROR:Property with 'retain (or strong)' attribute must be of object type [duplicat
- Property with 'retain (or strong)' attribute must be of object type
- Property with 'retain(or strong)' attribute must be of object type
- Property with 'retain (or strong)' attribute must be of object type