By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,835 Members | 1,454 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,835 IT Pros & Developers. It's quick & easy.

Positioning of the control at runtime....

P: n/a
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
Share this Question
Share on Google+
2 Replies


P: n/a
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=server" attribute to it, and adding
a declaration of the class for that Control in your CodeBehind. Then you can
programmatically 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**************@tk2msftngp13.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

P: n/a
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=server" attribute to it, and adding
a declaration of the class for that Control in your CodeBehind. Then you can
programmatically add Controls to it.


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

This discussion thread is closed

Replies have been disabled for this discussion.