Ask a Question related to ASP.NET Building Controls, Design and Development.
-
xenophon #1
Get Top and Left?
I have added a control to my form in the codebehind (eg TextBox tb1 =
new TextBox();). I now need to determine the width, CSS left, CSS top
properties for that control so I can add label in front of it. I am
not sure where to start. Can anyone post any helper code on how to do
this? If this was WinForms I think I could get the TextBox coordinates
easily, but with ASP.NET I don't understand how to do it.
Thanks.
xenophon Guest
-
LEFT + LEFT vs LEFT + RIGHT
In order to do a full outer join in MySQL one must use a union. Is there any good reason to do SELECT ... LEFT JOIN UNION SELECT ...... -
Use Unicode /Right to Left
I want to use Arabic / Farsi in my site but I can not change the direction of Text Box to Right to Left in flash output page , Please let me... -
Dynamic Left to Right
I'm using php and trying to run a dynamic table with images. The problem I'm haveing and can't figure out is, when I run the recordset, I want the... -
#26091 [Opn->Fbk]: left()
ID: 26091 Updated by: moriyoshi@php.net Reported By: drei at porrigt dot se -Status: Open +Status: ... -
#26091 [NEW]: left()
From: drei at porrigt dot se Operating system: Linux mini 2.4.22 PHP version: 4.3.3 PHP Bug Type: MySQL related Bug... -
Steven Cheng[MSFT] #2
RE: Get Top and Left?
Hi Xenophon,
Welcome to ASPNET newsgroup.
From your description, you'd like to get a certain webcontrol's absolute
position(top, left) on a webform so as to insert some other control
before/after it, yes?
As for this question, the means we can use depend on our design of the web
application's page UI layout. Web application is quite different from
windows application where control is located by absolute postion on form.
In web page, generally relative postion mode is used, that means we don't
specify absolute postion for control and use some layout control such as
htmlTable to construct the page's main structure and fill other
control/elements in Table cells, and we can nest tables so as to get the
layout as we like. This makes the page's layout very flexible in case the
browser window is resized by client user. In such scenario, if you'd like
to dynamically add new control before existing control, I suggest you put
that existing control inside a certain container control such as a Panel
control(or Table control) , then find the Panel or TableCell and use
Controls.InsertAt to add the new control before the existing control.
If you're wanting to use absolute position in all of your web page(use the
GridLayout in asp.net 1.x), in such mode, we can use the
object.style.left/top script code to retrieve the absolute element's
postion on the page, however, I don't recommend this means since it'll make
the page's UI not quite flexible. Also, the gridlayout is canceled in the
comming ASP.NET 2.0.
Anyway, our suggestion is the former approach: use html table to construct
your page's UI layout and use some sub container control to hold those
controls whose relative postion maybe coordinated at runtime.
Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| NNTP-Posting-Date: Mon, 12 Sep 2005 22:58:29 -0500
| From: xenophon <xenophon@online.nospam>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
| Subject: Get Top and Left?
| Date: Mon, 12 Sep 2005 23:50:53 -0400
| Message-ID: <d1jci11iqiv232ud4jbm3le7pjm45f8nc7@4ax.com>
| X-Newsreader: Forte Agent 2.0/32.646
| MIME-Version: 1.0
| Content-Type: text/plain; charset=us-ascii
| Content-Transfer-Encoding: 7bit
| Lines: 10
| X-Trace:
sv3-koVxAnDmJgMiI2613kJmgzfa5kg4sTBs7vkE3u+EY9uompDM19 nl5gxnv/m2vkCEL8K66Qar
+j3laka!oDSgozR/k4V/DXhoXOmnUeJ4bFUThMGmzbhUp1UYUzeB+O+CBc4qgB9X+bGuSE R+I+4K
8js=
| X-Complaints-To: [email]abuse@giganews.com[/email]
| X-DMCA-Notifications: [url]http://www.giganews.com/info/dmca.html[/url]
| X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
complaint properly
| X-Postfilter: 1.3.32
| Path:
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.buildingc ontrols:4184
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
|
|
| I have added a control to my form in the codebehind (eg TextBox tb1 =
| new TextBox();). I now need to determine the width, CSS left, CSS top
| properties for that control so I can add label in front of it. I am
| not sure where to start. Can anyone post any helper code on how to do
| this? If this was WinForms I think I could get the TextBox coordinates
| easily, but with ASP.NET I don't understand how to do it.
|
| Thanks.
|
|
Steven Cheng[MSFT] Guest
-
Steven Cheng[MSFT] #3
RE: Get Top and Left?
Hi Xenophon,
Have you got any progress on this issue or does the suggestions in my last
reply helps a little? If there're any thing else we can help, please feel
free to post here. Thanks,
Steven Cheng
Microsoft Online Support
Get Secure! [url]www.microsoft.com/security[/url]
(This posting is provided "AS IS", with no warranties, and confers no
rights.)
--------------------
| X-Tomcat-ID: 166909542
| References: <d1jci11iqiv232ud4jbm3le7pjm45f8nc7@4ax.com>
| MIME-Version: 1.0
| Content-Type: text/plain
| Content-Transfer-Encoding: 7bit
| From: [email]stcheng@online.microsoft.com[/email] (Steven Cheng[MSFT])
| Organization: Microsoft
| Date: Tue, 13 Sep 2005 08:24:03 GMT
| Subject: RE: Get Top and Left?
| X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
| Message-ID: <VLAyEyDuFHA.4068@TK2MSFTNGXA01.phx.gbl>
| Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
| Lines: 95
| Path: TK2MSFTNGXA01.phx.gbl
| Xref: TK2MSFTNGXA01.phx.gbl
microsoft.public.dotnet.framework.aspnet.buildingc ontrols:4186
| NNTP-Posting-Host: tomcatimport2.phx.gbl 10.201.218.182
|
| Hi Xenophon,
|
| Welcome to ASPNET newsgroup.
| From your description, you'd like to get a certain webcontrol's absolute
| position(top, left) on a webform so as to insert some other control
| before/after it, yes?
|
| As for this question, the means we can use depend on our design of the
web
| application's page UI layout. Web application is quite different from
| windows application where control is located by absolute postion on form.
| In web page, generally relative postion mode is used, that means we don't
| specify absolute postion for control and use some layout control such as
| htmlTable to construct the page's main structure and fill other
| control/elements in Table cells, and we can nest tables so as to get the
| layout as we like. This makes the page's layout very flexible in case the
| browser window is resized by client user. In such scenario, if you'd
like
| to dynamically add new control before existing control, I suggest you put
| that existing control inside a certain container control such as a Panel
| control(or Table control) , then find the Panel or TableCell and use
| Controls.InsertAt to add the new control before the existing control.
|
| If you're wanting to use absolute position in all of your web page(use
the
| GridLayout in asp.net 1.x), in such mode, we can use the
| object.style.left/top script code to retrieve the absolute element's
| postion on the page, however, I don't recommend this means since it'll
make
| the page's UI not quite flexible. Also, the gridlayout is canceled in the
| comming ASP.NET 2.0.
|
| Anyway, our suggestion is the former approach: use html table to
construct
| your page's UI layout and use some sub container control to hold those
| controls whose relative postion maybe coordinated at runtime.
|
| Thanks,
|
| Steven Cheng
| Microsoft Online Support
|
| Get Secure! [url]www.microsoft.com/security[/url]
| (This posting is provided "AS IS", with no warranties, and confers no
| rights.)
|
|
|
|
| --------------------
| | NNTP-Posting-Date: Mon, 12 Sep 2005 22:58:29 -0500
| | From: xenophon <xenophon@online.nospam>
| | Newsgroups: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
| | Subject: Get Top and Left?
| | Date: Mon, 12 Sep 2005 23:50:53 -0400
| | Message-ID: <d1jci11iqiv232ud4jbm3le7pjm45f8nc7@4ax.com>
| | X-Newsreader: Forte Agent 2.0/32.646
| | MIME-Version: 1.0
| | Content-Type: text/plain; charset=us-ascii
| | Content-Transfer-Encoding: 7bit
| | Lines: 10
| | X-Trace:
|
sv3-koVxAnDmJgMiI2613kJmgzfa5kg4sTBs7vkE3u+EY9uompDM19 nl5gxnv/m2vkCEL8K66Qar
|
+j3laka!oDSgozR/k4V/DXhoXOmnUeJ4bFUThMGmzbhUp1UYUzeB+O+CBc4qgB9X+bGuSE R+I+4K
| 8js=
| | X-Complaints-To: [email]abuse@giganews.com[/email]
| | X-DMCA-Notifications: [url]http://www.giganews.com/info/dmca.html[/url]
| | X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers
| | X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your
| complaint properly
| | X-Postfilter: 1.3.32
| | Path:
|
TK2MSFTNGXA01.phx.gbl!TK2MSFTNGP08.phx.gbl!newsfee d00.sul.t-online.de!t-onli
|
ne.de!border2.nntp.dca.giganews.com!border1.nntp.d ca.giganews.com!nntp.gigan
|
ews.com!local01.nntp.dca.giganews.com!news.giganew s.com.POSTED!not-for-mail
| | Xref: TK2MSFTNGXA01.phx.gbl
| microsoft.public.dotnet.framework.aspnet.buildingc ontrols:4184
| | X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.buildingc ontrols
| |
| |
| | I have added a control to my form in the codebehind (eg TextBox tb1 =
| | new TextBox();). I now need to determine the width, CSS left, CSS top
| | properties for that control so I can add label in front of it. I am
| | not sure where to start. Can anyone post any helper code on how to do
| | this? If this was WinForms I think I could get the TextBox coordinates
| | easily, but with ASP.NET I don't understand how to do it.
| |
| | Thanks.
| |
| |
|
|
Steven Cheng[MSFT] Guest



Reply With Quote

