Last post Nov 13, 2018 01:12 AM by bumples18
Nov 07, 2018 06:28 PM|bumples18|LINK
System.Web.HttpException: 'Error executing child request for ErrorPage.aspx.' (this was in the global file along with
the subject matter above)
This error turned up in the Global file and I have put in a form tag in the site master. But it is not working.
Below is the global and then the site master what I put in. Hope you can steer me in the right direction.
Global last paragraph:
void Application_Error(object sender, EventArgs e)
// Code that runs when an unhandled error occurs.
// Get last error from the server
Exception exc = Server.GetLastError();
if (exc is HttpUnhandledException)
if (exc.InnerException != null)
exc = new Exception(exc.InnerException.Message);
Server.Transfer("ErrorPage.aspx?handler=Application_Error%20-%20Global.asax", (# error is on this line)
Site master trying to fix it:
<form id="form1" runat="server">
<asp:ContentPlaceHolder ID="ContentPlaceHolder1" runat="server"> I put this in per a suggestion
<div class="container body-content">
<asp:ContentPlaceHolder ID="MainContent" runat="server">(this paragraph was already in.)
<asp:TextBox id="txt" runat="server" />(I added this to because the error said that I had to put it in the site master form)
<form id="frm" runat="server">
Nov 08, 2018 06:22 AM|Jenifer Jiang|LINK
In ASP.NET Webforms, all server controls must be inside of a <form> tag.
That tag must contain the runat="server" parameter.
Also, ASP.NET expects each webform to contain one <form id="myFormName" runat="server"></form> tag.
The runat="server" attribute indicates that the form should be processed on the server.
It also indicates that the enclosed controls can be accessed by server scripts:
...HTML + server controls...
So I think you should move your TextBox control into form tag.
And you should pay attention that a page can have only one server-side Form tag.
For more about Master page, you could refer to:
Nov 13, 2018 01:12 AM|bumples18|LINK
Thank you that is a big help.