Introduction: Display Image Based on Image URL with Example

In this post, we will learn about Display Image Based on Image URL with Example in asp.net with an example


Description:

In my previous posts I have explained various topics likeĀ Basics Of Pointers In C# Ajax Control in ASP.NET, AJAX Basics, Optional Arguments In C#, difference between Stack and Heap memory in C#, Difference Between Class And Structure, ASP.NET Core, C# static constructor.

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title>jQuery Display Image Based on Image URL with Example</title>
    <script type="text/javascript" src="jquery-1.10.2.js"></script>
    <script type="text/javascript">
        $(function () {
            $('#btnShow').click(function () {
                $("#imgMain").attr("src", $("#txtImageUrl").val());
            })
        })
    </script>
</head>
<body>
    <div>
        Enter Image URL:<input type="text" id="txtImageUrl" />
        <input type="button" id="btnShow" value="Show Image" />
    </div>
    <br />
    <img id="imgMain" />
</body>
</html>

Summary

I hope you got an idea about Display Image Based on Image URL with Example.
I would like to have feedback from my blog readers.
Your valuable feedback, question, or comments about this article are always welcome.

Leave a Reply

Your email address will not be published. Required fields are marked *

Name *
Email *
Website