title: Converting webform usercontrol to MVC 4 control
body: <p>I am trying to convert a webform usercontrol to MVC based usercontrol.  </p>
  
  <p>MessageControl.ascx</p>
  
  <pre><code> public abstract class Feedback : System.Web.UI.UserControl
   {
      public string Message {get;set;}
   }
  
   public void ShowError()
   {
     lblMessage.InnerHtml = Message;      
   }
  </code></pre>
  
  <p>So In aspx pages I can call the public method ShowError and pass the error which will be displayed in the usercontrol ascx file.</p>
  
  <p>Aspx pages</p>
  
  <pre><code> protected void Page_Load(object sender, System.EventArgs e)
   {
       if(isError = true)
       {
            MessageControl1.Message = "Error Occured";
       }  
   }
  </code></pre>
  
  <p>How can I achieve the same in MVC 4.0 ?</p>
  
  <p>Any help would be appreciated.</p>