title: Convert webform control to Razor syntax
body: <p>i got this control and it works fine, but i need to use it on my mvc3 project. I tryed my way but didnt work. I hope someone can help me. Thats the webform custom control code:</p>
  
  <p>ASPX:</p>
  
  <pre><code>&lt;%@ Page Language="C#" AutoEventWireup="true" CodeFile="BoletoCS.aspx.cs" Inherits="BoletoCS" %&gt;
  &lt;%@ Register Assembly="Impactro.Cobranca" Namespace="Impactro.WebControls" TagPrefix="cob" %&gt;
  
  &lt;html xmlns="http://www.w3.org/1999/xhtml" &gt;
  &lt;head id="Head1" runat="server"&gt;
      &lt;title&gt;Boleto&lt;/title&gt;
      &lt;style type="text/css"&gt;
      .BolCell { font-size: 7pt; font-family: Verdana; }
          .BolField { font-weight: bold; font-size: 12px; font-family: arial; }
  &lt;/style&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;form id="form1" runat="server"&gt;
           &lt;cob:BoletoWeb id="bltPag" runat="server" CssCell="BolCell" CssField="BolField" &gt;&lt;/cob:BoletoWeb&gt;
       &lt;/form&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>CodeBehind:</p>
  
  <pre><code>using System;
  using Impactro.Cobranca;
  
  public partial class BoletoCS : System.Web.UI.Page
  {
      protected void Page_Load(object sender, EventArgs e)
      {
          var cedente = new CedenteInfo
          {
              Cedente = "CURRICULO AUT ASS E CONS EM RH",
              Banco = "341",
              Agencia = "6157",
              Conta = "30901-1",
              Carteira = "175",
              CNPJ = "14.765.492/0001-10"
          };
  
          var sacado = new SacadoInfo { Sacado = "RODRIGO MANGUINHO" };
  
          var boleto = new BoletoInfo
          {
              NossoNumero = "44",
              ValorDocumento = 99,
              DataDocumento = DateTime.Now,
              DataVencimento = DateTime.Now.AddMonths(1),
              LocalPagamento = "PAGÁVEL EM QUALQUER BANCO ATÉ O VENCIMENTO.",
              Especie = Especies.RC,
              Instrucoes = "NÃO ACEITAR PAGAMENTO APÓS O VENCIMENTO."
          };
  
          bltPag.MakeBoleto(cedente, sacado, boleto);
      }
  }
  </code></pre>
  
  <p>This custom control inherits from webcontrol. It basically render a table.
  I tryed do this with Razor but didnt work. Didnt have any errors also.</p>
  
  <pre><code>@using Impactro.WebControls
  @using Impactro.Cobranca
  
  @{
      var ci = new CedenteInfo
      {
          Cedente = "CURRICULO AUT ASS E CONS EM RH",
          Banco = "341",
          Agencia = "6157",
          Conta = "30901-1",
          Carteira = "175",
          CNPJ = "14.765.492/0001-10"
      };
  
      var si = new SacadoInfo { Sacado = "RODRIGO MANGUINHO" };
  
      var bi = new BoletoInfo
      {
          NossoNumero = "44",
          ValorDocumento = 99,
          DataDocumento = DateTime.Now,
          DataVencimento = DateTime.Now.AddMonths(1),
          LocalPagamento = "PAGÁVEL EM QUALQUER BANCO ATÉ O VENCIMENTO.",
          Especie = Especies.RC,
          Instrucoes = "NÃO ACEITAR PAGAMENTO APÓS O VENCIMENTO."
      };
  
      var bw = new BoletoWeb
      {
          CssCell = "",
          CssField = "",
          ImagePath = Url.Content("~/images/bank-ticket")
      };
  
      bw.MakeBoleto(ci, si, bi);
  }
  </code></pre>