【发布时间】:2009-11-04 09:11:32
【问题描述】:
请帮我解决 System.StackOverflowException 我正在设计一个 .aspx 将记录写入数据库我使用 4 层架构来实现这一切都在工作,但是当我编译页面时,它会显示插入数据的字段,当我将数据插入这些字段并单击提交按钮,然后显示 System.StackOverflowException 发生
public class Customers
{
public Customers()
{
int CustomerID = 0;
string Fname = string.Empty;
string Lname = string.Empty;
string Country = string.Empty;
}
public int CustomerID
{
get { return CustomerID; }
set { CustomerID = value; }
}
public string Fname
{
get { return Fname; }
set { Fname = value; }****
}
public string Lname
{
get { return Lname; }
set { Lname = value; }
}
public string Country
{
get { return Country; }
set { Country = value; }
}
当页面正在执行时,会弹出一个窗口并显示 System.StackOverflowException,请给我任何解决此问题的方法
【问题讨论】:
-
请尝试使用 Markdown 格式化您问题中的代码,以便我们阅读。
-
另外,我在代码中看不到任何会导致堆栈溢出的内容,所以请您发布您的异常堆栈跟踪吗?
-
请向我们提供您在点击提交按钮时使用的代码。另外,请重新格式化您的帖子(代码)。
标签: c# asp.net .net stack-overflow c#-2.0