473,396 Members | 2,010 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Dynamically added controls

I have a page with mixture of static and dynamically added controls is there
any way of controlling the order which they are added to the page. My submit
button (statically added) appears before some textboxes (dynamically added).
I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without CSS.
Regards, Chris.
Jan 20 '07 #1
5 1943
Even if you are creating controls dynamically, you can always prepare your
layout statically. Drop a table on the form before the buttons and add rows
for the textboxes as you add them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:u5*************@TK2MSFTNGP04.phx.gbl...
I have a page with mixture of static and dynamically added controls is
there
any way of controlling the order which they are added to the page. My
submit
button (statically added) appears before some textboxes (dynamically
added).
I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without CSS.
Regards, Chris.


Jan 20 '07 #2
I am designing something which creates forms dynamically bar a submit button
and one or two other controls. A static layout would sort of defeat the
object of doing it dynamically. Regards, Chris.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uE**************@TK2MSFTNGP02.phx.gbl...
Even if you are creating controls dynamically, you can always prepare your
layout statically. Drop a table on the form before the buttons and add
rows
for the textboxes as you add them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:u5*************@TK2MSFTNGP04.phx.gbl...
>I have a page with mixture of static and dynamically added controls is
there
>any way of controlling the order which they are added to the page. My
submit
>button (statically added) appears before some textboxes (dynamically
added).
>I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without CSS.
Regards, Chris.



Jan 21 '07 #3
You can add controls to the container's Control collection with AddAt
method, which lets you specify a specific location in the collection.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:uZ**************@TK2MSFTNGP04.phx.gbl...
I am designing something which creates forms dynamically bar a submit
button
and one or two other controls. A static layout would sort of defeat the
object of doing it dynamically. Regards, Chris.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uE**************@TK2MSFTNGP02.phx.gbl...
Even if you are creating controls dynamically, you can always prepare
your
layout statically. Drop a table on the form before the buttons and add
rows
for the textboxes as you add them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:u5*************@TK2MSFTNGP04.phx.gbl...
I have a page with mixture of static and dynamically added controls is
there
any way of controlling the order which they are added to the page. My
submit
button (statically added) appears before some textboxes (dynamically
added).
I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without CSS.
Regards, Chris.



Jan 21 '07 #4
What about statically added controls?

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
You can add controls to the container's Control collection with AddAt
method, which lets you specify a specific location in the collection.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:uZ**************@TK2MSFTNGP04.phx.gbl...
>I am designing something which creates forms dynamically bar a submit
button
>and one or two other controls. A static layout would sort of defeat the
object of doing it dynamically. Regards, Chris.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uE**************@TK2MSFTNGP02.phx.gbl...
Even if you are creating controls dynamically, you can always prepare
your
layout statically. Drop a table on the form before the buttons and add
rows
for the textboxes as you add them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:u5*************@TK2MSFTNGP04.phx.gbl...
I have a page with mixture of static and dynamically added controls is
there
any way of controlling the order which they are added to the page. My
submit
button (statically added) appears before some textboxes (dynamically
added).
I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without
CSS.
Regards, Chris.




Jan 21 '07 #5
They are also in the Controls collection. Inspect it in the debugger, it
will give you a better picture of what is there and in what position.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net
"Chris" <no****@nospam.comwrote in message
news:%2****************@TK2MSFTNGP06.phx.gbl...
What about statically added controls?

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:%2****************@TK2MSFTNGP06.phx.gbl...
>You can add controls to the container's Control collection with AddAt
method, which lets you specify a specific location in the collection.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:uZ**************@TK2MSFTNGP04.phx.gbl...
>>I am designing something which creates forms dynamically bar a submit
button
>>and one or two other controls. A static layout would sort of defeat the
object of doing it dynamically. Regards, Chris.

"Eliyahu Goldin" <RE**************************@mMvVpPsS.orgwrote in
message news:uE**************@TK2MSFTNGP02.phx.gbl...
Even if you are creating controls dynamically, you can always prepare
your
>layout statically. Drop a table on the form before the buttons and
add
rows
for the textboxes as you add them.

--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
"Chris" <no****@nospam.comwrote in message
news:u5*************@TK2MSFTNGP04.phx.gbl...
I have a page with mixture of static and dynamically added controls
is
there
any way of controlling the order which they are added to the page. My
submit
button (statically added) appears before some textboxes (dynamically
added).
I know I could move it around with CSS but I want to move towards an
accessible site that will display forms in the right order without
CSS.
Regards, Chris.




Jan 21 '07 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Bas Groeneveld | last post by:
I am developing an ASP.NET application part of which consists of a data entry wizard defined by entries in a data table - ie the controls on each page of the wizard are determined by definitions in...
4
by: Harry | last post by:
Hello, I have a page with a RadioButtonList and a PlaceHolder control. The RadioButtonList's AutoPostBack attribute is set to TRUE and its SelectedIndexChanged event loads one of three...
5
by: Dennis Fazekas | last post by:
Greetings, I am creating a web form which will all the user to add an unlimited number of email addresses. Basically I have 3 buttons, "Add Another Email", "-" to remove, and a "Save" button....
3
by: Dotnet Gruven | last post by:
I've built a WebForm with a Table added dynamically in Page_Load when IsPostBack is false. The table includes a couple of TextBoxes, RadioButtonLists and CheckboxLists. On postback, those...
1
by: Mike | last post by:
Hi, I am having troubles dealing with dynamically created WebControls. I have this HTML code: <form id="Form1" runat="server" method="post"> <table width="960" align="center"> <tr> <td...
7
by: Nathan Sokalski | last post by:
I have a page which I dynamically add several usercontrols (*.ascx files) to using the following code: Public Sub Refresh() For Each section As DataRow In Me.GetSections().Rows...
5
by: Nathan Sokalski | last post by:
I have a custom control that I wrote (I inherit from System.Web.UI.WebControls.CompositeControl). I dynamically add this control to my Page, but I was told that dynamically added controls do not...
1
by: semomaniz | last post by:
I have a form where i have created the form dynamically. First i manually added a panel control to the web page. Then i added another panel dynamically and inside this panel i created tables. I have...
7
by: RichB | last post by:
I am trying to get to grips with the asp.net ajaxcontrol toolkit, and am trying to add a tabbed control to the page. I have no problems within the aspx file, and can dynamically manipulate a...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.