<%@ Import Namespace="System.Xml"%> <%@ Page Language="C#" Inherits="CuteEditor.EditorUtilityPage" %> [[Tag]] <% if(Context.Request.QueryString["NoCancel"]=="True") nocancel=true; string tagName=Context.Request.QueryString["Tag"]; string tabName=Context.Request.QueryString["Tab"]; XmlDocument doc=new XmlDocument(); doc.Load(Server.MapPath("tag.config")); string tabcontrol=null; string tabtext=""; %> <%if(nocancel){%> <%}else{%> <%}%>
<% 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"); } %>

<%=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; %> <% } } %>