Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Drag image inside container

Reply
Thread Tools

Drag image inside container

 
 
Meelis Lilbok
Guest
Posts: n/a
 
      10-21-2008
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

 
Reply With Quote
 
 
 
 
Rain
Guest
Posts: n/a
 
      01-19-2009
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Array inside struct inside container none C++ 8 08-23-2011 09:20 AM
drag div from inside div to inside another 123Jim Javascript 0 05-16-2011 08:36 AM
Drag image inside container Meelis Lilbok ASP .Net Web Controls 1 01-19-2009 09:34 AM
container inside container in stl wolverine C++ 2 07-24-2006 03:08 PM
std::container::iterator vs std::container::pointer Vivi Orunitia C++ 11 02-04-2004 08:09 AM



Advertisments