473,545 Members | 2,291 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 1781
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
32030
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
2622
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
1265
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
2782
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
1970
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
1892
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
1209
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
1611
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
2478
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
7465
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
7398
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...
0
7656
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7805
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...
0
7752
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...
0
5969
agi2029
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...
0
4944
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
701
bsmnconsultancy
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...

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.