Wrox Home  
Search P2P Archive for: Go

  Return to Index  

aspx thread: Accesing code behind files in Beta 2


Message #1 by "Ed MacMillan" <ed.macmillan@s...> on Tue, 17 Jul 2001 17:52:42
Hello ,



  I seem to be having a problem with beta 2 where sometimes code in the 

code behind file will not execute. I have some command buttons which work 

at first but sometimes will not do anything when pressed.(I can make the 

code execute when in debug mode by creating a breakpoint)

 Also I have some code in a load event which worked at first but will not 

work now. The problem seems as if it may start to occur after exiting the 

Visual Studio environment and then re-starting it.

Would anyone know what my problem might be?





Thank you 



Ed MacMillan  
Message #2 by "Mats Boberg" <mats.boberg@n...> on Wed, 18 Jul 2001 12:49:42 +0200
I have the same problem, strange...



-----Original Message-----

From: Ed MacMillan [mailto:ed.macmillan@s...]

Sent: den 17 juli 2001 19:53

To: ASP+

Subject: [aspx] Accesing code behind files in Beta 2





Hello ,



  I seem to be having a problem with beta 2 where sometimes code in the

code behind file will not execute. I have some command buttons which work

at first but sometimes will not do anything when pressed.(I can make the

code execute when in debug mode by creating a breakpoint)

 Also I have some code in a load event which worked at first but will not

work now. The problem seems as if it may start to occur after exiting the

Visual Studio environment and then re-starting it.

Would anyone know what my problem might be?





Thank you



Ed MacMillan



Message #3 by "Gfw" <yyyz@h...> on Wed, 18 Jul 2001 06:18:18 -0500
It is an easy work around once you know the problem. In the (C#) code behind

file there is a function like...



#region Web Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

  this.Descending.CheckedChanged += new

System.EventHandler(this.Descending_CheckedChanged);

  this.Button1.Click += new System.EventHandler(this.Button1_Click);

  this.Load += new System.EventHandler(this.Page_Load);

}

#endregion



By default, this function is collapsed. The problem is that sometimes it end

up looking like...



#region Web Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

}

#endregion



The events for the buttons/checkboxes can be replaced by merely double

clicking on them in the aspx page. You have to manually replace the

statement"this.Load += new System.EventHandler(this.Page_Load);"



Hope this helps.





-----Original Message-----

From: Mats Boberg [mailto:mats.boberg@n...]

Sent: Wednesday, July 18, 2001 5:50 AM

To: ASP+

Subject: [aspx] RE: Accesing code behind files in Beta 2





I have the same problem, strange...



-----Original Message-----

From: Ed MacMillan [mailto:ed.macmillan@s...]

Sent: den 17 juli 2001 19:53

To: ASP+

Subject: [aspx] Accesing code behind files in Beta 2





Hello ,



  I seem to be having a problem with beta 2 where sometimes code in the

code behind file will not execute. I have some command buttons which work

at first but sometimes will not do anything when pressed.(I can make the

code execute when in debug mode by creating a breakpoint)

 Also I have some code in a load event which worked at first but will not

work now. The problem seems as if it may start to occur after exiting the

Visual Studio environment and then re-starting it.

Would anyone know what my problem might be?





Thank you



Ed MacMillan







Message #4 by "Mats Boberg" <mats.boberg@n...> on Wed, 18 Jul 2001 13:42:37 +0200
i found a way to get it working...



Just go to the design mode in the aspx file and click the buttons. You will

come to the code behind event as usal. This probably update some vs.net code

or some

memory attributes so it will work.



I hope this will work for you to... ; )



/Mats.



-----Original Message-----

From: Gfw [mailto:yyyz@h...]

Sent: den 18 juli 2001 13:18

To: ASP+

Subject: [aspx] RE: Accesing code behind files in Beta 2





It is an easy work around once you know the problem. In the (C#) code behind

file there is a function like...



#region Web Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

  this.Descending.CheckedChanged +=3D new

System.EventHandler(this.Descending=5FCheckedChanged);

  this.Button1.Click +=3D new System.EventHandler(this.Button1=5FClick);

  this.Load +=3D new System.EventHandler(this.Page=5FLoad);

}

#endregion



By default, this function is collapsed. The problem is that sometimes it end

up looking like...



#region Web Form Designer generated code

/// <summary>

/// Required method for Designer support - do not modify

/// the contents of this method with the code editor.

/// </summary>

private void InitializeComponent()

{

}

#endregion



The events for the buttons/checkboxes can be replaced by merely double

clicking on them in the aspx page. You have to manually replace the

statement"this.Load +=3D new System.EventHandler(this.Page=5FLoad);"



Hope this helps.





-----Original Message-----

From: Mats Boberg [mailto:mats.boberg@n...]

Sent: Wednesday, July 18, 2001 5:50 AM

To: ASP+

Subject: [aspx] RE: Accesing code behind files in Beta 2





I have the same problem, strange...



-----Original Message-----

From: Ed MacMillan [mailto:ed.macmillan@s...]

Sent: den 17 juli 2001 19:53

To: ASP+

Subject: [aspx] Accesing code behind files in Beta 2





Hello ,



  I seem to be having a problem with beta 2 where sometimes code in the

code behind file will not execute. I have some command buttons which work

at first but sometimes will not do anything when pressed.(I can make the

code execute when in debug mode by creating a breakpoint)

 Also I have some code in a load event which worked at first but will not

work now. The problem seems as if it may start to occur after exiting the

Visual Studio environment and then re-starting it.

Would anyone know what my problem might be?





Thank you



Ed MacMillan



Message #5 by "Ed MacMillan" <ed.macmillan@s...> on Wed, 18 Jul 2001 08:00:42 -0400
Thank you. I will give that a try



Ed



----- Original Message -----

From: "Gfw" <yyyz@h...>

To: "ASP+" <aspx@p...>

Sent: Wednesday, July 18, 2001 7:18 AM

Subject: [aspx] RE: Accesing code behind files in Beta 2





> It is an easy work around once you know the problem. In the (C#) code

behind

> file there is a function like...

>

> #region Web Form Designer generated code

> /// <summary>

> /// Required method for Designer support - do not modify

> /// the contents of this method with the code editor.

> /// </summary>

> private void InitializeComponent()

> {

>   this.Descending.CheckedChanged += new

> System.EventHandler(this.Descending_CheckedChanged);

>   this.Button1.Click += new System.EventHandler(this.Button1_Click);

>   this.Load += new System.EventHandler(this.Page_Load);

> }

> #endregion

>

> By default, this function is collapsed. The problem is that sometimes it

end

> up looking like...

>

> #region Web Form Designer generated code

> /// <summary>

> /// Required method for Designer support - do not modify

> /// the contents of this method with the code editor.

> /// </summary>

> private void InitializeComponent()

> {

> }

> #endregion

>

> The events for the buttons/checkboxes can be replaced by merely double

> clicking on them in the aspx page. You have to manually replace the

> statement"this.Load += new System.EventHandler(this.Page_Load);"

>

> Hope this helps.

>

>

> -----Original Message-----

> From: Mats Boberg [mailto:mats.boberg@n...]

> Sent: Wednesday, July 18, 2001 5:50 AM

> To: ASP+

> Subject: [aspx] RE: Accesing code behind files in Beta 2

>

>

> I have the same problem, strange...

>

> -----Original Message-----

> From: Ed MacMillan [mailto:ed.macmillan@s...]

> Sent: den 17 juli 2001 19:53

> To: ASP+

> Subject: [aspx] Accesing code behind files in Beta 2

>

>

> Hello ,

>

>   I seem to be having a problem with beta 2 where sometimes code in the

> code behind file will not execute. I have some command buttons which work

> at first but sometimes will not do anything when pressed.(I can make the

> code execute when in debug mode by creating a breakpoint)

>  Also I have some code in a load event which worked at first but will not

> work now. The problem seems as if it may start to occur after exiting the

> Visual Studio environment and then re-starting it.

> Would anyone know what my problem might be?

>

>

> Thank you

>

> Ed MacMillan

>

>

>


  Return to Index