How can set img new image from labal onpage load in asp.net
my bello code is not working please help me
<div class="ProductImageWrap"> <img id="demo2" alt="TrendzCart" />
This way
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <style type="text/css"> body { font-family: Arial; font-size: 10pt; } </style> <title></title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.8.3/jquery.min.js"></script> <script type="text/javascript"> $(document).ready(function () { var path = $("#Label1").html(); $("#imgDemo").attr("src", path); }); </script> </head> <body> <form id="form1" runat="server"> <div> <span id="Label1">https://i.imgur.com/73e8Dja.png</span> <br /> <img id="imgDemo" src="#" alt="Alternate Text" /> </div> </form> </body> </html>
Demo
© COPYRIGHT 2025 ASPSnippets.com ALL RIGHTS RESERVED.