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

What is a linq in c#?

0 Answers  


What is a thread c#?

0 Answers  


What is use of FormBoarderStyle Propertie

0 Answers   MCN Solutions,


What does immutable mean in c#?

0 Answers  


List down the differences between public, static and void keywords?

0 Answers  


Explain the Different types of configuration files in .net?

0 Answers  


What is xamarin used for?

0 Answers  


What do you mean by casting a data type?

0 Answers  


What is the default value of datetime in c#?

0 Answers  


What is single dimensional array in c#?

0 Answers  


What is data annotation in c#?

0 Answers  


How do you create dlls in .NET

0 Answers   Digital GlobalSoft,


Categories