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 4 2055
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?fra me=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 Programmaticall y http://msdn.microsoft.com/library/en...controlstowebf
ormspageprogram matically.asp?f rame=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
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
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.m icrosoft.com> wrote in message
news:K1******** *****@cpmsftngx a06.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
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.a sp?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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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 window.
Now that I have started to use style sheets for layout purposes, I am
faced with some odd results when I try to create pages that are
resizable. I end up with boxes that jump down underneath other
elements if the window is resized too...
|
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 controls into a TableLayoutPanel control
with pre-created rows and columns. All row and columns styles are set to
AutorSize SizeType.
What happens is even though the TableLayoutPanel AutoSize property is set to
true and its AutoSizeMode to...
|
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 buttons generated
dynamically, even though I arranged them in two different
cells in my XSLT but still they appear side by side.
|
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 different buttons.
Since I am using same control for various clicks, it is hard for me to place
the controls at runtime for my required position.
Any suggestions of doing this will be a great help.
Johnson Smith
|
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. As I am using Grid layout and it uses
pixel units.
Thanks.
| |
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 controls when the page loads. Any
sample code or ideas?
thanks.
--
Paul G
Software engineer.
|
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 page controls were all over the
place.
"Ironically, absolute positioning is relative. Yes, you read that right. An
absolutely positioned element is positioned relative to another element,
called the containing block. Here comes the definition...
|
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 Content Place Holders.
The controls placed in a content area with absolute or relative
positioning can easily "drift" beyond my Content Place Holder.
I'm trying to put a "footer" on every page of the site and this is
|
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 with wide
screen, some of my controls on the WinForm will automatic resize
themselves to be bigger and thus push other controls off the screen.
For a sample of this problem, please see http://usctimes.com/screen.jpg
.. The screen on the left is...
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |