WebControls.Location property?

  • Thread starter Thread starter Jax
  • Start date Start date
J

Jax

Can i change the location of a control in ASP.NET?
I'd like to have the ability to change an images' location
on the pressing of little arrows on the same page to
resize and move the image around.
Usually on an application level I would use the location
property but I can't seem to find this in ASP.NET the size
is available, but does anyone know how I can change the
location.

Thanks for any help passed my way.

jax
 
You'll have to make the image's layout explicit (insdtead of normal HTML
flow - effectively chaning the HTML "position" attribute to "absolute"
instead of default or static) and use client-side script to move it (I
assume you don't want the page round-tripping to the server to do this).

-Rob Teixeira [MVP]
 
Thats very helpful, thankyou very much Rob.
You make a very good point about client side script, it
would be ridiculous to post back to the server for every
single change that is made, it would appear that I will
have to learn some script (scripting in C# is undesirable
on the client side I assume as it would require the user
to have the .NET framework redist).
I am not very keen on the idea of using VBScript, would
Javascript be a good choice? Do you know of any decent
articles or source for information so I can learn what
script to use and how.
Again, highly appreciate of your responses thanks for
bailing me out again.

jax
 
Javascript would be ideal.
I know there are few examples like this in the MSDN library. Try searching
for the "position" and "offset" HTML attributes.

-Rob Teixeira [MVP]
 
Back
Top