473,507 Members | 2,416 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Positioning controls on a webform at runtime

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");
....

The placed the component on design time and I'm trying to change some
of it's atributes. I supose this is right, but it doesn't appear to
work. Is there something wrong?

I appreciatte any kind of help.

My best regards,

Amilcar.
Nov 18 '05 #1
1 1890
Have you checked that the HTML being rendered is correct? (by using View
Source on the rendered webform). This problem can be caused if the position
property is not specified.

The following may fix your problem:

// Tell the table to use absolute positioning
Table.Style.Add("position", "absolute");

// Define position
Table.Style.Add("left", "120px");
Table.Style.Add("top", "50px");

Hope this helps,

Mun


"Amilcar" <kh**@writeme.com> wrote in message
news:46**************************@posting.google.c om...
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");
...

The placed the component on design time and I'm trying to change some
of it's atributes. I supose this is right, but it doesn't appear to
work. Is there something wrong?

I appreciatte any kind of help.

My best regards,

Amilcar.

Nov 18 '05 #2

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

Similar topics

1
1990
by: hybrid | last post by:
I have problems in understanding the behavior of the events triggered by dynamically created controls over a webform. Could you help me? In a webform, I have a static PlaceHolder PH containing...
1
1498
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
1776
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...
2
2883
by: Anand Sagar | last post by:
I have a Panel1 and button1 on my webform. At runtime, I create 2 textboxes. I do it at the Page_Load event. I put the code within the " If Not isPostBack" For the button click event, I will do...
4
1149
by: Shane O'Keeffe | last post by:
I have a WebForm onto which I would like to place a number (probably three) DataGrid controls directly under one another. These grids will have a variable amount of rows. There will also be label...
7
6965
by: Lau Lei Cheong | last post by:
Hello, I'm using javascript's insertAdjacentHtml() to insert images to the webform at runtime. This runs fine(image successfully displayed at the browser) but when I tried to access the...
1
1346
by: Chris | last post by:
This may be more of a Visual Studio question but those groups seem to be full of unrelated stuff so hopefully this might be the right place. I have a class (no associated aspx file) which handles...
6
1263
by: Paul | last post by:
still trying to figure out how to do this as I have a grid that gets data from a dbase and can change in size. I have controls that I always want to be just below the grid, with no gaps. This is a...
2
1097
by: VMI | last post by:
Why can't I freely put my webform controls anywhere in my asp.net webform? It's not like a Windows Form that I can place my control anywhere in the Form. Is there any way I can change that? ...
0
7376
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...
1
7031
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
7485
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
5623
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,...
1
5042
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...
0
4702
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...
0
3179
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1542
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 ...
1
760
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.