M
MLibby
I have web custom control that exposes 3 XML properties ACXMLFile,
ACXMLString, and ACXMLDocument that I need to convert to one property,
ACXMLSource. ACXMLFile and ACXMLString are both design time properties while
ACXMLDocument is only a runtime property. How can I combine these all into
one property?
[
Bindable(true),
Category("ACXML"),
DefaultValue(""),
Description("Path to the XML file containing the content source
structure."),
]
public virtual string ACXMLFile
{
get
{
string s = (string)ViewState["ACXMLFile"];
return ((s == null) ? String.Empty : s);
}
set
{
ViewState["ACXMLFile"] = value;
}
}
[
Bindable(true),
Category("Cache Content ACDefaultUrl"),
DefaultValue(""),
Browsable(false),
Description("XML string containing the content source
structure."),
]
public virtual string ACXMLString
{
get
{
string s = (string)ViewState["ACXMLString"];
return ((s == null) ? String.Empty : s);
}
set
{
ViewState["ACXMLString"] = value;
}
}
[
Browsable(false),
Description("XML document containing the content source
structure."),
]
public virtual XmlDocument ACXMLDocument
{
get
{
string s = ACXMLSourceConvert;
if (s != null)
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(s);
return xd;
}
return (null);
}
}
Mike
ACXMLString, and ACXMLDocument that I need to convert to one property,
ACXMLSource. ACXMLFile and ACXMLString are both design time properties while
ACXMLDocument is only a runtime property. How can I combine these all into
one property?
[
Bindable(true),
Category("ACXML"),
DefaultValue(""),
Description("Path to the XML file containing the content source
structure."),
]
public virtual string ACXMLFile
{
get
{
string s = (string)ViewState["ACXMLFile"];
return ((s == null) ? String.Empty : s);
}
set
{
ViewState["ACXMLFile"] = value;
}
}
[
Bindable(true),
Category("Cache Content ACDefaultUrl"),
DefaultValue(""),
Browsable(false),
Description("XML string containing the content source
structure."),
]
public virtual string ACXMLString
{
get
{
string s = (string)ViewState["ACXMLString"];
return ((s == null) ? String.Empty : s);
}
set
{
ViewState["ACXMLString"] = value;
}
}
[
Browsable(false),
Description("XML document containing the content source
structure."),
]
public virtual XmlDocument ACXMLDocument
{
get
{
string s = ACXMLSourceConvert;
if (s != null)
{
XmlDocument xd = new XmlDocument();
xd.LoadXml(s);
return xd;
}
return (null);
}
}
Mike