G
Guest
Hi I have a simple C# web application with only 1 form and about 20 controls
on it. I have a large section that enables all of the controls and makes
them visible based on screen inputs. I moved this section of code into a
class called Utility, control.enable = true, control1.visible=true and so on.
In order to get visibility of the control members in the Utility class I set
it up where the Utility class is derived from the Webform1 class, so in the
Utility class file I have
class Utility : Webform1 //derrived from webform one.
The problem is that in the main webform when I create an instance called
useutil of the Util class (Utility useutil = new Utility()), I get into a
loop since it starts to run the webform1 code over again(like a recursive
function). Anyhow just wondering if anyone has any suggestions, thanks.
on it. I have a large section that enables all of the controls and makes
them visible based on screen inputs. I moved this section of code into a
class called Utility, control.enable = true, control1.visible=true and so on.
In order to get visibility of the control members in the Utility class I set
it up where the Utility class is derived from the Webform1 class, so in the
Utility class file I have
class Utility : Webform1 //derrived from webform one.
The problem is that in the main webform when I create an instance called
useutil of the Util class (Utility useutil = new Utility()), I get into a
loop since it starts to run the webform1 code over again(like a recursive
function). Anyhow just wondering if anyone has any suggestions, thanks.