<%
int index=0;
foreach(XmlElement xe in doc.DocumentElement.SelectNodes("add"))
{
string tab=xe.GetAttribute("tab");
if(IsTagPattern(tagName,xe.GetAttribute("pattern")))
{
bool isactive=(index==0&&(tabName==null||tabName==""))||(string.Compare(tab,tabName,true)==0);
if(isactive)
{
tabcontrol=xe.GetAttribute("control");
tabtext=xe.GetAttribute("text");
}
%>
<%
index++;
}
}
%>
<%
if(tabcontrol!=null)
{
try
{
Control ctrl=LoadControl("Tag/"+tabcontrol);
holder1.Controls.Add(ctrl);
}
catch
{
if(Context.Request.QueryString["_err"]=="2")
throw;
%>
<%
}
}
%>