I hope somebody can help me. I've been trying to write a custom html helper for my MVC application. First at all, i tried with a testing one, which only writes a
tag for the specified param. The things is, it does not work unless I explicitly import the namespace. I've been reading a lot and as i read, That method should appear without the import namespace like this:
<%=Html.Prueba("This is a paragraph") %>
But this method, Prueba, is not showing up in the VS Intellisense.
My Class is the following:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;
namespace EasyGoCostaRica.Helpers
{
public static class ViewsHelpers
{
//This method is just for testing. Is not working :(
public static string Prueba(this HtmlHelper helper, string param1)
{
return string.Format("<p>{0}</p>", param1);
}
}
}
Thanks in advance!