Solved

ASP.net VB.net Move image on button click

Posted on 2013-10-22
4
578 Views
Last Modified: 2013-10-26
Hi

In an ASP.net web app is it possible to move the position of an image behind a button click?

Thanks
0
Comment
Question by:murbro
  • 2
4 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39591234
...behind a button click
As a postback, or via Javascript? If the former, why would you want to post all the way back to the server just to move the image?
0
 

Author Comment

by:murbro
ID: 39591248
Thanks. What JavaScript would I use?
0
 
LVL 83

Accepted Solution

by:
CodeCruiser earned 500 total points
ID: 39591568
If you are able to grab this image tag easily then following example would apply

<html>
<head>
<script type="text/javascript">
function changepic()
{
 document.getElementById("demo").style.top=2000 + "px";  
}
</script>
</head>
<body>

<h1>My First Web Page</h1>
<div>
<img id="demp" src="./omna.jpg"  style="position:absolute; left: 400; top: 100; width: 200;      height: 200;"/>
</div>
<button type="button" onclick="changepic()">change pic</button>
</body>
</html>

Open in new window



If not, provide us more information.
0
 

Author Closing Comment

by:murbro
ID: 39602499
Thanks very much
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question