HighTechTalks DotNet Forums  

How to write code and design?

ASP.net Web Controls microsoft.public.dotnet.framework.aspnet.webcontrols


Discuss How to write code and design? in the ASP.net Web Controls forum.



Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old   
Vasant
 
Posts: n/a

Default How to write code and design? - 12-10-2007 , 06:07 AM






How to make Textbox and Button like
at 1 time
Textbox Button


at 2 time
Textbox Button
Textbox Button


Thank you.

Reply With Quote
  #2  
Old   
John Padilla
 
Posts: n/a

Default RE: How to write code and design? - 12-15-2007 , 02:23 PM






depending on what container you wish to place the buttons into (ie the form,
panel etc) you do i like this:

the current webform:

This code happens in some type of event of your choosing:

string[] count = new string[2];
count[0] = "btOne";
count[1] = "btTwo";

this.Controls.Add((new TextBox()).ID = count[0]);
this.Controls.Add((new TextBox()).ID = count[1]);

Vy putting the ID value you can reflect through the this.Controls list and
find your new text boxes by name and set other properties.

Hope this helps

"Vasant" wrote:

Quote:
How to make Textbox and Button like
at 1 time
Textbox Button


at 2 time
Textbox Button
Textbox Button


Thank you.


Reply With Quote
  #3  
Old   
John Padilla
 
Posts: n/a

Default RE: How to write code and design? - 12-15-2007 , 02:42 PM



I forgot to add something.

Once you add your controls you can reference them by the Id value. To format
them you will also need to add a div or 2 into the panel and put the textbox
insid eeach div and use the div (as a server side control) to arange the
locations of the text boxes within the panel. You can also use CSS.

"Vasant" wrote:

Quote:
How to make Textbox and Button like
at 1 time
Textbox Button


at 2 time
Textbox Button
Textbox Button


Thank you.


Reply With Quote
Reply




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.