Solved

Find Position of Controls asp.net

Posted on 2007-12-04
5
2,945 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Introduction HyperText Transfer Protocol (http://www.ietf.org/rfc/rfc2616.txt) 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…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This video teaches users how to migrate an existing Wordpress website to a new domain.
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.

770 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