burak Posted September 17, 2003 Posted September 17, 2003 Hello, I am having trouble assigning the following string to the literal control on my page. <TABLE id="Table1"> <TR><TD><DIV> <asp:Literal ID='litJob' Runat='server'></asp:Literal> </DIV></TD></TR> </TABLE> In the code behind I have the following strVal = "<asp:LinkButton CommandName='Job_Cd' onfiltered='LinkButton_Command' runat='server' Text='Food & Lodging' CommandArgument='35000000' id='lb10'></asp:LinkButton>" litJob.text = strVal When I run the page nothing shows up. When I do a view source on the page, I can see the above string, but in a garbled form. Can't I assign <asp:> class object descriptions to a literal or a label? Thank you, Burak Quote
Moderators Robby Posted September 18, 2003 Moderators Posted September 18, 2003 The <asp: controls cannot be sent to the page in this manner. You should use the Controls.Add method of the control. Quote Visit...Bassic Software
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.