title: Getting value from textbox in xaml
body: <pre><code>private void search(object sender, RoutedEventArgs e)
  {
      if (number.Text &lt; 455)
      {
          string site;
          site = number.Text;
          var rs = Application.GetResourceStream(new Uri("def/f" + site + ".html", UriKind.Relative));
          StreamReader sr = new StreamReader(rs.Stream);
          browser.NavigateToString(sr.ReadToEnd());
      }
      else
      {
          MessageBox.Show("Enter Value between 1 to 454");
      }
  } 
  </code></pre>
  
  <p>I gave 
       InputScope="Number"
  in TextBox. So the user cant type words.
  gave  I have created the button with name, so if button pressed search function will be called. I need to validate that the user entered text in between 1 to 454. If it is, it should go on. Other wise i should alert them like i do above. But it shows error like,</p>
  
  <p><code>Error  1   Operator '&lt;' cannot be applied to operands of type 'string' and 'int'</code></p>