I have two classes test.cs and designTest.cs
In designTest.cs ,I have label1,textbox1,combobox1 etc.
In the test.cs,I want to write the code as
designTest dt=new designTest();
//label1.visible=true;
//textbox1.visible=true;
but the problem is that label1,textbox1 or combobox1 is not accessible.
How to make them accessible in test.cs?
Loading
Jaish MathewsPosted May 10, 2010, 3:45 AM
In "designTest" class declare public properties, which will return your Labels, TextBoxes etc...Some thing like below
class designTest
{
public TextBox MyTextBox1
{
<
}
}
KritiPosted May 10, 2010, 3:47 AM