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

Sizing and positioning of dynamic controls

Hi

I would like to add controls to my page at runtime.
What containers can I use to host the controls?
I know I can add them to the form controls collection, but I need to have
control on where they are placed. For example I would like a page header and
footer, menu on the left, text on the right and an area in the middle where
I can add the controls, with the area sizing dynamically.

Hope you can suggest some options.

Tim
Nov 18 '05 #1
4 2026
Hi Tim,
Thanks for posting in the community!
From your description, you're looking for some proper container controls to
hold in the ASP.NET web page so as to contain some other dynamically added
controls, yes?
If there is anything I misunderstood, please feel free to let me know.

As for this question, I think the PlaceHolder, Panel or html Div control
are all capable of doing this. But the PlaceHolder is more recommended. And
here are some references on them:

#PlaceHolder Web Server Control
http://msdn.microsoft.com/library/en...olderwebserver
control.asp?frame=true

#Panel Web Server Control
http://msdn.microsoft.com/library/en...ebcontrol.asp?
frame=true

Also, some additional tech meterials on dynamicaly adding server controls
on ASP.NET WEB FORM:
#Adding Controls to a Web Forms Page Programmatically
http://msdn.microsoft.com/library/en...controlstowebf
ormspageprogrammatically.asp?frame=true

Hope these helpful.

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #2
Hi Tim,

Have had a a chance to check out my suggestions or have you got any ideas
on this issue? If you need any further help, please feel free to post here.'
Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #3
Steven

Thanks,

I have had a go at using place holders and panels, within a html table. If I
am clever at setting the widths of the controls I can achieve the results I
am after, that is controls in a vertical list, but it is not easy. I have
not been able to position absolutely within the panel or place holder.

FYI, I am trying to achieve varying number of rows of controls. Each row
will contain 3 columns, a label , a text box (or combo box) and a icon.
Tim

"Steven Cheng[MSFT]" <v-******@online.microsoft.com> wrote in message
news:K1*************@cpmsftngxa06.phx.gbl...
Hi Tim,

Have had a a chance to check out my suggestions or have you got any ideas
on this issue? If you need any further help, please feel free to post here.'

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #4
Hi Tim,

Thanks for your followup.
Yes, as you mentioned, to get and set the web control's width and heigth
are not quite easy especially to get them because a certain control in page
will derived its height and width from its parent container element
especially you explictly set them.

In addition, as for the:
"I am trying to achieve varying number of rows of controls. Each row
will contain 3 columns, a label , a text box (or combo box) and a icon."
you mentioned in last reply, do you mean that you'll dynamically add
several rows of controls and each row will contain three cell(has a certain
sub control in it)? If so, do you think it possbile to use the ASP.NET
Table control? We can dynamically add rows into Table Control also add
cells into each row dynamically. Here is the reference of Asp.net Table
server control in MSDN:

#Table, TableRow, and TableCell Web Server Controls
http://msdn.microsoft.com/library/en...ableRowTableCe
llWebControls.asp?frame=true

Regards,

Steven Cheng
Microsoft Online Support

Get Secure! www.microsoft.com/security
(This posting is provided "AS IS", with no warranties, and confers no
rights.)

Get Preview at ASP.NET whidbey
http://msdn.microsoft.com/asp.net/whidbey/default.aspx

Nov 18 '05 #5

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

Similar topics

1
by: J.Storta | last post by:
Prior to using style sheets, I used tables to lay out my pages. I always used percentages when specifying widths so that the page would fit nicely in the browsers regardless of the size of the...
0
by: Alexander Bolotnov | last post by:
Hi guys, here is another freaky thing that kind of bugs a lot. Maybe someone has ideas to this. We have a sort of a "dynamic" interface builder that will take a control schema and place the...
1
by: | last post by:
Hello Guys, I am rendering the server controls dynamically using XSLT but having tough time positioning them on the web form the place where I want them to be. To be precise, I have two image...
2
by: Johnson Smith | last post by:
Question is related to ASP.Net and controlling the position of these controls. I am using html table to placce my web controls. I am displaying same datagrid and calendar controls at clicks of...
1
by: Mustufa Baig | last post by:
Hello, Can anybody tell me how or refer me a link where I can find the client side javascript to make the positions and resizing of the controls on .aspx page independent of screen resolution....
4
by: Paul | last post by:
HI I have some controls under a datagrid and the datagrid can have 1 to 10 items. I would like to place some other controls just below the datagrid so need to somehow dynamically place the...
2
by: Rob R. Ainscough | last post by:
I'm slowly (very slowly) working my way thru the bizarre and sadistic world of control positioning in MultiViews (ASP 2.0). I came across this to help me explain (or attempt to anyway) why my web...
1
by: Fred Nelson | last post by:
Hi: I'm working on one of my first web applications in asp.net 2.0 and I'm having a problem with absolute versus relative positioning of controls that I place on pages that use master pages with...
5
by: lamxing | last post by:
Hi, I've come across a strange problem with the WinForm's sizing. I've designed a WinForm and it runs fine on my computer and some other PCs. But when I was trying to run the app under some PCs...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
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
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.