title: Changing image depending on count
body: <p>Trying to create two buttons that will increase and decrease the current count and then output an image depending on the array count position
  It will only go back and forth two images and i'm fairly new to this language so i can't see the problem. Any help would be appreciated.</p>
  
  <pre><code>@{
  if(IsPost){
  switch (Request.Form["userInput"]){
      case "Next":
          if (count &lt; 7)
          {
              count += 1;
          }
          break;    
      case "Previous":
              if (count &gt; 0){
              count -= 1;
  
              }
              break;        
      }   
      }
  }
  
  &lt;form method="post"&gt;
  
  &lt;img src="Resources\@images[count]" alt="sample" /&gt;
  
  &lt;br /&gt;
  
  &lt;input type="submit" value="Previous" name="userInput"/&gt;
  &lt;input type="submit" value="Next" name="userInput"/&gt;
  
  &lt;/form&gt;
  </code></pre>