Asp.net error management

I just opened my asp.net solution and get this message from every control in my application!

here is my code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="EnterData.DataEntry.WebForm1" %> <%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %> <!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></title> </head> <body> <form id="form1" runat="server"> <div> <asp:ScriptManager ID="ScriptManager1" runat="server" /> <br /><table> <tr> <td> lom_number: </td> <td><asp:TextBox ID="lom_numberTextBox" runat="server" Text=''/></td> <td>occurrence_date:</td> <td><asp:TextBox ID="occurrence_dateTextBox" runat="server" Text='<%# Bind("occurrence_date") %>' /> <asp:MaskedEditExtender ID="MaskedEditExtender1" TargetControlID="occurrence_dateTextBox" Mask="99/99/9999" MessageValidatorTip="true" OnFocusCssClass="MaskedEditFocus" OnInvalidCssClass="MaskedEditError" MaskType="Date" InputDirection="RightToLeft" AcceptNegative="Left" DisplayMoney="Left" ErrorTooltipEnabled="True" runat="server"/></td> <td>report_date:</td> <td><asp:TextBox ID="report_dateTextBox" runat="server" Text='<%# Bind("report_date") %>' /></td> <td>spec_id:</td> <td><asp:TextBox ID="spec_idTextBox" runat="server" Text='<%# Bind("spec_id") %>' /></td> </tr> <tr> <td>batch_id:</td> <td><asp:TextBox ID="batch_idTextBox" runat="server" Text='<%# Bind("batch_id") %>' /></td> <td>report_by:</td> <td> <asp:TextBox ID="report_byTextBox" runat="server" Text='<%# Bind("report_by") %>' /></td> <td>identified_by:</td> <td><asp:TextBox ID="identified_byTextBox" runat="server" Text='<%# Bind("identified_by") %>' /></td> <td>problem:</td> <td><asp:TextBox ID="problemTextBox" runat="server" Text='<%# Bind("problem") %>' /></td> <td></td> </tr></table> <table><tr><td>section_c_issue_error_identified_by:</td> <td> <asp:TextBox ID="section_c_issue_error_identified_byTextBox" width="500" runat="server" Text='<%# Bind("section_c_issue_error_identified_by") %>' /> </td></tr> <tr><td>section_c_comments:</td><td><asp:TextBox ID="section_c_commentsTextBox" Width="500" runat="server" Text='<%# Bind("section_c_comments") %>' /></td></tr> <tr><td>section_d_investigation:</td><td> <asp:TextBox ID="section_d_investigationTextBox" runat="server" Text='<%# Bind("section_d_investigation") %>' /></td></tr> <tr><td>section_e_corrective_action:</td> <td><asp:TextBox ID="section_e_corrective_actionTextBox" runat="server" Text='<%# Bind("section_e_corrective_action") %>' /></td></tr> <tr><td>section_f_comments:</td><td><asp:TextBox ID="section_f_commentsTextBox" runat="server" Text='<%# Bind("section_f_comments") %>' /></td></tr> </table> <asp:Button ID="Button1" runat="server" Text="Button" OnClick="SubmitData" /> </div> </form> </body> </html> 

Does anyone know what I'm doing wrong?

+7
source share
3 answers

It happened to me. This happened when I renamed the page and moved the aspx file to the project folders, but the code inside remained unrenamed.

Change the code inside:

 public partial class foldername_unrenamedname : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } 

in current

 public partial class newfoldername_renamedname : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } } 

Also edit the Inherits property in the page tag:

 Inherits="Newfoldername_renamedname" 
+3
source

You can resolve this error by following the steps below, the main cause of this error is an incorrect mapping between the web application project and the virtual directory in your IIS.

To resolve this error, follow these steps:

1-Right Click - Web Application Project and select Properties β†’ Web

2- in the server section, select "Use IIS Web Server β†’", then click "Create Virtual".

3- Clean the project and compile it again.

done :)

This information is on the following site.

http://weblogs.asp.net/hosamkamel/archive/2007/09/15/resolving-error-creating-control-xxx-in-web-application-project.aspx

Here is another article that suggested a different solution, and the reason is that the object is not initialized before use.

http://blogs.msdn.com/b/webdevtools/archive/2010/05/06/another-error-creating-control-in-the-design-view-with-object-reference-not-set-in- visual-studio-2010.aspx

+2
source

I closed the aspx designer, cleaned the project and rebuilt it, everything started to work fine. (using Visual Studio 2015)

0
source

All Articles