473,387 Members | 1,745 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,387 software developers and data experts.

How to programatically add a text field to a page

I know how to programatically add a text field to a web page. What I
don't know is how to adjust the position of any controls below the one
I am adding. (The page layout is grid layout).
There could be 100s of fields positioned below the one I am adding and
I know I can probably update the TOP portion of the style attribute for
each control belwo the one being added but there are so many and this
would take a long time.
Is there any other way I can add my fields to the middle of the page
and have the others still visible when using grid layout?
thanks for any help ;-),
Des.

Nov 19 '05 #1
3 1620
In short, you should set the pageLayout property to FlowLayout instead of
GridLayout.

I'm not surprised that you've been confused by all the control positioning
options in ASP.NET. There is a lot of confusion about this, which is why I
wrote this article on the subject which will hopefully clear things up for
you:
http://www.aspnetpro.com/NewsletterA...200504so_l.asp

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net
<de****@gmail.com> wrote in message
news:11**********************@g49g2000cwa.googlegr oups.com...
I know how to programatically add a text field to a web page. What I
don't know is how to adjust the position of any controls below the one
I am adding. (The page layout is grid layout).
There could be 100s of fields positioned below the one I am adding and
I know I can probably update the TOP portion of the style attribute for
each control belwo the one being added but there are so many and this
would take a long time.
Is there any other way I can add my fields to the middle of the page
and have the others still visible when using grid layout?
thanks for any help ;-),
Des.

Nov 19 '05 #2
thanks for the reply. Read the interresting article. Steve, if I add a
placeholder control at design time, and at run time I add fields to
this, in grid layout mode, will all controls below this reposition
themselves automatically ?

I can't change the page layout for now, so if I don't use a placeholder
control, I will most likely have to determine the controls below the
ones I am adding and adjust their TOP portion of the style attribute. I
would assume this is not straightforward ?

Given I can't change the page layout for now what option would you
suggest ? Inserting a flow or grid panel sounds good, but Surely the
controls below this would still need repositioned to make space for the
flow/grid panel ?

thanks,
Des.

Nov 19 '05 #3
Hi Steve. Thanks for the reply. I read the article and found it very
interesting. Given I can't change the page layout currently, what
option would be available for me to add fields that would mean that any
controls below in the grid layout page would automatically have their
top position updated. Its lookin like I am going to have to do worst
case scenario which is to traverse through all controls and adjust all
top positions of all controls below the one I am adding. Any other
easier suggestions ?

Your article mentions grid/flow panels but I would expect that if I add
one of these the controls below will still have to have their top
positions adjusted by my code ?

thanks,
Des.

Nov 19 '05 #4

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

Similar topics

4
by: Andrea Williams | last post by:
Does anyone know of some in depth documentation regarding how to add user controls programatically? I have a User Control, which has some basic html controls, and depending on the number selected...
4
by: Kevin Vogler | last post by:
I need to read the value of a hidden field on a remote HTML page and then use that value in a form submit on my local page. How can I read the hidden field programatically? Thanks in advance....
14
by: Paul | last post by:
I want to set the page title and/or a form hidden field programatically through ASP.Net. I do not want to use something like... <% sTitle ="My Title" %> <html><title><%=sTitle%></title>..... ...
1
by: desmcc | last post by:
I know how to programatically add a text field to a web page. What I don't know is how to adjust the position of any controls below the one I am adding. (The page layout is grid layout). There...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.