Find Position of Controls

Posted on 2007-12-04
Last Modified: 2013-11-07
How do I find the position of controls in an subroutine using during runtime?

Using javascript...
   var ctrlBounds = Sys.UI.DomElement.getBounds(ctrl);
   var x = ctrlBounds.x
   var y = ctrlBounds.y
   var h = ctrlBounds.height
   var w = ctrlBounds.width
Question by:ast2550
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
LVL 21

Expert Comment

ID: 20406827
Isnt what you provided the answer to your question? If you are looking at passing this value back to the server. you might want to save it to hidden variables...

Author Comment

ID: 20407156
But, isn't there a way using vb and not javascript?
LVL 21

Expert Comment

ID: 20407171
>> during runtime
You cannot use VB .net as a client side scripting lanuguage instead of javascript. Did u mean VB script?

Author Comment

ID: 20407255
I guess I wasn't considering it client-side.  Is it because browsers will render it differently and therefore client-side is the only way?
LVL 21

Accepted Solution

surajguptha earned 500 total points
ID: 20407289
yes thats right and there is also the screen resolution on every machine.....
Just curious... why would you need this value for?

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction HyperText Transfer Protocol ( or "HTTP" is the underpinning of internet communication.  As a teacher of web development I have heard many questions, mostly from my younger students who have come to t…
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up PayPal payment integration in your Wufoo form. Allow your users to remit payment through PayPal upon completion of your online form. This is helpful for collecting membership payments, customer payments, donations, and more.

751 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question