Solved

Find Position of Controls asp.net

Posted on 2007-12-04
5
2,928 Views
Last Modified: 2013-11-07
How do I find the position of controls in an asp.net subroutine using vb.net 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
0
Comment
Question by:ast2550
  • 3
  • 2
5 Comments
 
LVL 21

Expert Comment

by:surajguptha
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...
0
 
LVL 7

Author Comment

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

Expert Comment

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

Author Comment

by:ast2550
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?
0
 
LVL 21

Accepted Solution

by:
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?
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

743 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now