Can i create html helpers in Webforms project like in asp.net mvc? Thanks.
A:
You just need a static method:
public static string Label(string target, string text)
{
return String.Format("<label for= '{0}'>{1}</label>",target,text);
}
Paul Creasey
2010-06-27 19:18:08
A:
It won't be as simple as adding a static method if you want to return WebControls. You would have to hook up to the page render.
Tomislav Markovski
2010-06-29 23:39:12