setting asp image src property from javascript
<p>I am trying to set asp image element src property from javascript but the url property is not being set.</p>

<pre><code>function slideshow() {
  $.ajax({
    type: "POST",
    contentType: "application/json; charset=utf-8",
    url: "/RollingScreen.aspx/GetNextImage",
    dataType: "json",
    data: "{}",
    success: function (data) {
      //this changes the image on the web page
      $('#imgSlideShow').attr("src","~/1.png");
      $("#txt1").val(data.d);
      //fires another sleep/image cycle
      setTimeout(slideshow,5000);
    },
    error: function (result) {
      alert(result.message);
    }
  });
}

$(document).ready(function () {
  //Kicks the slideshow
  slideshow();
});
</code></pre>

<p>My aspx image element is </p>

<pre><code>&lt;asp:Image ID="imgSlideShow" runat="server" Height="300px" Width="600px" ImageAlign="Middle" ImageUrl="~/1.png"/&gt;....
</code></pre>

<p>Can anyone please help me...</p>
