How can i load the text box and label at the runtime based
on the existing text box and tabel

Answers were Sorted based on User's Feedback



How can i load the text box and label at the runtime based on the existing text box and tabel..

Answer / anil

Generally code goes like this
private void LoadControl()
{
TextBox tb = new TextBox();
tb.Location = new Point(500, 100);
tb.Visible = true;
this.Controls.Add(tb);
}

Is This Answer Correct ?    3 Yes 0 No

How can i load the text box and label at the runtime based on the existing text box and tabel..

Answer / dhara

public void labelcontrol()
{
label l=new label();
l.visible=true;
l.location =new point(100,100);
l.text="Name";
this.controls.add(l);
}
FOR CREATING LABEL AT RUNTIME.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

C# provides a default constructor for me. I write a constructor that takes a string as a parameter, but want to keep the no parameter one. How many constructors should I write?

3 Answers   Visual Soft,


What are the differences between a class and a struct?

0 Answers  


Which are access modifiers available in c#?

0 Answers  


Why do we need structs in c#?

0 Answers  


What is the different types of private assembly and shared assembly?

0 Answers  


What are the fundamental principles of oo programming?

0 Answers  


What is a Managed Code??

0 Answers  


What is marshalling and what are different kinds of marshalling?

0 Answers  


What is encapsulation in csharp?

0 Answers  


How do I do implement a trace?

0 Answers  


Can you create sealed abstract class in c#?

0 Answers  


Why do we need serialization?

0 Answers  


Categories