473,396 Members | 1,768 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Exception of type System.StackOverflowException was thrown. PROBLEM

I want to change my controls in my class
I have the following code. All the code in my _default page class

How can i solve it ?
public class antu:_default

{
public void GetHolder()

{
if ( (string)this.Page.Session["refcode"]=="antu")

{
Control ANTUUST = this.LoadControl("Skin/ANTUUST.ascx");

Control ANTUALT = this.LoadControl("Skin/ANTUALT.ascx");

this.ANTUUSTHOLDER.Controls.Add (ANTUUST);

this.ANTUALTHOLDER.Controls.Add (ANTUALT);

}


}

}

antu AntuHolder =new antu ();


private void Page_Load(object sender, System.EventArgs e)

{

// REFCODE KONTROLU
////////////////////////////////

string refcode;
refcode=Request.QueryString["refcode"];

if ( refcode!=null && Session["refcode"]==null)

{

refcode=refcode.ToLower();

Session["refcode"]=refcode;


}

AntuHolder.GetHolder();
Jun 10 '06 #1
1 3972
That exception is usually caused by an eternal loop. Probably in some of
your user controls, but it's hard to say without seeing any of the
information provided in the error message.

Savas Ates wrote:
I want to change my controls in my class
I have the following code. All the code in my _default page class

How can i solve it ?
public class antu:_default

{
public void GetHolder()

{
if ( (string)this.Page.Session["refcode"]=="antu")

{
Control ANTUUST = this.LoadControl("Skin/ANTUUST.ascx");

Control ANTUALT = this.LoadControl("Skin/ANTUALT.ascx");

this.ANTUUSTHOLDER.Controls.Add (ANTUUST);

this.ANTUALTHOLDER.Controls.Add (ANTUALT);

}


}

}

antu AntuHolder =new antu ();


private void Page_Load(object sender, System.EventArgs e)

{

// REFCODE KONTROLU
////////////////////////////////

string refcode;
refcode=Request.QueryString["refcode"];

if ( refcode!=null && Session["refcode"]==null)

{

refcode=refcode.ToLower();

Session["refcode"]=refcode;


}

AntuHolder.GetHolder();

Jun 11 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

42
by: cody | last post by:
public DateTime Value { get { try { return new DateTime(int.Parse(tbYear.Text), int.Parse(tbMonth.Text), int.Parse(tbDay.Text)); } catch (FormatException)
4
by: Dan | last post by:
I am back yet again :) I am encountering an Exception that has me scratching my head. I have two forms. Form A launches Form B in response to the user clicking a button. The Constructor for Form...
5
by: David | last post by:
I am having a bit of a problem with catching an exception within a thread. Here is the scenario: I have a Windows Form. I create a new thread. This new thread calls a method in another DLL...
44
by: craig | last post by:
I am wondering if there are some best practices for determining a strategy for using try/catch blocks within an application. My current thoughts are: 1. The code the initiates any high-level...
3
by: Patrick.O.Ige | last post by:
Error:- System.StackOverflowException: Exception of type System.StackOverflowException was thrown. When is this thrown.. Any ideas
19
by: Diego F. | last post by:
I think I'll never come across that error. It happens when running code from a DLL that tries to write to disk. I added permissions in the project folder, the wwwroot and in IIS to NETWORK_SERVICE...
5
by: Simon Tamman {Uchiha Jax} | last post by:
Now this is bugging me. I just released software for a client and they have reported an unhandled stack overflow exception. My first concern is that the entirity of the UI and any threaded...
2
by: plily | last post by:
Hi, i have created a simple web user control and when i try to run it i get the following error,pls. help: Exception of type System.StackOverflowException was thrown. Description: An unhandled...
1
by: ramya naidu | last post by:
Hi I have classes property and sketch in htis property will be linked to skecth class and foure different classes which r linked to the skecth class and two generic list one is for skecth and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.