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

Are there functions in c#?

0 Answers  


What is asenumerable in c#?

0 Answers  


Is string a primitive data type in c#?

0 Answers  


So how do you retrieve the customized properties of a .NET application from XML .config file? Can you automate this process ?

1 Answers  


What is type safe in c#?

0 Answers  






Explain the constructor in c#.

0 Answers  


What is the c# equivalent of c++ catch (...), Which was a catch-all statement for any possible exception?

0 Answers  


What is mean by c#?

0 Answers  


What is a Assembly?

0 Answers   UGC Corporation,


What is the difference between int.parse and int.tryparse methods?

0 Answers  


What is data hiding in c#?

0 Answers  


How is a loop recorder monitored?

0 Answers  


Categories