title: can we use if /else to check hover in code behind C# asp.net?
body: <p>I was trying to do checking on mouse hover in code behind. If mouse is pointing on the image then it will take pic 1 else it will take pic 2. If there have any code that can do the checking on mouse hover in code behind?</p>
  
  <p>Here is my code:</p>
  
  <p>ASPX code</p>
  
  <pre><code>&lt;img class="pic" src="&lt;%=widget1%&gt;"/&gt;
  </code></pre>
  
  <p>Code behind:</p>
  
  <pre><code>protected string widget1
  {
      get
      {
          if (mousehover==true) 
          {
              return "Pic/pic1.jpg";
          }
          else
          {
              return "Pic/pic2.jpg";
           }
       }
  }
  </code></pre>
  
  <p>Any help would be appreciated. Thanks!</p>