Hai friend ,
can u please help me
Plz provide me the code for following question
My question : In windows application design page use one text box & one button.in output give value in textbox by clicking the button it have to generate dynamically textboxes & button..for eg if u give 10 as input it should display 10 textboxes & 10 button..in any of the newly generated textbox u give value by clicking button the given value in the textbox it should display in messagebox
i m waitng for ur reply
Loading
HoneyPosted Jul 9, 2010, 9:09 AM
try this code
int x = 20;
int y = 120;
for (int i = 0; i < 10; i++)
{
//dynamic textbox creation
TextBox tb = new TextBox();
tb.Location = new Point(x, y);
tb.Size = new Size(100, 20);
//adding controls
this.Controls.Add(tb);
//dynamic button creation
Button btn = new Button();
btn.Location = new Point((x+125), y);
btn.Size = new Size(50, 20);
btn.Text = "button";
//adding controls
this.Controls.Add(btn);
y += 25;
}
bala muruganPosted Jul 9, 2010, 7:28 AM
only web application are have that place holder option ..
if you need then
you should visit that website....
http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.placeholder.aspx
and
http://www.c-sharpcorner.com/forums/ShowMessages.aspx?ThreadID=77335
its help to you....
thanks
balas
preetha deviPosted Jul 9, 2010, 5:47 AM
Did u ever used that before...can u give me sample coding for that.....
bala muruganPosted Jul 9, 2010, 1:12 AM
thanks
balas