Valerie Meunier

Valerie Meunier

  • 960
  • 693
  • 73.4k

System.StackOverflow.Exception

Dec 31 2022 12:49 PM

Hi

this code gives System.StackOverflow.Exception at the bold line. Can anyone explain me how come?

Thanks

V

using System;
namespace test
{
    public partial class WebForm1 : System.Web.UI.Page
    {
        public Test ts = new Test();

        protected void Page_Load(object sender, EventArgs e)
        {
            Label1.Text = "ok";
        }
    }

    public class Test : WebForm1
    {
        string x;
    }
}

aspx file:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="test.WebForm1" %>
....

            <asp:Label ID="Label1" runat="server"></asp:Label>
 

 


Answers (2)