S
Sergey
I've implemented custom control (see below) and fill its properties
out using databinding syntax (<%# %>).
------ aspx file ------
<e:mycontrol id="someCtrlID" runat="server" Property1="<%#
this.RootPath %>/Folder">
<Data>
<e
ataItem DataProperty="<%# this.RootPath %>/Folder" />
</Data>
</e:mycontrol>
----- aspx file ------
----- aspx.cs file -----
class MyPage : Page
{
public string RootPath get { return "test"; }
}
class mycontrol : WebControl
{
.....
public string Property1;
public ArrayList Data;
.....
}
[Serializable]
class DataItem
{
....
public string DataProperty;
....
}
----- aspx.cs file -----
But there is one problem. On page load someCtrlID.Property1 has value
== "test/Folder"
but ((DataItem)someCtrlID.Data[0]).DataProperty has value == "<%#
this.RootPath %>/Folder".
DataItem properties didn't parse correct. I guess my DataItem class
doesn't support databinding... but in this case DataItem is not a
control itself. it is just store of information...
What should I do?
out using databinding syntax (<%# %>).
------ aspx file ------
<e:mycontrol id="someCtrlID" runat="server" Property1="<%#
this.RootPath %>/Folder">
<Data>
<e
</Data>
</e:mycontrol>
----- aspx file ------
----- aspx.cs file -----
class MyPage : Page
{
public string RootPath get { return "test"; }
}
class mycontrol : WebControl
{
.....
public string Property1;
public ArrayList Data;
.....
}
[Serializable]
class DataItem
{
....
public string DataProperty;
....
}
----- aspx.cs file -----
But there is one problem. On page load someCtrlID.Property1 has value
== "test/Folder"
but ((DataItem)someCtrlID.Data[0]).DataProperty has value == "<%#
this.RootPath %>/Folder".
DataItem properties didn't parse correct. I guess my DataItem class
doesn't support databinding... but in this case DataItem is not a
control itself. it is just store of information...
What should I do?