Web matrix generated pages suddenly don't work RRS feed

  • Question

  • User-566723589 posted
    *** edited by: master4eva *** Please enclose your code in < code ></ code> tags (without the spaces). This will make your code easier to read online; therefore, encouraging a response to be faster. It is to your own benefit for your question to be answered in future. I have already done the editing to include the < code ></ code> tags for this post. ********* Using WebMatrix successfully in the past to create mobile pages, but suddenly nothing I try to build will work. Here is a simple sample page that does nothing, only has a few forms with links: The error I get when I try to run it is : Server Error in '/' Application. -------------------------------------------------------------------------------- MobileControl must be contained within a MobilePage: ASP.Kegs052804_aspx 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.Exception: MobileControl must be contained within a MobilePage: ASP.Kegs052804_aspx 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. Stack Trace: [Exception: MobileControl must be contained within a MobilePage: ASP.Kegs052804_aspx] System.Web.UI.MobileControls.MobileControl.get_MobilePage() +164 System.Web.UI.MobileControls.MobileControl.get_Adapter() +15 System.Web.UI.MobileControls.MobileControl.OnUnload(EventArgs e) +22 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +113 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +74 System.Web.UI.Control.UnloadRecursive(Boolean dispose) +74 System.Web.UI.Page.ProcessRequestCleanup() +24 System.Web.UI.Page.ProcessRequest() +218 System.Web.UI.Page.ProcessRequest(HttpContext context) +18 System.Web.CallHandlerExecutionStep.System.Web.HttpApplication+IExecutionStep.Execute() +179 System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +87 And here is the page code: <%@ Page Language="VB" %> <%@ Register TagPrefix="Mobile" Namespace="System.Web.UI.MobileControls" Assembly="System.Web.Mobile" %> <%@ import Namespace="System.Data" %> <%@ import Namespace="System.Data.SqlClient" %> <%@ import Namespace="System.Web" %> <%@ import Namespace="System.Web.UI.MobileControls" %> <%@ import Namespace="System.Web.UI.WebControls" %> <%@ import Namespace="System.Configuration" %> <script runat="server"> ' Insert page code here ' </script> <mobile:Form id="frmSelect" runat="server"> <Mobile:Link id="lnkHarvest" runat="server" Font-Size="Normal" NavigateUrl="#frmHarvest">Harvest</Mobile:Link> <Mobile:Link id="lnkReceive" runat="server" Font-Size="Normal" NavigateUrl="#frmReceive">Receive</Mobile:Link> <Mobile:Link id="lnkMaintenance" runat="server" Font-Size="Normal" NavigateUrl="#frmMaintenance">Maintenance</Mobile:Link> <Mobile:Link id="lnkHistory" runat="server" Font-Size="Normal" NavigateUrl="#frmHistory">History</Mobile:Link> </mobile:Form> <Mobile:Form id="frmHarvest" runat="server"> <Mobile:Label id="lblHarvest" runat="server">Harvest</Mobile:Label> <Mobile:Link id="lnkHarBack" runat="server" NavigateUrl="#frmSelect">Back</Mobile:Link> </Mobile:Form> <Mobile:Form id="frmReceive" runat="server"> <Mobile:Label id="lblReceive" runat="server">Receive</Mobile:Label> <Mobile:Link id="lnkRecBack" runat="server" NavigateUrl="#frmSelect">Back</Mobile:Link> </Mobile:Form> <Mobile:Form id="frmMaintenance" runat="server"> <Mobile:Label id="lblMaintenance" runat="server">Maintenance</Mobile:Label> <Mobile:Link id="lnkMainBack" runat="server" NavigateUrl="#frmSelect">Back</Mobile:Link> </Mobile:Form> <Mobile:Form id="frmHistory" runat="server"> <Mobile:Label id="lblHistory" runat="server">History</Mobile:Label> <Mobile:Link id="lnkHisBack" runat="server" NavigateUrl="#frmSelect">Back</Mobile:Link> </Mobile:Form>
    Friday, May 28, 2004 11:48 AM

All replies

  • User-1404012336 posted
    Replace this <%@ Page Language="VB" %> with this <%@ Page Language="vb" Inherits="System.Web.UI.MobileControls.MobilePage" %>
    Sunday, May 30, 2004 5:20 PM