title: Pass a relative image url to a Reactjs component from asp.net
body: <p>How should i pass the relative url to my ReactJs component from a asp.net mvc 5 project?</p>
  
  <p>Sample URL:</p>
  
  <pre><code>&lt;img src="~/Content/themes/base/images/DocumentBase.png" /&gt;
  </code></pre>
  
  <p>sample component:</p>
  
  <pre><code>var ImageViewer = React.createClass({
  
  render: function () {
      return (
          &lt;div onClick={this.clickHandler}&gt;
              &lt;img src={this.props.src} /&gt;
          &lt;/div&gt;
          );
  },
  
  clickHandler: function () {
  
      this.props.onClick(this.props.ref);
  }
  </code></pre>
  
  <p>});</p>
  
  <p>From server I am using Reactjs.Net therefore my html </p>
  
  <pre><code>   &lt;div class="list-group"&gt;
               @Html.React("ImageViewer", new
              {
                  src = imgUrl
              })
          &lt;/div&gt;
  </code></pre>