473,561 Members | 3,493 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Positioning of the control at runtime....

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
Nov 18 '05 #1
2 1782
Hi Johnson,

I'm afraid I am having trouble understanding your question. You stated first
that you are using an HTML table for layout and positioning of controls.
Then you said that it is hard for you to "place the controls at runtime for
my required position." Can you clarify? It seems like the table is supposed
to handle your positioning. Are you talking about Controls that you add
dynamically to the page? If so, and I may be off-base here regarding the
issue, but I think what you need is a Server Control in the page that you
can add Controls to. You can make any cell in your layout table into an
HtmlTableCell Control by adding a "runat=serv er" attribute to it, and adding
a declaration of the class for that Control in your CodeBehind. Then you can
programmaticall y add Controls to it.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Johnson Smith" <JS******@yahoo .com> wrote in message
news:uK******** ******@tk2msftn gp13.phx.gbl...
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

Nov 18 '05 #2
Kevin,
If you're looking for absolute positioning, you may need to add to the
style attributes the properties like Z-index, left, top etc. the
property to modify is .Style Let me know if that helps

Kevin Spencer wrote:
Hi Johnson,

I'm afraid I am having trouble understanding your question. You stated first
that you are using an HTML table for layout and positioning of controls.
Then you said that it is hard for you to "place the controls at runtime for
my required position." Can you clarify? It seems like the table is supposed
to handle your positioning. Are you talking about Controls that you add
dynamically to the page? If so, and I may be off-base here regarding the
issue, but I think what you need is a Server Control in the page that you
can add Controls to. You can make any cell in your layout table into an
HtmlTableCell Control by adding a "runat=serv er" attribute to it, and adding
a declaration of the class for that Control in your CodeBehind. Then you can
programmaticall y add Controls to it.


--
Regards,
Dilip Krishnan
dilipkrish at msn. com
Nov 18 '05 #3

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

Similar topics

9
32034
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. However, there are images that I used absolute positioning in order to place them in the appropriate location on my page. When I do a browser resize,...
11
2625
by: NS | last post by:
I am relativly new to css positioning and have a question regarding the display of a DHTML pop-up Here is the basic HTML I am using: <html> <head> <script language="JavaScript"> <!--
1
1270
by: Bob Rosen | last post by:
I would like to place some button controls on a web page underneath a DataGrid control. Since the height of the DataGrid depends on the number of rows displayed, which is determined by user selections, I need to set the position of the button controls at runtime. With a Windows form I could do it with: Button.Top = Datagrid.Top +...
2
2784
by: hzgt9b | last post by:
Using Visual studio 2003 and VB.NET, I want to programatically position a control (windows media player) on my form. For example, I want to position the control in 1 of 9 locations: topLeft, topCenter, topRIght, leftCenter, center, rightCenter, bottomLeft, bottomCenter, bottomRight. Is there an easy way to ask the container to place the...
1
1971
by: Harry | last post by:
Hi I am adding a textbox control at runtime that allows a user to enter a date. I also want to add a calendar icon beside the textbox so that the user can click on the calendar icon and have it populate the textbox if they choose. (We all have seen this in sites such as expedia or something like that). I have a placeholder that will hold...
1
1893
by: Amilcar | last post by:
Hi there, I'm trying to change the position on a webform for a control (a Table control), at run time. The code I wrote for doimg this is: .... Table.Style.Add("LEFT", "120"); Table.Style.Add("TOP", "50"); ....
1
1210
by: asad | last post by:
Hello, I have some problem in Layout of my page when i put ASP.NET control on it, actually in this control i have created the links of my website and, i want to include this control in all of my pages, but when i include it, page layout or positioning distrubed I'm applying html table but it can't work, so pls tell me what i do to solve...
2
1612
by: Glenn T. Kitchen | last post by:
Hello Group, How do you position a web control you create at runtime? I thought: ===================================== Dim Label1 as Label = New Label Me.Controls.Add(Label1) Me.Controls.Item(Label1).Location(x,y) =====================================
2
2479
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...
0
7637
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8072
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7605
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...
0
7924
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 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...
1
5462
isladogs
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...
0
3609
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...
0
3591
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2055
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
1
1171
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.