Exception of type System.StackOverflowException was thrown. PROBLEM

S

Savas Ates

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();
 
?

=?ISO-8859-1?Q?G=F6ran_Andersson?=

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top