Solved

ASP.net VB.net Move image on button click

Posted on 2013-10-22
4
597 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:Murray Brown
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Murray Brown
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:Murray Brown
ID: 39602499
Thanks very much
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
IntroductionWhile developing web applications, a single page might contain many regions and each region might contain many number of controls with the capability to perform  postback. Many times you might need to perform some action on an ASP.NET po…
In this video, viewers will be given step by step instructions on adjusting mouse, pointer and cursor visibility in Microsoft Windows 10. The video seeks to educate those who are struggling with the new Windows 10 Graphical User Interface. Change Cu…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

689 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