• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2982
  • Last Modified:

Find Position of Controls asp.net

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
ast2550
Asked:
ast2550
  • 3
  • 2
1 Solution
 
surajgupthaCommented:
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
 
ast2550Author Commented:
But, isn't there a way using vb and not javascript?
0
 
surajgupthaCommented:
>> vb.net during runtime
You cannot use VB .net as a client side scripting lanuguage instead of javascript. Did u mean VB script?
0
 
ast2550Author Commented:
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
 
surajgupthaCommented:
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

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now