Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   ASP .Net Web Controls (http://www.velocityreviews.com/forums/f63-asp-net-web-controls.html)
-   -   Drag image inside container (http://www.velocityreviews.com/forums/t780826-drag-image-inside-container.html)

Meelis Lilbok 10-21-2008 10:00 AM

Drag image inside container
 
Hi

I have a following question

Lets say we have a Panel and inside that panel a Image control on ASP.NET
web site.

Panel siz is 200x200px

Image size is 400'x400

is'it possible with asp.net ajax to move picture inside panel with mouse?
like google maps for example :)


BR;
Mex


Rain 01-19-2009 09:34 AM

Re: Drag image inside container
 
Yes.

There are probably many ways this could be done. One quick and dirty way to
do this is to add a button on the form which deletes the picture In the
click event for the button ( server side code behind ). Add this button as a
trigger to your update panel.


<asp:updatepanel..... >
<content>
.....
</content>
<triggers>
<asynchronouspostback controlid='myButton' ..... >
</triggers>

On the pre-render event for the button add the following

myButton.attributres.add("style","display:none");


On the client side. Wire up your javascript to trigger the postback.

onmouseout= "document.getElementById('myButton').click();"


As I say, there are more ways than one to do this, but this is quick way.



"Meelis Lilbok" <meelis.lilbok@deltmar.ee> wrote in message
news:BBAB1B04-8ED0-418E-A69D-F54261BDFCC2@microsoft.com...
> Hi
>
> I have a following question
>
> Lets say we have a Panel and inside that panel a Image control on ASP.NET
> web site.
>
> Panel siz is 200x200px
>
> Image size is 400'x400
>
> is'it possible with asp.net ajax to move picture inside panel with mouse?
> like google maps for example :)
>
>
> BR;
> Mex





All times are GMT. The time now is 04:19 PM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.