472,338 Members | 1,797 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,338 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 1980
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...
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...
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...
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...
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...
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...
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...
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...
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. ...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
by: CD Tom | last post by:
This only shows up in access runtime. When a user select a report from my report menu when they close the report they get a menu I've called Add-ins...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...

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.