Click here to Skip to main content
15,917,610 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
How to display image at runtime without refreshing or without server.can I use javascript for this?if yes then how?give me some idea.Thanks
Posted
Comments
upendranath33 29-Jan-11 3:53am    
please give full discription.what u want to do.
Using java script u can upload an image at run time.
also with C#

I guess you are looking for something like this:
HTML5 Canvas for Internet Explorer[^]

Regards
Espen Harlinn
 
Share this answer
 
Hi,

Use following

in .aspx page
XML
<asp:image id="Image1" runat="server" imageurl="~/Images/bullet_hm.gif" xmlns:asp="#unknown" />
<input type="button" value="change" onclick="changeImage('../Images/Admin.gif');" />


write code between tag
C#
<script language="javascript" type="text/javascript">
function changeImage(ImageURL)
{
   var img = document.getElementById('<%=Image1.ClientID %>');
   img.src= ImageURL;
}
</script>


Thanks,
Imdadhusen
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900