JetForce
asked on
passing the position of a div tag to the server
Is there a simple way of getting the position of a div tag passed to the server so I can save it for later use.
I will be allowing the div to positioned using javascript (I will know the id of the div).
I have one idea of how to do it, but I would like a few suggestions to see if it they are along my line of thoughts.
Thanks
Jetforce
I will be allowing the div to positioned using javascript (I will know the id of the div).
I have one idea of how to do it, but I would like a few suggestions to see if it they are along my line of thoughts.
Thanks
Jetforce
ASKER
The LearnedOne,
It has indeed.
It has indeed.
C# example:
HtmlContainerControl div = (HtmlContainerControl)this .FindContr ol("div1") ;
Bob
HtmlContainerControl div = (HtmlContainerControl)this
Bob
ASKER
OK
I understand how to get the control, but how do I get its position on the form, ie top, left etc
Thanks
I understand how to get the control, but how do I get its position on the form, ie top, left etc
Thanks
HtmlContainerControl div = (HtmlContainerControl)this .FindContr ol("div1") ;
string left = div.Style["LEFT"];
string top = div.Style["TOP"];
Bob
string left = div.Style["LEFT"];
string top = div.Style["TOP"];
Bob
ASKER
that is fine, but it does not give me the new position where it has been moved to.
"I will be allowing the div to positioned using javascript!"
I only get the original position
Thanks
"I will be allowing the div to positioned using javascript!"
I only get the original position
Thanks
If you need to pass a value from client-side JavaScript to server-side code-behind, you could use a hidden element.
Bob
Bob
ASKER
exactly what I have done, but I was wondering if there was a more elegant way
thanks
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Bob,
thanks for you help,
Jetforce
thanks for you help,
Jetforce
Bob