Monday, March 2, 2009

Tag Mapping in ASP.NET

Tag mapping is using for mapping two controls of compatible type so that it'll map to the mapped control.Suppose we are creating a custom panel having some custom functionality like,

public class CustomPanel : Panel
{
//Code here//
}
Now we can map all panels to our custom panel so that normal panel will get functionality of custom panel.In web.config,

<pages>
<tagMapping>
<clear />
<add tagType="System.Web.UI.WebControls.Panel"
mappedTagType="CustomPanel"/>
</tagMapping>
</pages>

0 comments:

Post a Comment