J
Jeronimo Bertran
Hi,
I currently have the following HTML code for a button:
<asp:Button id=SelectButton runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "PageName") %>' CommandName='<%# DataBinder.Eval
(Container.DataItem, "PageName") %>'> </asp:Button>
The text for the button is evaluated at runtime. I am now trying to do
the same but for a button that I create programatically:
Button btn = new Button();
btn.ID = "SelectButton";
btn.Text = "<%# DataBinder.Eval(Container.DataItem, \"PageName\") %>";
btn.CommandName = "<%# DataBinder.Eval(Container.DataItem, \"PageName\")
%>";
container.Controls.Add(btn);
However, the text is literally the string.
Thanks,
Jeronimo
I currently have the following HTML code for a button:
<asp:Button id=SelectButton runat="server" Text='<%# DataBinder.Eval
(Container.DataItem, "PageName") %>' CommandName='<%# DataBinder.Eval
(Container.DataItem, "PageName") %>'> </asp:Button>
The text for the button is evaluated at runtime. I am now trying to do
the same but for a button that I create programatically:
Button btn = new Button();
btn.ID = "SelectButton";
btn.Text = "<%# DataBinder.Eval(Container.DataItem, \"PageName\") %>";
btn.CommandName = "<%# DataBinder.Eval(Container.DataItem, \"PageName\")
%>";
container.Controls.Add(btn);
However, the text is literally the string.
Thanks,
Jeronimo