Jan 15, 2012, 2:43 PM
[CLOSED] [2.0] MVC DirectEvent Error
Hello,
I'm receiving the following error when clicking the "Button 1" button:
Cheers,
Timothy
I'm receiving the following error when clicking the "Button 1" button:
Server Error in '/' Application.
The control with ID 'ctl02' not found
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: The control with ID 'ctl02' not found
Source Error:
Line 2965: throw new HttpException("The control with ID '{0}' not found".FormatWith(controlID));
Line 2966: }
Line 2967: }
Line 2968: }
Line 2969:
Source File: D:\Application\Library\Required Dependencies\Ext.NET\Source\2.0.0.DP1\Ext.Net\Core\ResourceManager\ResourceManager.cs Line: 2967
Stack Trace:
[HttpException (0x80004005): The control with ID 'ctl02' not found]
Ext.Net.ResourceManager.RaisePostBackEvent(String eventArgument) in D:\Application\Library\Required Dependencies\Ext.NET\Source\2.0.0.DP1\Ext.Net\Core\ResourceManager\ResourceManager.cs:2967
Ext.Net.ResourceManager.Page_AjaxLoadComplete(Object sender, EventArgs e) in D:\Application\Library\Required Dependencies\Ext.NET\Source\2.0.0.DP1\Ext.Net\Core\ResourceManager\ResourceManager.cs:2797
System.EventHandler.Invoke(Object sender, EventArgs e) +0
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3922
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.237
Layout.cshtml:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>@ViewBag.Title</title>
</head>
<body>
@(Html.X().ResourceManager()
.IDMode(Ext.Net.IDMode.Static)
)
@RenderBody()
</body>
</html>
Here is the source code for the Login.cshtml:@{
Layout = "~/Views/Shared/Layout.cshtml";
}
@(Html.X().Window()
.BodyPadding(15)
.Closable(false)
.Draggable(false)
.Height(275)
.Layout(Ext.Net.LayoutType.Fit)
.Resizable(false)
.Width(555)
.Buttons(a =>
{
a.Add(Html.X().Button()
.Scale(Ext.Net.ButtonScale.Medium)
.Text("Button 1")
.DirectEvents(events =>
{
events.Click.Buffer = 300;
events.Click.FormID = "FormPanel1";
events.Click.Method = Ext.Net.HttpMethod.POST;
events.Click.Url = Url.Action("Action", "Controller");
} )
);
} )
.Items(a =>
a.Add(Html.X().FormPanel()
.Border(false)
.ID("FormPanel1")
.Items(b =>
{
b.Add(Html.X().TextField()
.AnchorHorizontal("97%")
.FieldLabel("Username")
.Name("Username")
.Listeners(listeners =>
{
listeners.AfterRender.Buffer = 300;
listeners.AfterRender.Handler = "this.focus();";
} )
);
b.Add(Html.X().TextField()
.AnchorHorizontal("97%")
.FieldLabel("Password")
.InputType(Ext.Net.InputType.Password)
.Name("Password")
);
b.Add(Html.X().Checkbox()
.AnchorHorizontal("97%")
.BoxLabel("Remember Me")
.Checked(true)
.Name("RememberMe")
);
} )
)
)
)
Any suggestions?Cheers,
Timothy
Last edited by Daniil; Jan 20, 2012 at 12:31 PM.
Reason: [CLOSED]