D
Dica
i need to dynamically add a web control to a page without using placeHolder.
i'm looping through all the files in a folder and creating a table row as
string for each file. the contol is to be nested in that row as follows:
sTblRow = "<tr><td>" + sFrom + "</td><td><aspropDownList id=\"lstAction_"
+ filename + "\" runat=\"server\<asp:ListItem
Value=\"deliver\">Deliver</asp:ListItem><asp:ListItem
Value=\"whitelist\">Whitelist</asp:ListItem><asp:ListItem
Value=\"delete\">Delete</asp:ListItem><asp:ListItem
Value=\"blacklist\">Blacklist</asp:ListItem></aspropDownList></td></tr>";
the sTblRow string is then written to a literal control on the aspx page.
this doesn't work though. the control isn't recognized as a web control and
just displays as text. i can't really use a placeHolder as the table rows
themselves are dynamically created. any ideas how to pull this off?
tks
i'm looping through all the files in a folder and creating a table row as
string for each file. the contol is to be nested in that row as follows:
sTblRow = "<tr><td>" + sFrom + "</td><td><aspropDownList id=\"lstAction_"
+ filename + "\" runat=\"server\<asp:ListItem
Value=\"deliver\">Deliver</asp:ListItem><asp:ListItem
Value=\"whitelist\">Whitelist</asp:ListItem><asp:ListItem
Value=\"delete\">Delete</asp:ListItem><asp:ListItem
Value=\"blacklist\">Blacklist</asp:ListItem></aspropDownList></td></tr>";
the sTblRow string is then written to a literal control on the aspx page.
this doesn't work though. the control isn't recognized as a web control and
just displays as text. i can't really use a placeHolder as the table rows
themselves are dynamically created. any ideas how to pull this off?
tks